diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 9ac998dab..1a6bb8452 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2972,7 +2972,7 @@ If the table is trivial, then return it as a scalar." (defun org-babel-string-read (cell) "Strip nested \"s from around strings." (org-babel-read (or (and (stringp cell) - (string-match "\\\"\\(.+\\)\\\"" cell) + (string-match "\"\\(.+\\)\"" cell) (match-string 1 cell)) cell) t)) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 069abbecb..31f3dace2 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -9480,7 +9480,7 @@ the resulting entry will not be shown. When TEXT is empty, switch to (goto-char (point-min)) (cl-case type (anniversary - (or (re-search-forward "^*[ \t]+Anniversaries" nil t) + (or (re-search-forward "^\\*[ \t]+Anniversaries" nil t) (progn (or (org-at-heading-p t) (progn diff --git a/lisp/org-element.el b/lisp/org-element.el index 0fea9b38a..e4e704d0d 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -2150,7 +2150,7 @@ containing `:key', `:value', `:begin', `:end', `:post-blank' and ;; this corner case. (let ((begin (or (car affiliated) (point))) (post-affiliated (point)) - (key (progn (looking-at "[ \t]*#\\+\\(\\S-+*\\):") + (key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):") (upcase (match-string-no-properties 1)))) (value (org-trim (buffer-substring-no-properties (match-end 0) (point-at-eol)))) diff --git a/lisp/org-list.el b/lisp/org-list.el index 727ec6747..cfd674f85 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2657,7 +2657,7 @@ Return t if successful." (error "Cannot outdent beyond margin") ;; Change bullet if necessary. (when (and (= (+ top-ind offset) 0) - (string-match "*" + (string-match "\\*" (org-list-get-bullet beg struct))) (org-list-set-bullet beg struct (org-list-bullet-string "-"))) diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el index 969bff3cc..a37c41ad0 100644 --- a/lisp/org-mhe.el +++ b/lisp/org-mhe.el @@ -142,7 +142,7 @@ So if you use sequences, it will now work." "Return the name of the message folder in an index folder buffer." (save-excursion (mh-index-previous-folder) - (if (re-search-forward "^\\(+.*\\)$" nil t) + (if (re-search-forward "^\\(\\+.*\\)$" nil t) (message "%s" (match-string 1))))) (defun org-mhe-get-message-folder () diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index 7d2640a5f..baac7a992 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -859,11 +859,11 @@ If BEG and END are given, only do this in that region." (cl-incf cnt-error) (throw 'next t)) (move-marker bos-marker (point)) - (if (re-search-forward "^** Old value[ \t]*$" eos t) + (if (re-search-forward "^\\** Old value[ \t]*$" eos t) (setq old (buffer-substring (1+ (match-end 0)) (progn (outline-next-heading) (point))))) - (if (re-search-forward "^** New value[ \t]*$" eos t) + (if (re-search-forward "^\\** New value[ \t]*$" eos t) (setq new (buffer-substring (1+ (match-end 0)) (progn (outline-next-heading) diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 0cca65c8d..13d88dad7 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -633,7 +633,7 @@ This means, between the beginning of line and the point." ,@(org-mouse-list-options-menu (mapcar 'car org-startup-options) 'org-mode-restart)))) ((or (eolp) - (and (looking-at "\\( \\|\t\\)\\(+:[0-9a-zA-Z_:]+\\)?\\( \\|\t\\)+$") + (and (looking-at "\\( \\|\t\\)\\(\\+:[0-9a-zA-Z_:]+\\)?\\( \\|\t\\)+$") (looking-back " \\|\t" (- (point) 2) (line-beginning-position)))) (org-mouse-popup-global-menu)) diff --git a/lisp/org-plot.el b/lisp/org-plot.el index aa34e4011..a5635e326 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -336,7 +336,7 @@ line directly before or after the table." (insert "\n") (insert-file-contents (plist-get params :script)) (goto-char (point-min)) - (while (re-search-forward "$datafile" nil t) + (while (re-search-forward "\\$datafile" nil t) (replace-match data-file nil nil))) (insert (org-plot/gnuplot-script data-file num-cols params))) ;; Graph table. diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index d9fdef00e..0577c3151 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -330,7 +330,7 @@ returned list." (len 0) dir ret) - (when (string-match "^\\(.*\\)\\(org-protocol:/+[a-zA-z0-9][-_a-zA-z0-9]*:/+\\)\\(.*\\)" trigger) + (when (string-match "^\\(.*\\)\\(org-protocol:/+[a-zA-Z0-9][-_a-zA-Z0-9]*:/+\\)\\(.*\\)" trigger) (setq dir (match-string 1 trigger)) (setq len (length dir)) (setcar l (concat dir (match-string 3 trigger)))) diff --git a/lisp/org-table.el b/lisp/org-table.el index f4e3d35a2..e22ee9503 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1156,7 +1156,7 @@ to a number. In the case of a timestamp, increment by days." (- (org-time-string-to-absolute txt) (org-time-string-to-absolute txt-up))) ((string-match org-ts-regexp3 txt) 1) - ((string-match "\\([-+]\\)?\\(?:[0-9]+\\)?\\(?:\.[0-9]+\\)?" txt-up) + ((string-match "\\([-+]\\)?[0-9]*\\(?:\\.[0-9]+\\)?" txt-up) (- (string-to-number txt) (string-to-number (match-string 0 txt-up)))) (t 1))) @@ -2327,7 +2327,7 @@ LOCATION instead." "\n")))) (defsubst org-table-formula-make-cmp-string (a) - (when (string-match "\\`$[<>]" a) + (when (string-match "\\`\\$[<>]" a) (let ((arrow (string-to-char (substring a 1)))) ;; Fake a high number to make sure this is sorted at the end. (setq a (org-table-formula-handle-first/last-rc a)) @@ -2375,7 +2375,7 @@ LOCATION is a buffer position, consider the formulas there." (cond ((not (match-end 2)) m) ;; Is it a column reference? - ((string-match-p "\\`$\\([0-9]+\\|[<>]+\\)\\'" m) m) + ((string-match-p "\\`\\$\\([0-9]+\\|[<>]+\\)\\'" m) m) ;; Since named columns are not possible in ;; LHS, assume this is a named field. (t (match-string 2 string))))) @@ -3236,7 +3236,7 @@ known that the table will be realigned a little later anyway." (cond ((string-match "\\`@-?I+" old-lhs) (user-error "Can't assign to hline relative reference")) - ((string-match "\\`$[<>]" old-lhs) + ((string-match "\\`\\$[<>]" old-lhs) (let ((new (org-table-formula-handle-first/last-rc old-lhs))) (when (assoc new eqlist) @@ -3659,7 +3659,8 @@ Parameters get priority." (setq startline (org-current-line)) (dolist (entry eql) (let* ((type (cond - ((string-match "\\`$\\([0-9]+\\|[<>]+\\)\\'" (car entry)) + ((string-match "\\`\\$\\([0-9]+\\|[<>]+\\)\\'" + (car entry)) 'column) ((equal (string-to-char (car entry)) ?@) 'field) (t 'named))) diff --git a/lisp/org.el b/lisp/org.el index ca4c5d581..d5a7bf526 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10058,7 +10058,7 @@ This is still an experimental function, your mileage may vary." ((and (equal type "lisp") (string-match "^/" path)) ;; Planner has a slash, we do not. (setq type "elisp" path (substring path 1))) - ((string-match "^//\\(.?*\\)/\\(<.*>\\)$" path) + ((string-match "^//\\(.*\\)/\\(<.*>\\)$" path) ;; A typical message link. Planner has the id after the final slash, ;; we separate it with a hash mark (setq path (concat (match-string 1 path) "#" @@ -21994,7 +21994,7 @@ assumed to be significant there." (save-excursion (skip-chars-backward "[ \t]") (skip-chars-backward "\\\\") - (looking-at "\\\\\\\\\\($\\|[^\\\\]\\)"))) + (looking-at "\\\\\\\\\\($\\|[^\\]\\)"))) (defun org-fill-paragraph-with-timestamp-nobreak-p () "Non-nil when a new line at point would split a timestamp." diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 25317cb8a..7917e3dad 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1472,8 +1472,8 @@ contextual information." (replace-regexp-in-string "-" "•" (replace-regexp-in-string - "+" "⁃" - (replace-regexp-in-string "*" "‣" bul)))))))) + "\\+" "⁃" + (replace-regexp-in-string "\\*" "‣" bul)))))))) (indentation (if (eq list-type 'descriptive) org-ascii-quote-margin (string-width bullet)))) (concat diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index e09312f65..a147111ed 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1610,7 +1610,7 @@ INFO is a plist used as a communication channel." (defun org-latex-clean-invalid-line-breaks (data _backend _info) (replace-regexp-in-string - "\\(\\end{[A-Za-z0-9*]+}\\|^\\)[ \t]*\\\\\\\\[ \t]*$" "\\1" + "\\(\\\\end{[A-Za-z0-9*]+}\\|^\\)[ \t]*\\\\\\\\[ \t]*$" "\\1" data)) diff --git a/lisp/ox.el b/lisp/ox.el index 73eec2fca..054e10fb7 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -3300,7 +3300,7 @@ storing and resolving footnotes. It is created automatically." (setq value (replace-match "" nil nil value))))) (lines (and (string-match - ":lines +\"\\(\\(?:[0-9]+\\)?-\\(?:[0-9]+\\)?\\)\"" + ":lines +\"\\([0-9]*-[0-9]*\\)\"" value) (prog1 (match-string 1 value) (setq value (replace-match "" nil nil value)))))