From 9994ec488e687e77bfcdaab8664cdc4d4c04ddeb Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 2 Apr 2006 18:21:42 +0000 Subject: [PATCH] Merged from mwolson@gnu.org--2006 (patch 27-28) Patches applied: * mwolson@gnu.org--2006/planner--main--1.0--patch-28 Correct several regexps. git-archimport-id: mwolson@gnu.org--2006-planner-el/planner-el--devel--0--patch-26 --- Makefile.defs | 2 +- planner-appt.el | 4 ++-- planner-bibtex.el | 2 +- planner-deadline.el | 2 +- planner-erc.el | 2 +- planner-id.el | 10 +++++----- planner-mhe.el | 2 +- planner-rdf.el | 4 ++-- planner-tasks-overview.el | 2 +- planner-timeclock.el | 4 ++-- planner-vm.el | 2 +- planner.el | 4 ++-- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 0073b92..a897f0a 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -8,7 +8,7 @@ SITEFLAG = --no-site-file # Installation options # PREFIX is only used here. -PREFIX = /usr/pkg +PREFIX = /usr/local ELISPDIR = $(PREFIX)/share/emacs/site-lisp/planner INFODIR = $(PREFIX)/info diff --git a/planner-appt.el b/planner-appt.el index 5e81b18..6bee317 100644 --- a/planner-appt.el +++ b/planner-appt.el @@ -276,7 +276,7 @@ time, and match group 3 the alert text." (defun planner-appt-seek-to-end-of-current-section () "Go to the end of the current section." (goto-char - (or (and (re-search-forward "^\\*[^*]" nil t) + (or (and (re-search-forward "^\\*[^*\n]" nil t) (1- (planner-line-beginning-position))) (point-max)))) @@ -388,7 +388,7 @@ the hook's global value rather than its local value." (if (string-match (concat "\\s-*" (if (boundp 'planner-id-regexp) - "{{\\([^:]+\\):\\([0-9]+\\)}}")) + planner-id-regexp)) description) (replace-match "" t t description) description)) diff --git a/planner-bibtex.el b/planner-bibtex.el index 01516c8..d86f497 100644 --- a/planner-bibtex.el +++ b/planner-bibtex.el @@ -46,7 +46,7 @@ (defvar planner-bibtex-separator ":" "Character separating filename and label.") (defvar planner-bibtex-regexp (concat "\\`bibtex:\\([^" - planner-bibtex-separator "]+\\)" + planner-bibtex-separator "\n]+\\)" planner-bibtex-separator "\\(.+\\)") "Regexp matching URLs.") ;;; Code: diff --git a/planner-deadline.el b/planner-deadline.el index b78c223..f6dd89f 100644 --- a/planner-deadline.el +++ b/planner-deadline.el @@ -51,7 +51,7 @@ Point will be on the same line as the task." :options '(planner-deadline-update) :group 'planner-deadline) -(defcustom planner-deadline-regexp "\\({{Deadline:\\s-+\\([0-9]+\\.[0-9]+\\.[0-9]+\\)[^}]*}}\\)" +(defcustom planner-deadline-regexp "\\({{Deadline:\\s-+\\([0-9]+\\.[0-9]+\\.[0-9]+\\)[^}\n]*}}\\)" "Regular expression for deadline data. The special deadline string should be regexp group 1. The date (YYYY.MM.DD) should be regexp group 2." diff --git a/planner-erc.el b/planner-erc.el index 4ddb485..843a352 100644 --- a/planner-erc.el +++ b/planner-erc.el @@ -57,7 +57,7 @@ (message "ERC 5.1 or higher is required; please upgrade ERC")) (defvar planner-irc-regexp - "\\`[ei]rc://\\([^:/]+\\)\\([^/]+\\)?\\(?:/\\([^,/]+\\)\\(.*\\)\\)?" + "\\`[ei]rc://\\([^:/\n]+\\)\\([^/\n]+\\)?\\(?:/\\([^,/\n]+\\)\\(.*\\)\\)?" "Regexp used to match IRC URLs.") ;;;###autoload diff --git a/planner-id.el b/planner-id.el index abd28c7..62987d4 100644 --- a/planner-id.el +++ b/planner-id.el @@ -86,7 +86,7 @@ (defvar planner-id-values nil "Alist with (key nextvalue) pairs.") -(defvar planner-id-regexp "{{\\([^:]+\\):\\([0-9]+\\)}}" +(defvar planner-id-regexp "{{\\([^:\n]+\\):\\([0-9]+\\)}}" "Regexp matching planner IDs.") (defun planner-id-get-id-from-string (string &optional key) @@ -94,7 +94,7 @@ If KEY is specified, match against that." (when (string-match (concat "{{\\(" - (or key "[^:]+") + (or key "[^:\n]+") "\\):\\([0-9]+\\)}}") string) (cons (planner-match-string-no-properties 1 string) (planner-match-string-no-properties 2 string)))) @@ -255,9 +255,9 @@ Update the linked page, if any." (save-excursion (goto-char here) (skip-chars-backward " \t\n") - (or (looking-at "{{Tasks:[^}]+}}") + (or (looking-at "{{Tasks:[^}\n]+}}") (and (search-backward "{{" (planner-line-beginning-position) t) - (looking-at "{{Tasks:[^}]+}}")) + (looking-at "{{Tasks:[^}\n]+}}")) (<= here (match-end 0))))))) (eval-and-compile @@ -321,7 +321,7 @@ EVENT is the mouse event." "Highlight IDs as unobtrusive, clickable text from BEG to END. VERBOSE is ignored." (goto-char beg) - (while (re-search-forward "{{[^}]+}}" end t) + (while (re-search-forward "{{[^}\n]+}}" end t) (planner-highlight-region (match-beginning 0) (match-end 0) diff --git a/planner-mhe.el b/planner-mhe.el index bd9f3e7..295f2f4 100644 --- a/planner-mhe.el +++ b/planner-mhe.el @@ -129,7 +129,7 @@ Suitable for use in `planner-annotation-functions'." ;;;###autoload (defun planner-mhe-browse-url (url) "If this is a MH-E URL, jump to it." - (when (string-match "\\`mhe://\\(.+\\)/\\([^>]+\\)" url) + (when (string-match "\\`mhe://\\(.+\\)/\\([^>\n]+\\)" url) (let* ((folder (match-string 1 url)) (num (match-string 2 url)) (show-buf (concat "show-" folder))) diff --git a/planner-rdf.el b/planner-rdf.el index 66ca059..fdecab8 100644 --- a/planner-rdf.el +++ b/planner-rdf.el @@ -131,10 +131,10 @@ ;; common match strings - links (defvar planner-rdf-matchstr-plink1 - "\\[\\[\\([^[]+?\\)\\]\\[\\(.+?\\)\\]\\]" + "\\[\\[\\([^[\n]+?\\)\\]\\[\\(.+?\\)\\]\\]" "Link like [[][]]. Match link and text.") (defvar planner-rdf-matchstr-plink2 - "\\[\\[\\([^[]+?\\)\\]\\]" + "\\[\\[\\([^[\n]+?\\)\\]\\]" "Link like [[]]. Match link.") (defvar planner-rdf-matchstr-pagenotelink diff --git a/planner-tasks-overview.el b/planner-tasks-overview.el index b62da4f..c05375c 100644 --- a/planner-tasks-overview.el +++ b/planner-tasks-overview.el @@ -207,7 +207,7 @@ DATA is a list of (priority status date plan description)." (mapcar 'cdr file-list)) (goto-char (point-min)) (while (not (eobp)) - (when (looking-at "^\\([^:]+\\):\\(.+\\)") + (when (looking-at "^\\([^:\n]+\\):\\(.+\\)") (let ((info (planner-task-info-from-string (match-string 1) (match-string 2)))) (add-to-list diff --git a/planner-timeclock.el b/planner-timeclock.el index 0b08e33..8d4157c 100644 --- a/planner-timeclock.el +++ b/planner-timeclock.el @@ -110,7 +110,7 @@ (goto-char (point-min)) (while (re-search-forward (concat - "^. [^ ]+ [^ ]+ " + "^. [^ \n]+ [^ \n]+ " "\\(" (regexp-quote (planner-timeclock-plan-string info)) "\\)" (regexp-quote (planner-task-description info)) "$") nil t) (replace-match @@ -129,7 +129,7 @@ (goto-char (point-min)) (while (re-search-forward (concat - "^. [^ ]+ [^ ]+ " + "^. [^ \n]+ [^ \n]+ " (regexp-quote (planner-timeclock-plan-string info)) "\\(" (regexp-quote (planner-task-description info)) diff --git a/planner-vm.el b/planner-vm.el index c190d98..d13f504 100644 --- a/planner-vm.el +++ b/planner-vm.el @@ -93,7 +93,7 @@ This function can be added to `planner-annotation-functions'." ;;;###autoload (defun planner-vm-browse-url (url) "If this is an VM URL, jump to it." - (when (string-match "\\`vm://\\(.+\\)/\\([^/]+\\)$" url) + (when (string-match "\\`vm://\\(.+\\)/\\([^/\n]+\\)$" url) (let ((message-id (match-string 2 url)) (inbox (match-string 1 url))) ; open the inbox read-only diff --git a/planner.el b/planner.el index 2ef453c..550f4be 100644 --- a/planner.el +++ b/planner.el @@ -2032,7 +2032,7 @@ reported." (goto-char (planner-line-beginning-position)) ;; Non-completed or cancelled tasks only (if (looking-at - "^#?\\([A-C]\\)\\([0-9]*\\)\\s-+\\([^XC]\\)\\s-+\\(.+\\)") + "^#?\\([A-C]\\)\\([0-9]*\\)\\s-+\\([^XC\n]\\)\\s-+\\(.+\\)") (condition-case err (when (planner-copy-or-move-task date) (setq count (1+ count))) @@ -4013,7 +4013,7 @@ Specify \".\" or leave this blank to include all pages." (planner-read-date "nil by default. Start") (planner-read-date "nil by default. End") t))))) - (planner-list-tasks-with-status "[^XC]" pages)) + (planner-list-tasks-with-status "[^XC\n]" pages)) ;;;_ + Notes -- 2.11.4.GIT