From 217ad4aafbf7daeb1045efac4a5c80a8f97d553a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 28 Oct 2014 18:42:51 -0700 Subject: [PATCH 01/24] Backport commit 123ddec from Emacs master branch * doc/org.texi (Dynamic blocks): * lisp/org-archive.el (org-archive-subtree) (org-archive-to-archive-sibling): * lisp/org-clock.el (org-resolve-clocks, org-clock-get-sum-start) (org-clock-special-range): * lisp/org-timer.el (org-timer-seconds): * lisp/org.el (org-read-date-analyze, org-get-cursor-date): * lisp/ox-html.el (org-html-format-spec): * lisp/ox-icalendar.el (org-icalendar--vtodo): Omit unnecessary call to current-time. * lisp/org.el (org-get-cursor-date): Don't call current-time twice to get the current time stamp, as this can lead to inconsistent results. * lisp/org-compat.el (org-float-time): Simplify to an alias because time-to-seconds now behaves like float-time with respect to nil arg. * lisp/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy conversion from floating point to Emacs time and back. (org-resolve-clocks): Prefer two-argument floor. Simplify use of current-time and friends. 123ddec7f807f4bd7400bbbe08219afb02269c00 Paul Eggert Tue Oct 28 18:42:51 2014 -0700 --- doc/org.texi | 4 ++-- lisp/org-archive.el | 6 ++---- lisp/org-clock.el | 16 +++++++--------- lisp/org-compat.el | 8 +++----- lisp/org-timer.el | 4 ++-- lisp/org.el | 9 +++++---- lisp/ox-html.el | 3 +-- lisp/ox-icalendar.el | 2 +- 8 files changed, 23 insertions(+), 29 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 5f248e940..ea91df364 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -13124,7 +13124,7 @@ Here is a thorough example, taken from @inforef{GNU Sample Texts,,texinfo}. #+TEXINFO_PRINTED_TITLE: GNU Sample #+SUBTITLE: for version 2.0, last updated 4 March 2014 -* Copying +* Copying :PROPERTIES: :COPYING: t :END: @@ -17536,7 +17536,7 @@ The corresponding block writer function could look like this: (defun org-dblock-write:block-update-time (params) (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) (insert "Last block update at: " - (format-time-string fmt (current-time))))) + (format-time-string fmt)))) @end lisp If you want to make sure that all dynamic blocks are always up-to-date, diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 6deac47ba..87471a9ce 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -231,8 +231,7 @@ this heading." (error "No file associated to buffer")))) (olpath (mapconcat 'identity (org-get-outline-path) "/")) (time (format-time-string - (substring (cdr org-time-stamp-formats) 1 -1) - (current-time))) + (substring (cdr org-time-stamp-formats) 1 -1))) category todo priority ltags itags atags ;; end of variables that will be used for saving context location afile heading buffer level newfile-p infile-p visiting @@ -441,8 +440,7 @@ sibling does not exist, it will be created at the end of the subtree." (org-set-property "ARCHIVE_TIME" (format-time-string - (substring (cdr org-time-stamp-formats) 1 -1) - (current-time))) + (substring (cdr org-time-stamp-formats) 1 -1))) (outline-up-heading 1 t) (hide-subtree) (org-cycle-show-empty-lines 'folded) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index a772f03d6..e8fababfb 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1046,9 +1046,9 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling (lambda (clock) (format "Dangling clock started %d mins ago" - (floor - (/ (- (org-float-time (current-time)) - (org-float-time (cdr clock))) 60)))))) + (floor (- (org-float-time) + (org-float-time (cdr clock))) + 60))))) (or last-valid (cdr clock))))))))))) @@ -1370,7 +1370,7 @@ decides which time to use." (current-time)) ((equal cmt "today") (setq org--msg-extra "showing today's task time.") - (let* ((dt (decode-time (current-time)))) + (let* ((dt (decode-time))) (setq dt (append (list 0 0 0) (nthcdr 3 dt))) (if org-extend-today-until (setf (nth 2 dt) org-extend-today-until)) @@ -2031,7 +2031,7 @@ If MSTART is non-nil, use this number to specify the starting day of a month (1 is the first day of the month). If you can combine both, the month starting day will have priority." (if (integerp key) (setq key (intern (number-to-string key)))) - (let* ((tm (decode-time (or time (current-time)))) + (let* ((tm (decode-time time)) (s 0) (m (nth 1 tm)) (h (nth 2 tm)) (d (nth 3 tm)) (month (nth 4 tm)) (y (nth 5 tm)) (dow (nth 6 tm)) @@ -2672,10 +2672,8 @@ TIME: The sum of all time spend in this tree, in minutes. This time (when (and te (listp te)) (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te)))) ;; Now the times are strings we can parse. - (if ts (setq ts (org-float-time - (seconds-to-time (org-matcher-time ts))))) - (if te (setq te (org-float-time - (seconds-to-time (org-matcher-time te))))) + (if ts (setq ts (org-matcher-time ts))) + (if te (setq te (org-matcher-time te))) (save-excursion (org-clock-sum ts te (unless (null matcher) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 90380a880..7a22fcf7a 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -411,12 +411,10 @@ Pass BUFFER to the XEmacs version of `move-to-column'." (when focus-follows-mouse (set-mouse-position frame (1- (frame-width frame)) 0))))) -(defun org-float-time (&optional time) +(defalias 'org-float-time + (if (featurep 'xemacs) 'time-to-seconds 'float-time) "Convert time value TIME to a floating point number. -TIME defaults to the current time." - (if (featurep 'xemacs) - (time-to-seconds (or time (current-time))) - (float-time time))) +TIME defaults to the current time.") ;; `user-error' is only available from 24.2.50 on (unless (fboundp 'user-error) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 8161699f3..b22db7bc6 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -195,8 +195,8 @@ it in the buffer." (defun org-timer-seconds () (if org-timer-timer-is-countdown (- (org-float-time org-timer-start-time) - (org-float-time (current-time))) - (- (org-float-time (or org-timer-pause-time (current-time))) + (org-float-time)) + (- (org-float-time org-timer-pause-time) (org-float-time org-timer-start-time)))) ;;;###autoload diff --git a/lisp/org.el b/lisp/org.el index 4636830d1..4749e945b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16494,7 +16494,7 @@ user." (defun org-read-date-analyze (ans org-def org-defdecode) "Analyze the combined answer of the date prompt." ;; FIXME: cleanup and comment - (let ((nowdecode (decode-time (current-time))) + (let ((nowdecode (decode-time)) delta deltan deltaw deltadef year month day hour minute second wday pm h2 m2 tl wday1 iso-year iso-weekday iso-week iso-year iso-date futurep kill-year) @@ -16652,7 +16652,7 @@ user." (deltan (setq futurep nil) (unless deltadef - (let ((now (decode-time (current-time)))) + (let ((now (decode-time))) (setq day (nth 3 now) month (nth 4 now) year (nth 5 now)))) (cond ((member deltaw '("d" "")) (setq day (+ day deltan))) ((equal deltaw "w") (setq day (+ day (* 7 deltan)))) @@ -22066,8 +22066,9 @@ the agenda) or the current time of the day." (when (and tp (string-match "\\([0-9][0-9]\\):\\([0-9][0-9]\\)" tp)) (setq hod (string-to-number (match-string 1 tp)) mod (string-to-number (match-string 2 tp)))) - (or tp (setq hod (nth 2 (decode-time (current-time))) - mod (nth 1 (decode-time (current-time)))))) + (or tp (let ((now (decode-time))) + (setq hod (nth 2 now) + mod (nth 1 now))))) (cond ((eq major-mode 'calendar-mode) (setq date (calendar-cursor-to-date) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 23498b269..b6a3a7e4f 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1630,8 +1630,7 @@ used in the preamble or postamble." (?c . ,(plist-get info :creator)) (?C . ,(let ((file (plist-get info :input-file))) (format-time-string org-html-metadata-timestamp-format - (if file (nth 5 (file-attributes file)) - (current-time))))) + (if file (nth 5 (file-attributes file)))))) (?v . ,(or org-html-validation-link "")))) (defun org-html--build-pre/postamble (type info) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index cd48bbf9a..38bdcf95d 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -678,7 +678,7 @@ Return VTODO component as a string." (org-element-property :scheduled entry)) ;; If we can't use a scheduled time for some ;; reason, start task now. - (let ((now (decode-time (current-time)))) + (let ((now (decode-time))) (list 'timestamp (list :type 'active :minute-start (nth 1 now) From 5a01b116a40fd87583cfb08d821b73cbe99f5a2d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 26 Jul 2015 23:28:09 -0400 Subject: [PATCH 02/24] Pass current-time as optional arg for tests * lisp/org.el (org-read-date-analyze): * lisp/org-timer.el (org-timer-seconds): Explicitly pass current-time as optional time argument and explain reason in comment. This reverts some changes from 91ab6c4 ("Backport commit 123ddec from Emacs master branch", 2014-10-28). --- lisp/org-timer.el | 7 +++++-- lisp/org.el | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index b22db7bc6..3d1e5a5e6 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -193,10 +193,13 @@ it in the buffer." (defvar org-timer-timer-is-countdown nil) (defun org-timer-seconds () + ;; Pass `current-time' result to `org-float-time' + ;; (instead of calling without arguments) so that only + ;; `current-time' has to be overriden in tests. (if org-timer-timer-is-countdown (- (org-float-time org-timer-start-time) - (org-float-time)) - (- (org-float-time org-timer-pause-time) + (org-float-time (current-time))) + (- (org-float-time (or org-timer-pause-time (current-time))) (org-float-time org-timer-start-time)))) ;;;###autoload diff --git a/lisp/org.el b/lisp/org.el index 4749e945b..c852a8015 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16494,7 +16494,10 @@ user." (defun org-read-date-analyze (ans org-def org-defdecode) "Analyze the combined answer of the date prompt." ;; FIXME: cleanup and comment - (let ((nowdecode (decode-time)) + ;; Pass `current-time' result to `decode-time' (instead of calling + ;; without arguments) so that only `current-time' has to be + ;; overriden in tests. + (let ((nowdecode (decode-time (current-time))) delta deltan deltaw deltadef year month day hour minute second wday pm h2 m2 tl wday1 iso-year iso-weekday iso-week iso-year iso-date futurep kill-year) @@ -16652,7 +16655,10 @@ user." (deltan (setq futurep nil) (unless deltadef - (let ((now (decode-time))) + ;; Pass `current-time' result to `decode-time' (instead of + ;; calling without arguments) so that only `current-time' has + ;; to be overriden in tests. + (let ((now (decode-time (current-time)))) (setq day (nth 3 now) month (nth 4 now) year (nth 5 now)))) (cond ((member deltaw '("d" "")) (setq day (+ day deltan))) ((equal deltaw "w") (setq day (+ day (* 7 deltan)))) From 6873c9088b90472107a384ff816a119c44a343b1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 28 Oct 2014 20:21:06 -0700 Subject: [PATCH 03/24] Backport commit 78d45b6 from Emacs master branch * lisp/org-compat.el (org-float-time): Use 2-arg defalias, since XEmacs 21.4 doesn't support 3-arg. Port current-time change to XEmacs 21.4. 78d45b66d41859ab9bdd571fea18fc06a7670911 Paul Eggert Tue Oct 28 20:21:06 2014 -0700 --- lisp/org-compat.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 7a22fcf7a..decf76dbd 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -412,9 +412,7 @@ Pass BUFFER to the XEmacs version of `move-to-column'." (set-mouse-position frame (1- (frame-width frame)) 0))))) (defalias 'org-float-time - (if (featurep 'xemacs) 'time-to-seconds 'float-time) - "Convert time value TIME to a floating point number. -TIME defaults to the current time.") + (if (featurep 'xemacs) 'time-to-seconds 'float-time)) ;; `user-error' is only available from 24.2.50 on (unless (fboundp 'user-error) From bf75f1bff8becfaf2583fbdf22092925b509c2dc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 Nov 2014 19:15:41 -0800 Subject: [PATCH 04/24] Backport commit 02073b2 from Emacs master branch * doc/misc/org.texi (The date/time prompt, Matching tags and properties): Use leading zero with 24-hour times less than 10:00. Fix some 24-hour time stamps in documentation. 02073b2e84022ff9c9b76d58061e9aa810056229 Paul Eggert Thu Nov 13 19:16:15 2014 -0800 --- doc/org.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index ea91df364..3a871a3e6 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -5947,7 +5947,7 @@ sep 15 @result{} @b{2006}-09-15 feb 15 @result{} @b{2007}-02-15 sep 12 9 @result{} 2009-09-12 12:45 @result{} @b{2006}-@b{06}-@b{13} 12:45 -22 sept 0:34 @result{} @b{2006}-09-22 0:34 +22 sept 0:34 @result{} @b{2006}-09-22 00:34 w4 @result{} ISO week for of the current year @b{2006} 2012 w4 fri @result{} Friday of ISO week 4 in 2012 2012-w04-5 @result{} Same as above @@ -8120,7 +8120,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are assumed to be date/time specifications in the standard Org way, and the comparison will be done accordingly. Special values that will be recognized are @code{""} for now (including time), and @code{""}, and -@code{""} for these days at 0:00 hours, i.e., without a time +@code{""} for these days at 00:00 hours, i.e., without a time specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units @code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, respectively, can be used. From bfbc2bb304c2cf33a2218e7aeb4f2584a22ad523 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 9 Dec 2014 16:26:46 -0800 Subject: [PATCH 05/24] Backport commit cc857dd from Emacs master branch Fix misspellings like "an unibyte buffer" cc857dd0db0fad257747134bdbd8318a21d12cab Paul Eggert Tue Dec 9 16:27:23 2014 -0800 --- lisp/org.el | 2 +- lisp/ox-ascii.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index c852a8015..3155c5a5b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20358,7 +20358,7 @@ This command does many different things, depending on context: (item ;; At an item: a double C-u set checkbox to "[-]" ;; unconditionally, whereas a single one will toggle its - ;; presence. Without an universal argument, if the item + ;; presence. Without a universal argument, if the item ;; has a checkbox, toggle it. Otherwise repair the list. (let* ((box (org-element-property :checkbox context)) (struct (org-element-property :structure context)) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 7e24f903a..ff2f26de7 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -185,7 +185,7 @@ original Org buffer at the same place." :package-version '(Org . "8.0") :type '(choice (const :tag "Replicate original spacing" nil) - (cons :tag "Set an uniform spacing" + (cons :tag "Set a uniform spacing" (integer :tag "Number of blank lines before contents") (integer :tag "Number of blank lines after contents")))) From 81272053cd8e694fcf26435f1f0c50eb193d7b26 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 13 Dec 2014 23:40:04 -0800 Subject: [PATCH 06/24] Backport commit 3de474e from Emacs master branch Spelling fixes 3de474e4ac7418d06b9f37489f939a16d9bde1c2 Paul Eggert Sat Dec 13 23:41:33 2014 -0800 --- lisp/org-table.el | 2 +- lisp/org.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index 30a66c9c2..1b6a4089f 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2351,7 +2351,7 @@ For all numbers larger than LIMIT, shift them by DELTA." (string-match "^[a-zA-Z][_a-zA-Z0-9]*$" field)) (push (cons field v) org-table-local-parameters) (push (list field line col) org-table-named-field-locations)))) - ;; Analyse the line types + ;; Analyze the line types. (goto-char beg) (setq org-table-current-begin-line (org-current-line) org-table-current-begin-pos (point) diff --git a/lisp/org.el b/lisp/org.el index 3155c5a5b..7faea3de7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19158,7 +19158,7 @@ BEG and END default to the buffer boundaries." (org-defkey org-mode-map "\C-c\M-f" 'org-next-block) (org-defkey org-mode-map "\C-c\M-b" 'org-previous-block) (org-defkey org-mode-map "\C-c$" 'org-archive-subtree) -(org-defkey org-mode-map "\C-c\C-x\C-s" 'org-advertized-archive-subtree) +(org-defkey org-mode-map "\C-c\C-x\C-s" 'org-archive-subtree) (org-defkey org-mode-map "\C-c\C-x\C-a" 'org-archive-subtree-default) (org-defkey org-mode-map "\C-c\C-xd" 'org-insert-drawer) (org-defkey org-mode-map "\C-c\C-xa" 'org-toggle-archive-tag) @@ -20953,7 +20953,7 @@ on context. See the individual commands for more information." ("Archive" ["Archive (default method)" org-archive-subtree-default (org-in-subtree-not-table-p)] "--" - ["Move Subtree to Archive file" org-advertized-archive-subtree (org-in-subtree-not-table-p)] + ["Move Subtree to Archive file" org-archive-subtree (org-in-subtree-not-table-p)] ["Toggle ARCHIVE tag" org-toggle-archive-tag (org-in-subtree-not-table-p)] ["Move subtree to Archive sibling" org-archive-to-archive-sibling (org-in-subtree-not-table-p)] ) From 72416b82ac9bf0ed9ad60d693c8ffeb8e5c65df1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 25 Dec 2014 18:07:15 -0800 Subject: [PATCH 07/24] Backport commit 7aa506e from Emacs master branch Spelling fixes 7aa506eed8881788485a9774165454404bac2623 Paul Eggert Thu Dec 25 18:08:47 2014 -0800 --- lisp/org-ctags.el | 8 ++++---- lisp/ox-html.el | 2 +- lisp/ox-latex.el | 2 +- lisp/ox-publish.el | 2 +- lisp/ox.el | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el index 41775bdab..faf543be1 100644 --- a/lisp/org-ctags.el +++ b/lisp/org-ctags.el @@ -63,19 +63,19 @@ ;; with the same name as the link; then, if unsuccessful, ask the user if ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if ;; the user wishes to append 'tag' as a new toplevel heading at the end of -;; the buffer; and finally, defer to org's default behaviour which is to +;; the buffer; and finally, defer to org's default behavior which is to ;; search the entire text of the current buffer for 'tag'. ;; -;; This behaviour can be modified by changing the value of +;; This behavior can be modified by changing the value of ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my -;; .emacs, which describes the same behaviour as the above paragraph with +;; .emacs, which describes the same behavior as the above paragraph with ;; one difference: ;; ;; (setq org-ctags-open-link-functions ;; '(org-ctags-find-tag ;; org-ctags-ask-rebuild-tags-file-then-find-tag ;; org-ctags-ask-append-topic -;; org-ctags-fail-silently)) ; <-- prevents org default behaviour +;; org-ctags-fail-silently)) ; <-- prevents org default behavior ;; ;; ;; Usage diff --git a/lisp/ox-html.el b/lisp/ox-html.el index b6a3a7e4f..014a6e7ad 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -581,7 +581,7 @@ The function must accept two parameters: The function should return the string to be exported. For example, the variable could be set to the following function -in order to mimic default behaviour: +in order to mimic default behavior: The default value simply returns the value of CONTENTS." :group 'org-export-html diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 2c71f7d78..f6f3b220b 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -589,7 +589,7 @@ The function must accept six parameters: The function should return the string to be exported. For example, the variable could be set to the following function -in order to mimic default behaviour: +in order to mimic default behavior: \(defun org-latex-format-inlinetask \(todo type priority name tags contents\) \"Format an inline task element for LaTeX export.\" diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 180764ee6..771aa00f4 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -228,7 +228,7 @@ If you create a site-map file, adjust the sorting like this: `:sitemap-sort-files' The site map is normally sorted alphabetically. You can - change this behaviour setting this to `anti-chronologically', + change this behavior setting this to `anti-chronologically', `chronologically', or nil. `:sitemap-ignore-case' diff --git a/lisp/ox.el b/lisp/ox.el index 72cf4006b..56d0a9f8b 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -493,7 +493,7 @@ t Allow export of math snippets." "The last level which is still exported as a headline. Inferior levels will usually produce itemize or enumerate lists -when exported, but back-end behaviour may differ. +when exported, but back-end behavior may differ. This option can also be set with the OPTIONS keyword, e.g. \"H:2\"." @@ -1736,13 +1736,13 @@ Assume buffer is in Org mode. Narrowing, if any, is ignored." (t ;; Options in `org-export-options-alist'. (dolist (property (funcall find-properties key)) - (let ((behaviour (nth 4 (assq property options)))) + (let ((behavior (nth 4 (assq property options)))) (setq plist (plist-put plist property ;; Handle value depending on specified ;; BEHAVIOR. - (case behaviour + (case behavior (space (if (not (plist-get plist property)) (org-trim val) From a55b5a4269e3d63bbf9b2264a92a50865da79929 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 29 Dec 2014 12:37:53 -0800 Subject: [PATCH 08/24] Backport commit f9acac7 from Emacs master branch * lisp/org-clock.el (org-clock-save): Prefer (system-name) to system-name, and avoid naming locals 'system-name'. system-name's returned value can vary f9acac751d4cd22480e62cc63936b1208ca9fe48 Paul Eggert Mon Dec 29 12:38:58 2014 -0800 --- lisp/org-clock.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index e8fababfb..760b9a41d 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2813,8 +2813,8 @@ The details of what will be saved are regulated by the variable (delete-region (point-min) (point-max)) ;;Store clock (insert (format ";; org-persist.el - %s at %s\n" - system-name (format-time-string - (cdr org-time-stamp-formats)))) + (system-name) (format-time-string + (cdr org-time-stamp-formats)))) (if (and (memq org-clock-persist '(t clock)) (setq b (org-clocking-buffer)) (setq b (or (buffer-base-buffer b) b)) From d81e6b52b7a02bb3401f2f17dedc746b63eeecc7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 28 May 2014 23:45:29 -0400 Subject: [PATCH 09/24] Backport commit 6711a21 from Emacs master branch * lisp/org-compat.el (org-font-lock-ensure): New function. * lisp/ox-odt.el (org-odt-do-format-code): * lisp/ox-html.el (org-html-fontify-code): * lisp/org.el (org-fontify-like-in-org-mode): * lisp/org-src.el (org-src-font-lock-fontify-block): * lisp/org-clock.el (org-clock-get-clocktable): Use it. * lisp/ox-org.el (org-org-publish-to-org): Use it. Avoid using find-file from Elisp. 6711a21f1125c0047c56eb266eb374c1ec90a967 Stefan Monnier Wed May 28 23:45:29 2014 -0400 --- lisp/org-clock.el | 2 +- lisp/org-compat.el | 5 +++++ lisp/org-src.el | 2 +- lisp/org.el | 2 +- lisp/ox-html.el | 2 +- lisp/ox-odt.el | 2 +- lisp/ox-org.el | 15 +++++++++------ 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 760b9a41d..5b8243f8d 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1929,7 +1929,7 @@ fontified, and then returned." (org-mode) (org-create-dblock props) (org-update-dblock) - (font-lock-fontify-buffer) + (org-font-lock-ensure) (forward-line 2) (buffer-substring (point) (progn (re-search-forward "^[ \t]*#\\+END" nil t) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index decf76dbd..be1141d1f 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -474,6 +474,11 @@ LIMIT." (looking-at (concat "\\(?:" regexp "\\)\\'"))))) (not (null pos))))) +(defalias 'org-font-lock-ensure + (if (fboundp 'org-font-lock-ensure) + #'font-lock-ensure + (lambda (_beg _end) (font-lock-fontify-buffer)))) + (defun org-floor* (x &optional y) "Return a list of the floor of X and the fractional part of X. With two arguments, return floor and remainder of their quotient." diff --git a/lisp/org-src.el b/lisp/org-src.el index 618ed9fb3..e31a39a6e 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -921,7 +921,7 @@ fontification of code blocks see `org-src-fontify-block' and (delete-region (point-min) (point-max)) (insert string " ") ;; so there's a final property change (unless (eq major-mode lang-mode) (funcall lang-mode)) - (font-lock-fontify-buffer) + (org-font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (put-text-property diff --git a/lisp/org.el b/lisp/org.el index 7faea3de7..c2a5875f6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6371,7 +6371,7 @@ needs to be inserted at a specific position in the font-lock sequence.") (insert s) (let ((org-odd-levels-only odd-levels)) (org-mode) - (font-lock-fontify-buffer) + (org-font-lock-ensure) (buffer-string)))) (defvar org-m nil) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 014a6e7ad..c952a826d 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1855,7 +1855,7 @@ is the language used for CODE, as a string, or nil." (funcall lang-mode) (insert code) ;; Fontify buffer. - (font-lock-fontify-buffer) + (org-font-lock-ensure) ;; Remove formatting on newline characters. (save-excursion (let ((beg (point-min)) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 95e73f540..4ccef1ad7 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -3139,7 +3139,7 @@ and prefix with \"OrgSrc\". For example, (with-temp-buffer (insert code) (funcall lang-mode) - (font-lock-fontify-buffer) + (org-font-lock-ensure) (buffer-string)))) (fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string 'org-odt--encode-plain-text)) diff --git a/lisp/ox-org.el b/lisp/ox-org.el index 195b9d765..4bee45ab0 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -251,12 +251,13 @@ Return output file name." (html-ext (concat "." (or (plist-get plist :html-extension) org-html-extension "html"))) (visitingp (find-buffer-visiting filename)) - (work-buffer (or visitingp (find-file filename))) + (work-buffer (or visitingp (find-file-noselect filename))) newbuf) - (font-lock-fontify-buffer) - (show-all) - (org-show-block-all) - (setq newbuf (htmlize-buffer)) + (with-current-buffer work-buffer + (org-font-lock-ensure) + (show-all) + (org-show-block-all) + (setq newbuf (htmlize-buffer))) (with-current-buffer newbuf (when org-org-htmlized-css-url (goto-char (point-min)) @@ -265,10 +266,12 @@ Return output file name." (replace-match (format "" - org-org-htmlized-css-url) t t))) + org-org-htmlized-css-url) + t t))) (write-file (concat pub-dir (file-name-nondirectory filename) html-ext))) (kill-buffer newbuf) (unless visitingp (kill-buffer work-buffer))) + ;; FIXME: Why? Which buffer is this supposed to apply to? (set-buffer-modified-p nil))) From c115c7b4e86b68fe4f903636252a8b22b46a044f Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 26 Jul 2015 23:29:14 -0400 Subject: [PATCH 10/24] org-compat: Use different font-lock-ensure alias * lisp/org-compat.el (org-font-lock-ensure): Remove in favor of font-lock-ensure alias from dcbaebc. Instead of org-font-lock-ensure alias introduced in dcbaebc ("Backport commit 6711a21 from Emacs master branch", 2014-05-28), use font-lock-ensure alias added in e6883dd ("org-compat: Provide compatibility definition for font-lock-ensure", 2014-06-01). --- lisp/org-clock.el | 2 +- lisp/org-compat.el | 9 ++++----- lisp/org-src.el | 2 +- lisp/org.el | 2 +- lisp/ox-html.el | 2 +- lisp/ox-odt.el | 2 +- lisp/ox-org.el | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 5b8243f8d..b239e848f 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1929,7 +1929,7 @@ fontified, and then returned." (org-mode) (org-create-dblock props) (org-update-dblock) - (org-font-lock-ensure) + (font-lock-ensure) (forward-line 2) (buffer-substring (point) (progn (re-search-forward "^[ \t]*#\\+END" nil t) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index be1141d1f..77366b3db 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -418,6 +418,10 @@ Pass BUFFER to the XEmacs version of `move-to-column'." (unless (fboundp 'user-error) (defalias 'user-error 'error)) +;; `font-lock-ensure' is only available from 24.4.50 on +(unless (fboundp 'font-lock-ensure) + (defalias 'font-lock-ensure 'font-lock-fontify-buffer)) + (defmacro org-no-popups (&rest body) "Suppress popup windows. Let-bind some variables to nil around BODY to achieve the desired @@ -474,11 +478,6 @@ LIMIT." (looking-at (concat "\\(?:" regexp "\\)\\'"))))) (not (null pos))))) -(defalias 'org-font-lock-ensure - (if (fboundp 'org-font-lock-ensure) - #'font-lock-ensure - (lambda (_beg _end) (font-lock-fontify-buffer)))) - (defun org-floor* (x &optional y) "Return a list of the floor of X and the fractional part of X. With two arguments, return floor and remainder of their quotient." diff --git a/lisp/org-src.el b/lisp/org-src.el index e31a39a6e..3619e8077 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -921,7 +921,7 @@ fontification of code blocks see `org-src-fontify-block' and (delete-region (point-min) (point-max)) (insert string " ") ;; so there's a final property change (unless (eq major-mode lang-mode) (funcall lang-mode)) - (org-font-lock-ensure) + (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (put-text-property diff --git a/lisp/org.el b/lisp/org.el index c2a5875f6..9e66b0e96 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6371,7 +6371,7 @@ needs to be inserted at a specific position in the font-lock sequence.") (insert s) (let ((org-odd-levels-only odd-levels)) (org-mode) - (org-font-lock-ensure) + (font-lock-ensure) (buffer-string)))) (defvar org-m nil) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index c952a826d..29593878c 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1855,7 +1855,7 @@ is the language used for CODE, as a string, or nil." (funcall lang-mode) (insert code) ;; Fontify buffer. - (org-font-lock-ensure) + (font-lock-ensure) ;; Remove formatting on newline characters. (save-excursion (let ((beg (point-min)) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 4ccef1ad7..941fa5333 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -3139,7 +3139,7 @@ and prefix with \"OrgSrc\". For example, (with-temp-buffer (insert code) (funcall lang-mode) - (org-font-lock-ensure) + (font-lock-ensure) (buffer-string)))) (fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string 'org-odt--encode-plain-text)) diff --git a/lisp/ox-org.el b/lisp/ox-org.el index 4bee45ab0..a9b197249 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -254,7 +254,7 @@ Return output file name." (work-buffer (or visitingp (find-file-noselect filename))) newbuf) (with-current-buffer work-buffer - (org-font-lock-ensure) + (font-lock-ensure) (show-all) (org-show-block-all) (setq newbuf (htmlize-buffer))) From fcce57324de0628c482209cf01bfb7517f289b64 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 9 Jun 2014 22:20:31 -0400 Subject: [PATCH 11/24] Backport commit 2999341 from Emacs master branch Add .info extension to @setfilename commands in doc 29993416fb4d19c1c3bb146367fc4bed74845486 Glenn Morris Mon Jun 9 22:20:31 2014 -0400 --- doc/org.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/org.texi b/doc/org.texi index 3a871a3e6..2cfc1bd36 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -1,6 +1,6 @@ \input texinfo @c -*- coding: utf-8 -*- @c %**start of header -@setfilename ../../info/org +@setfilename ../../info/org.info @settitle The Org Manual @include org-version.inc From d77b7c6c7b6184ace641c28de0da2df496136011 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Sun, 22 Jun 2014 09:43:58 +0400 Subject: [PATCH 12/24] Backport commit 9c3883b from Emacs master branch * lisp/org-mouse.el (org-mouse-do-remotely): Prefer point-marker to copy-marker of point. * lisp/ob-core.el (org-babel-insert-result): Prefer point-min-marker and point-max-marker. Conflicts: lisp/org-mouse.el --- lisp/ob-core.el | 4 ++-- lisp/org-mouse.el | 4 ++-- lisp/org-table.el | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index a6ffcc48b..c995b6ea4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2043,8 +2043,8 @@ code ---- the results are extracted in the syntax of the source t info hash indent))) (results-switches (cdr (assoc :results_switches (nth 2 info)))) - (visible-beg (copy-marker (point-min))) - (visible-end (copy-marker (point-max))) + (visible-beg (point-min-marker)) + (visible-end (point-max-marker)) ;; When results exist outside of the current visible ;; region of the buffer, be sure to widen buffer to ;; update them. diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 74046c73f..718f34667 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -1008,7 +1008,7 @@ This means, between the beginning of line and the point." (let ((endmarker (with-current-buffer buffer (org-end-of-subtree nil t) (unless (eobp) (forward-char 1)) - (copy-marker (point))))) + (point-marker)))) (org-with-remote-undo buffer (with-current-buffer buffer (widen) @@ -1018,7 +1018,7 @@ This means, between the beginning of line and the point." (and (outline-next-heading) (org-flag-heading nil))) ; show the next heading (org-back-to-heading) - (setq marker (copy-marker (point))) + (setq marker (point-marker)) (goto-char (max (point-at-bol) (- (point-at-eol) anticol))) (funcall command) (message "_cmd: %S" org-mouse-cmd) diff --git a/lisp/org-table.el b/lisp/org-table.el index 1b6a4089f..8c9a83d88 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3183,9 +3183,9 @@ with the prefix ARG." (save-excursion ;; Insert a temporary formula at right after the table (goto-char (org-table-TBLFM-begin)) - (setq s (set-marker (make-marker) (point))) + (setq s (point-marker)) (insert (concat formula "\n")) - (setq e (set-marker (make-marker) (point))) + (setq e (point-marker)) ;; Recalculate the table (beginning-of-line 0) ; move to the inserted line (skip-chars-backward " \r\n\t") From bb77dd2e881e59539209e105da76598f56fc8900 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 1 Jan 2015 14:26:41 -0800 Subject: [PATCH 13/24] Backport commit 7e09ef0 from Emacs master branch Update copyright year to 2015 7e09ef09a479731d01b1ca46e94ddadd73ac98e3 Paul Eggert Thu Jan 1 14:26:41 2015 -0800 --- doc/orgcard.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/orgcard.tex b/doc/orgcard.tex index cf1e309be..2a0fbb2d9 100644 --- a/doc/orgcard.tex +++ b/doc/orgcard.tex @@ -17,7 +17,7 @@ \pdflayout=(0l) % Nothing else needs to be changed below this line. -% Copyright (C) 1987, 1993, 1996-1997, 2001-2014 Free Software +% Copyright (C) 1987, 1993, 1996-1997, 2001-2015 Free Software % Foundation, Inc. % This file is part of GNU Emacs. From 3935f05990a837a195253dfae23c0c08935f123d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 1 Jan 2015 14:27:34 -0800 Subject: [PATCH 14/24] Backport commit 52a4e87 from Emacs master branch Fix copyright years by hand 52a4e87c630ea397408efe4f8486be55e1199905 Paul Eggert --- doc/org.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 2cfc1bd36..e428972dc 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -259,7 +259,7 @@ @copying This manual is for Org version @value{VERSION}. -Copyright @copyright{} 2004--2014 Free Software Foundation, Inc. +Copyright @copyright{} 2004--2015 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -12952,7 +12952,7 @@ Copyright information is printed on the back of the title page. This is a short example of a complete Texinfo file, version 1.0. - Copyright \copy 2014 Free Software Foundation, Inc. + Copyright \copy 2015 Free Software Foundation, Inc. @end example @subsubheading The Top node From 0ee18fcf48a1b66ddb42f118f7b3233138e0fc18 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Mar 2015 16:55:02 -0700 Subject: [PATCH 15/24] Backport commit 41278b7 from Emacs master branch Spacing and punctuation fixes 41278b775bd3ebc213ff8b9eda2f2c04a5354bba Paul Eggert Tue Mar 17 16:56:21 2015 -0700 --- doc/org.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index e428972dc..30957e9f5 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -891,7 +891,7 @@ Recent Emacs distributions include a packaging system which lets you install Elisp libraries. You can install Org with @kbd{M-x package-install RET org}. @noindent @b{Important}: you need to do this in a session where no @code{.org} file has -been visited, i.e. where no Org built-in function have been loaded. +been visited, i.e., where no Org built-in function have been loaded. Otherwise autoload Org functions will mess up the installation. Then, to make sure your Org configuration is taken into account, initialize @@ -10442,7 +10442,7 @@ You can change the default state of this option by setting @item C-v Toggle visible-only export. Only export the text that is currently -visible, i.e. not hidden by outline visibility in the buffer. +visible, i.e., not hidden by outline visibility in the buffer. @end table @@ -12101,7 +12101,7 @@ Internet-style links for all other links. A link with no description and destined to a regular (un-itemized) outline heading is replaced with a cross-reference and section number of the heading. -A @samp{\ref@{label@}}-style reference to an image, table etc. is replaced +A @samp{\ref@{label@}}-style reference to an image, table etc.@: is replaced with a cross-reference and sequence number of the labeled entity. @xref{Labels and captions in ODT export}. @@ -13408,7 +13408,7 @@ from it (e.g., @code{beamer}). This is obviously the most powerful customization, since the changes happen at the parser level. Indeed, some export back-ends are built as extensions -of other ones (e.g. Markdown back-end an extension of HTML back-end). +of other ones (e.g., Markdown back-end an extension of HTML back-end). Extending a back-end means that if an element type is not transcoded by the new back-end, it will be handled by the original one. Hence you can extend From 0cec91d0392c06cc6504b1cbd63d0a8fd3974789 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 5 Apr 2015 23:40:54 -0700 Subject: [PATCH 16/24] Backport commit b884ff3 from Emacs master branch Spelling fix for 'hfy-optimizations' b884ff380dc341ca8dc8fcfe4357110e191216ce Paul Eggert Sun Apr 5 23:43:22 2015 -0700 --- lisp/ox-odt.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 941fa5333..0324540ba 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -262,7 +262,8 @@ This style is much the same as that of \"OrgFixedWidthBlock\" except that the foreground and background colors are set according to the default face identified by the `htmlfontify'.") -(defvar hfy-optimisations) +(defvar hfy-optimizations) +(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "25.1") (defvar org-odt-embedded-formulas-count 0) (defvar org-odt-embedded-images-count 0) (defvar org-odt-image-size-probe-method @@ -3116,8 +3117,8 @@ and prefix with \"OrgSrc\". For example, (" " "") (" " ""))) (hfy-face-to-css 'org-odt-hfy-face-to-css) - (hfy-optimisations-1 (copy-sequence hfy-optimisations)) - (hfy-optimisations (add-to-list 'hfy-optimisations-1 + (hfy-optimizations-1 (copy-sequence hfy-optimizations)) + (hfy-optimizations (add-to-list 'hfy-optimizations-1 'body-text-only)) (hfy-begin-span-handler (lambda (style text-block text-id text-begins-block-p) From c6164293fc8de8f01771034f149fdb0469111cb0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 20 Apr 2015 21:55:00 -0400 Subject: [PATCH 17/24] Backport commit c9a75a4 from Emacs master branch * lisp/org.el (org-insert-heading, org-sort-entries): * lisp/org-mouse.el (org-mouse-end-headline) (org-mouse-context-menu): * lisp/org-clock.el (org-clock-cancel): Add explicit second arg to looking-back. Fix byte-compiler warnings about looking-back. c9a75a4030a556d700fd95222ec0bf4c1a9f67b5 Stefan Monnier Mon Apr 20 21:55:00 2015 -0400 --- lisp/org-clock.el | 3 ++- lisp/org-mouse.el | 4 ++-- lisp/org.el | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index b239e848f..c1edcb503 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1656,7 +1656,8 @@ Optional argument N tells to change by that many units." (save-excursion ; Do not replace this with `with-current-buffer'. (org-no-warnings (set-buffer (org-clocking-buffer))) (goto-char org-clock-marker) - (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*")) + (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*") + (line-beginning-position)) (progn (delete-region (1- (point-at-bol)) (point-at-eol)) (org-remove-empty-drawer-at "LOGBOOK" (point))) (message "Clock gone, cancel the timer anyway") diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 718f34667..3d0ba6b9c 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -191,7 +191,7 @@ Changing this variable requires a restart of Emacs to get activated." (interactive) (end-of-line) (skip-chars-backward "\t ") - (when (org-looking-back ":[A-Za-z]+:") + (when (org-looking-back ":[A-Za-z]+:" (line-beginning-position)) (skip-chars-backward ":A-Za-z") (skip-chars-backward "\t "))) @@ -645,7 +645,7 @@ This means, between the beginning of line and the point." 'org-mode-restart)))) ((or (eolp) (and (looking-at "\\( \\|\t\\)\\(+:[0-9a-zA-Z_:]+\\)?\\( \\|\t\\)+$") - (org-looking-back " \\|\t"))) + (org-looking-back " \\|\t" (- (point) 2)))) (org-mouse-popup-global-menu)) ((funcall get-context :checkbox) (popup-menu diff --git a/lisp/org.el b/lisp/org.el index 9e66b0e96..15196f71c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7683,7 +7683,7 @@ command." (re-search-forward org-outline-regexp-bol) (beginning-of-line 0)) (skip-chars-backward " \r\n") - (and (not (looking-back "^\*+")) + (and (not (looking-back "^\*+" (line-beginning-position))) (looking-at "[ \t]+") (replace-match "")) (unless (eobp) (forward-char 1)) (when (looking-at "^\\*") @@ -8662,7 +8662,8 @@ links." (when (equal (marker-buffer org-clock-marker) (current-buffer)) (save-excursion (goto-char org-clock-marker) - (looking-back "^.*") (match-string-no-properties 0)))) + (buffer-substring-no-properties (line-beginning-position) + (point))))) start beg end stars re re2 txt what tmp) ;; Find beginning and end of region to sort From 961cf22823d55e88c013765d3b054ab045f69823 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 11 Apr 2015 07:47:25 -0700 Subject: [PATCH 18/24] Backport commit 279558f from Emacs master branch Minor quoting etc. fixes to misc manuals 279558f472246dd19864f4175cb1d6061bc1ed92 Paul Eggert --- doc/org.texi | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 30957e9f5..fc1476c4c 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -1053,7 +1053,7 @@ is not necessary. In that case it is sufficient to start Emacs as shown below. @lisp -;;; Minimal setup to load latest `org-mode' +;;; Minimal setup to load latest 'org-mode' ;; activate debugging (setq debug-on-error t @@ -2356,7 +2356,7 @@ Fields that are wider become clipped and end in the string @samp{=>}. Note that the full text is still in the buffer but is hidden. To see the full text, hold the mouse over the field---a tool-tip window will show the full content. To edit such a field, use the command -@kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will +@kbd{C-c `} (that is @kbd{C-c} followed by the grave accent). This will open a new window with the full field. Edit it and finish with @kbd{C-c C-c}. @@ -2770,7 +2770,7 @@ It is also possible to write a formula in Emacs Lisp. This can be useful for string manipulation and control structures, if Calc's functionality is not enough. -If a formula starts with a single-quote followed by an opening parenthesis, +If a formula starts with an apostrophe followed by an opening parenthesis, then it is evaluated as a Lisp form. The evaluation should return either a string or a number. Just as with @file{calc} formulas, you can specify modes and a printf format after a semicolon. @@ -6330,7 +6330,8 @@ you stop working on that task, or when you mark the task done, the clock is stopped and the corresponding time interval is recorded. It also computes the total time spent on each subtree@footnote{Clocking only works if all headings are indented with less than 30 stars. This is a hardcoded -limitation of `lmax' in `org-clock-sum'.} of a project. And it remembers a +limitation of @code{lmax} in @code{org-clock-sum}.} of a project. And it +remembers a history or tasks recently clocked, to that you can jump quickly between a number of tasks absorbing your time. @@ -10310,14 +10311,14 @@ macro, they are removed again (depending on the variable @code{cdlatex-simplify-sub-super-scripts}). @item @kindex ` -Pressing the backquote @kbd{`} followed by a character inserts math +Pressing the grave accent @kbd{`} followed by a character inserts math macros, also outside @LaTeX{} fragments. If you wait more than 1.5 seconds -after the backquote, a help window will pop up. +after the grave accent, a help window will pop up. @item @kindex ' -Pressing the single-quote @kbd{'} followed by another character modifies +Pressing the apostrophe @kbd{'} followed by another character modifies the symbol before point with an accent or a font. If you wait more than -1.5 seconds after the single-quote, a help window will pop up. Character +1.5 seconds after the apostrophe, a help window will pop up. Character modification will work only inside @LaTeX{} fragments; outside the quote is normal. @end itemize @@ -12190,7 +12191,7 @@ You can control the size and scale of the embedded images using the The exporter specifies the desired size of the image in the final document in units of centimeters. In order to scale the embedded images, the exporter queries for pixel dimensions of the images using one of a) ImageMagick's -@file{identify} program or b) Emacs `create-image' and `image-size' +@file{identify} program or b) Emacs @code{create-image} and @code{image-size} APIs@footnote{Use of @file{ImageMagick} is only desirable. However, if you routinely produce documents that have large images or you export your Org files that has images using a Emacs batch script, then the use of @@ -13388,9 +13389,9 @@ the Org buffer and get them translated into @LaTeX{} without using the @lisp @group (defun my-latex-filter-nobreaks (text backend info) - "Ensure \" \" are properly handled in LaTeX export." + "Ensure \"_\" are properly handled in LaTeX export." (when (org-export-derived-backend-p backend 'latex) - (replace-regexp-in-string " " "~" text))) + (replace-regexp-in-string "_" "~" text))) (add-to-list 'org-export-filter-plain-text-functions 'my-latex-filter-nobreaks) @@ -15728,7 +15729,7 @@ process. For example, compare the following two blocks: : bye @end example -In non-session mode, the `2' is not printed and does not appear. +In non-session mode, the ``2'' is not printed and does not appear. @example #+BEGIN_SRC python :results output :session @@ -15743,8 +15744,8 @@ In non-session mode, the `2' is not printed and does not appear. : bye @end example -But in @code{:session} mode, the interactive interpreter receives input `2' -and prints out its value, `2'. (Indeed, the other print statements are +But in @code{:session} mode, the interactive interpreter receives input ``2'' +and prints out its value, ``2''. (Indeed, the other print statements are unnecessary here). @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code @@ -17812,8 +17813,8 @@ scheduled, and clocking, and any additional properties defined in the entry. The return value is an alist. Keys may occur multiple times if the property key was used several times.@* POM may also be @code{nil}, in which case the current entry is used. -If WHICH is @code{nil} or `all', get all properties. If WHICH is -`special' or `standard', only get that subclass. +If WHICH is @code{nil} or @code{all}, get all properties. If WHICH is +@code{special} or @code{standard}, only get that subclass. @end defun @vindex org-use-property-inheritance @findex org-insert-property-drawer From d3df9d203b728c0aa578c8d4bd00bb80bb2addfd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 May 2015 12:05:53 -0700 Subject: [PATCH 19/24] Backport commit c33d89c from Emacs master branch * doc/docstyle.texi: New file, which specifies treatment for grave accent and apostrophe, as well as the document encoding. * doc/org.texi: Use it instead of '@documentencoding UTF-8', to lessen the need for global changes like this in the future. Fix single-quoting style in PDF manuals c33d89cc644f995510b13b951e4201879de2b6f8 Paul Eggert Fri May 1 12:06:38 2015 -0700 --- doc/docstyle.texi | 10 ++++++++++ doc/org.texi | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 doc/docstyle.texi diff --git a/doc/docstyle.texi b/doc/docstyle.texi new file mode 100644 index 000000000..dfd14306b --- /dev/null +++ b/doc/docstyle.texi @@ -0,0 +1,10 @@ +@c Emacs documentation style settings +@documentencoding UTF-8 +@c These two require Texinfo 5.0 or later, so we use the older +@c equivalent @set variables supported in 4.11 and hence +@ignore +@codequotebacktick on +@codequoteundirected on +@end ignore +@set txicodequoteundirected +@set txicodequotebacktick diff --git a/doc/org.texi b/doc/org.texi index fc1476c4c..acc0bf5f8 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -2,6 +2,7 @@ @c %**start of header @setfilename ../../info/org.info @settitle The Org Manual +@include docstyle.texi @include org-version.inc @@ -11,7 +12,6 @@ @set MAINTAINER Carsten Dominik @set MAINTAINEREMAIL @email{carsten at orgmode dot org} @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer} -@documentencoding UTF-8 @c %**end of header @finalout From 9347da11bf6c0383186dab9d66ebde935402ae7d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 May 2015 12:57:44 -0700 Subject: [PATCH 20/24] Backport commit 08782a2 from Emacs master branch Prefer plain characters to Texinfo circumlocutions 08782a2ea95dec5662954a1de353a7da699ac339 Paul Eggert Fri May 1 12:58:53 2015 -0700 --- doc/org.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/org.texi b/doc/org.texi index acc0bf5f8..b5d91af55 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -18485,7 +18485,7 @@ enabled source code highlighting in Gnus. Max-Planck-Institute for Neurology. He also inspired the creation of a concept index for HTML export. @item -@i{J@"urgen Vollmer} contributed code generating the table of contents +@i{Jürgen Vollmer} contributed code generating the table of contents in HTML output. @item @i{Samuel Wales} has provided important feedback and bug reports. From 9dcbe163ccc20f59d3b91e0801b40b85d1f8e530 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 19 May 2015 14:59:15 -0700 Subject: [PATCH 21/24] Backport commit 9d35bb8 from Emacs master branch * lisp/org-compat.el (org-number-sequence): * lisp/org.el (org-remove-highlights-with-change) (org-structure-template-alist): * lisp/ox-html.el (org-html-link-org-files-as-html): Fix minor quoting problems in doc strings, e.g., missing quote, ``x'' where `x' was meant, etc. Fix minor quoting problems in doc strings 9d35bb8d6518bb913ab08bace2af08963c003177 Paul Eggert Tue May 19 15:01:16 2015 -0700 --- lisp/org-bbdb.el | 2 +- lisp/org-compat.el | 2 +- lisp/org.el | 4 ++-- lisp/ox-html.el | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index cfd5b3b6a..78f9b7118 100644 --- a/lisp/org-bbdb.el +++ b/lisp/org-bbdb.el @@ -37,7 +37,7 @@ ;; the diary using bbdb-anniv.el. ;; ;; Put the following in /somewhere/at/home/diary.org and make sure -;; that this file is in `org-agenda-files` +;; that this file is in `org-agenda-files'. ;; ;; %%(org-bbdb-anniversaries) ;; diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 77366b3db..a90d04d28 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -241,7 +241,7 @@ ignored in this case." (or window (selected-window))) (defun org-number-sequence (from &optional to inc) - "Call `number-sequence or emulate it." + "Call `number-sequence' or emulate it." (if (fboundp 'number-sequence) (number-sequence from to inc) (if (or (not to) (= from to)) diff --git a/lisp/org.el b/lisp/org.el index 15196f71c..37f3d2622 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1452,7 +1452,7 @@ changed by an edit command." (defcustom org-remove-highlights-with-change t "Non-nil means any change to the buffer will remove temporary highlights. Such highlights are created by `org-occur' and `org-clock-display'. -When nil, `C-c C-c needs to be used to get rid of the highlights. +When nil, `C-c C-c' needs to be used to get rid of the highlights. The highlights created by `org-preview-latex-fragment' always need `C-c C-c' to be removed." :group 'org-sparse-trees @@ -12081,7 +12081,7 @@ This is a list of abbreviation keys and values. The value gets inserted if you type `<' followed by the key and then press the completion key, usually `M-TAB'. %file will be replaced by a file name after prompting for the file using completion. The cursor will be placed at the position -of the `?` in the template. +of the `?' in the template. There are two templates for each key, the first uses the original Org syntax, the second uses Emacs Muse-like syntax tags. These Muse-like tags become the default when the /org-mtags.el/ module has been loaded. See also the diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 29593878c..1e4444bc3 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -711,7 +711,7 @@ t Synonym for `mathjax'." When `org-mode' is exporting an `org-mode' file to HTML, links to non-html files are directly put into a href tag in HTML. However, links to other Org-mode files (recognized by the -extension `.org.) should become links to the corresponding html +extension `.org') should become links to the corresponding html file, assuming that the linked `org-mode' file will also be converted to HTML. When nil, the links still point to the plain `.org' file." From 6b04312e85f04219aeaa7c7f9669a51ec2cbec17 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 21 May 2015 10:04:45 -0700 Subject: [PATCH 22/24] Backport commit 96794d2 from Emacs master branch Don't quote nil and t in doc strings 96794d2f97cd064e4c2bf4f71459b42558cc8c79 Paul Eggert Thu May 21 10:06:44 2015 -0700 --- lisp/ob-ruby.el | 2 +- lisp/org-agenda.el | 2 +- lisp/org-capture.el | 2 +- lisp/org-gnus.el | 2 +- lisp/org-macs.el | 2 +- lisp/org-protocol.el | 2 +- lisp/org.el | 12 ++++++------ lisp/ox-odt.el | 4 ++-- lisp/ox-texinfo.el | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el index 5b31247bd..0983486c5 100644 --- a/lisp/ob-ruby.el +++ b/lisp/ob-ruby.el @@ -58,7 +58,7 @@ :type 'string) (defcustom org-babel-ruby-nil-to 'hline - "Replace 'nil' in ruby tables with this before returning." + "Replace nil in ruby tables with this before returning." :group 'org-babel :version "24.4" :package-version '(Org . "8.0") diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 4241f44c9..f5a58b1a8 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6643,7 +6643,7 @@ The modified list may contain inherited tags, and tags matched by LIST is the list of agenda items formatted by `org-agenda-list'. NDAYS is the span of the current agenda view. -TODAYP is `t' when the current agenda view is on today." +TODAYP is t when the current agenda view is on today." (catch 'exit (cond ((not org-agenda-use-time-grid) (throw 'exit list)) ((and todayp (member 'today (car org-agenda-time-grid)))) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 88d7ee5aa..372eabb67 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -201,7 +201,7 @@ properties are: :clock-resume Start the interrupted clock when finishing the capture. Note that :clock-keep has precedence over :clock-resume. - When setting both to `t', the current clock will run and + When setting both to t, the current clock will run and the previous one will not be resumed. :unnarrowed Do not narrow the target buffer, simply show the diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index 785b577f6..9f9d2caeb 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -60,7 +60,7 @@ Normally, this translation is done by querying the IMAP server, which is usually very fast. Unfortunately, some (maybe badly configured) IMAP servers don't support this operation quickly. So if following a link to a Gnus article takes ages, try setting -this variable to `t'." +this variable to t." :group 'org-link-store :version "24.1" :type 'boolean) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 905b0a61f..98cc8cbdc 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -55,7 +55,7 @@ ,@body)) (defmacro org-called-interactively-p (&optional kind) - (declare (debug (&optional ("quote" symbolp)))) ;Why not just `t'? + (declare (debug (&optional ("quote" symbolp)))) ;Why not just t? (if (featurep 'xemacs) `(interactive-p) (if (or (> emacs-major-version 23) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 0c6f2de34..4dfdb6cf6 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -561,7 +561,7 @@ as filename." (let ((fname (expand-file-name (car var)))) (setq fname (org-protocol-check-filename-for-protocol fname (member var flist) client)) - (if (eq fname t) ;; greedy? We need the `t' return value. + (if (eq fname t) ;; greedy? We need the t return value. (progn (ad-set-arg 0 nil) (throw 'greedy t)) diff --git a/lisp/org.el b/lisp/org.el index 37f3d2622..7118e25a8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -595,7 +595,7 @@ XEmacs user should have this variable set to nil, because (defcustom org-loop-over-headlines-in-active-region nil "Shall some commands act upon headlines in the active region? -When set to `t', some commands will be performed in all headlines +When set to t, some commands will be performed in all headlines within the active region. When set to `start-level', some commands will be performed in all @@ -1575,7 +1575,7 @@ See the manual for examples." "Non-nil means Org will display descriptive links. E.g. [[http://orgmode.org][Org website]] will be displayed as \"Org Website\", hiding the link itself and just displaying its -description. When set to `nil', Org will display the full links +description. When set to nil, Org will display the full links literally. You can interactively set the value of this variable by calling @@ -11562,7 +11562,7 @@ go to the location where the last refiling operation has put the subtree. With a numeric prefix argument of `2', refile to the running clock. With a numeric prefix argument of `3', emulate `org-refile-keep' -being set to `t' and copy to the target location, don't move it. +being set to t and copy to the target location, don't move it. Beware that keeping refiled entries may result in duplicated ID properties. @@ -15545,7 +15545,7 @@ and the new value.") (defun org-entry-put (pom property value) "Set PROPERTY to VALUE for entry at point-or-marker POM. -If the value is `nil', it is converted to the empty string. +If the value is nil, it is converted to the empty string. If it is not a string, an error is raised." (cond ((null value) (setq value "")) ((not (stringp value)) @@ -17759,7 +17759,7 @@ If no number is found, the return value is 0." (defcustom org-image-actual-width t "Should we use the actual width of images when inlining them? -When set to `t', always use the image width. +When set to t, always use the image width. When set to a number, use imagemagick (when available) to set the image's width to this value. @@ -17786,7 +17786,7 @@ This requires Emacs >= 24.1, build with imagemagick support." (defcustom org-agenda-inhibit-startup nil "Inhibit startup when preparing agenda buffers. -When this variable is `t', the initialization of the Org agenda +When this variable is t, the initialization of the Org agenda buffers is inhibited: e.g. the visibility state is not set, the tables are not re-aligned, etc." :type 'boolean diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 0324540ba..db14bfe0e 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -847,7 +847,7 @@ TABLE-CELL-STYLE-SELECTOR := `use-first-row-styles' | `use-banding-rows-styles' | `use-banding-columns-styles' | `use-first-row-styles' -ON-OR-OFF := `t' | `nil' +ON-OR-OFF := t | nil For example, with the following configuration @@ -3261,7 +3261,7 @@ contextual information." "Retrieve styles applicable to a table cell. R and C are (zero-based) row and column numbers of the table cell. STYLE-SPEC is an entry in `org-odt-table-styles' -applicable to the current table. It is `nil' if the table is not +applicable to the current table. It is nil if the table is not associated with any style attributes. Return a cons of (TABLE-CELL-STYLE-NAME . PARAGRAPH-STYLE-NAME). diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 37841d776..0f6688539 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -117,7 +117,7 @@ (defcustom org-texinfo-coding-system nil "Default document encoding for Texinfo output. -If `nil' it will default to `buffer-file-coding-system'." +If nil it will default to `buffer-file-coding-system'." :group 'org-export-texinfo :type 'coding-system) From 6df680631177413003b7dbab35bcd1cd7ad38641 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 28 May 2015 00:06:14 -0700 Subject: [PATCH 23/24] Backport commit dfc2ef1 from Emacs master branch Fix minor quoting problems in doc strings dfc2ef11a84d33eab916ff87b8537f8e28c05c92 Paul Eggert Thu May 28 00:22:03 2015 -0700 --- lisp/ob-core.el | 2 +- lisp/org-agenda.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index c995b6ea4..45ecedcc3 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2586,7 +2586,7 @@ block but are passed literally to the \"example-block\"." (defun org-babel-read (cell &optional inhibit-lisp-eval) "Convert the string value of CELL to a number if appropriate. Otherwise if cell looks like lisp (meaning it starts with a -\"(\", \"'\", \"`\" or a \"[\") then read it as lisp, +\"(\", \"'\", \"\\=`\" or a \"[\") then read it as lisp, otherwise return it unmodified as a string. Optional argument NO-LISP-EVAL inhibits lisp evaluation for situations in which is it not appropriate." diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f5a58b1a8..7e786d5a4 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5713,7 +5713,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines', (let ((calendar-date-style 'european) (european-calendar-style t)) (diary-date day month year mark)))) -;; Define the` org-class' function +;; Define the `org-class' function (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks) "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS. DAYNAME is a number between 0 (Sunday) and 6 (Saturday). From fa1a61c2efce905e5d83d4322c44ec9cd8b3b183 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 May 2015 09:43:57 -0700 Subject: [PATCH 24/24] Backport commit 85aa6ed from Emacs master branch Use \r rather than ^M in string literals 85aa6ede9fe1b8165a99a4046dd8262ec93a02d5 Paul Eggert Sat May 30 09:44:38 2015 -0700 --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 7118e25a8..55bc4ce5a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16965,12 +16965,12 @@ Allowed values for TYPE are: When TYPE is nil, fall back on returning a regexp that matches both scheduled and deadline timestamps." - (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: +[^]+0-9> \n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)") + (cond ((eq type 'all) "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: +[^]+0-9>\r\n -]+\\)?\\(?: +[0-9]\\{1,2\\}:[0-9]\\{2\\}\\)?\\)") ((eq type 'active) org-ts-regexp) - ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^ \n>]*?\\)\\]") + ((eq type 'inactive) "\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)\\]") ((eq type 'scheduled) (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>")) ((eq type 'deadline) (concat "\\<" org-deadline-string " *<\\([^>]+\\)>")) - ((eq type 'closed) (concat org-closed-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^ \n>]*?\\)\\]")) + ((eq type 'closed) (concat org-closed-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)\\]")) ((eq type 'scheduled-or-deadline) (concat "\\<\\(?:" org-deadline-string "\\|" org-scheduled-string "\\) *<\\([^>]+\\)>"))))