summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 12:18:00 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 13:56:25 +0200
commit0ac099a6f8f58770c583de450a665be755a95b60 (patch)
treeff35ebaa8be859ae574783cf934991fd4b4cfb50
parenta54dd63e289f0c21ab3d5c01ac026aaf570bd45e (diff)
downloadorg-mode-0ac099a6f8f58770c583de450a665be755a95b60.tar.gz
Remove final parts of XEmacs compatibility code
* lisp/org-compat.el: Declare `org-add-hook', `org-decompose-region', `org-detach-overlay', `org-file-equal-p', `org-float-time', `org-indent-line-to', `org-indent-to-column', `org-looking-at-p', `org-looking-back', `org-propertize', `org-re' and `org-select-frame-set-input-focus' as obsolete. (org-overlay-display, org-overlay-before-string, org-find-overlays): Move to "org.el" (org-xemacs-key-equivalents, org-xemacs-p): Remove variables. (org-region-active-p): Drop XEmacs support. (org-xemacs-without-invisibility): Remove macro. (org-get-x-clipboard-compat): Remove function. * lisp/org-macs.el (org-match-string-no-properties): Remove function. * lisp/ob-core.el: * lisp/org-agenda.el: * lisp/org-archive.el: * lisp/org-clock.el: * lisp/org-colview.el: * lisp/org-crypt.el: * lisp/org-element.el: * lisp/org-faces.el: * lisp/org-feed.el: * lisp/org-footnote.el: * lisp/org-habit.el: * lisp/org-id.el: * lisp/org-indent.el: * lisp/org-inlinetask.el: * lisp/org-lint.el: * lisp/org-list.el: * lisp/org-mouse.el: * lisp/org-pcomplete.el: * lisp/org-src.el: * lisp/org-table.el: * lisp/org-timer.el: * lisp/org.el: * lisp/ox-ascii.el: * lisp/ox-odt.el: * lisp/ox.el: * contrib/lisp/org-notify.el: * contrib/lisp/ox-taskjuggler.el: * contrib/lisp/org-wikinodes.el: * testing/lisp/test-org-src.el: * testing/lisp/test-org.el: Silence byte-compiler.
-rw-r--r--contrib/lisp/org-notify.el4
-rw-r--r--contrib/lisp/org-wikinodes.el2
-rw-r--r--contrib/lisp/ox-taskjuggler.el2
-rw-r--r--lisp/ob-core.el8
-rw-r--r--lisp/org-agenda.el67
-rw-r--r--lisp/org-archive.el4
-rw-r--r--lisp/org-clock.el101
-rw-r--r--lisp/org-colview.el4
-rw-r--r--lisp/org-compat.el277
-rw-r--r--lisp/org-crypt.el4
-rw-r--r--lisp/org-element.el84
-rw-r--r--lisp/org-faces.el6
-rw-r--r--lisp/org-feed.el2
-rw-r--r--lisp/org-footnote.el2
-rw-r--r--lisp/org-habit.el6
-rw-r--r--lisp/org-id.el2
-rw-r--r--lisp/org-indent.el8
-rw-r--r--lisp/org-inlinetask.el6
-rw-r--r--lisp/org-lint.el8
-rw-r--r--lisp/org-list.el12
-rw-r--r--lisp/org-macs.el26
-rw-r--r--lisp/org-mouse.el8
-rw-r--r--lisp/org-pcomplete.el10
-rw-r--r--lisp/org-src.el8
-rw-r--r--lisp/org-table.el32
-rw-r--r--lisp/org-timer.el28
-rw-r--r--lisp/org.el341
-rw-r--r--lisp/ox-ascii.el6
-rw-r--r--lisp/ox-odt.el2
-rw-r--r--lisp/ox.el12
-rw-r--r--testing/lisp/test-org-src.el2
-rw-r--r--testing/lisp/test-org.el42
32 files changed, 457 insertions, 669 deletions
diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index 91b34d3..d0acdec 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -130,7 +130,7 @@ simple timestamp string."
(pr :file (nth org-notify-parse-file (org-agenda-files 'unrestricted)))
(pr :timestamp deadline) (pr :uid (md5 (concat heading deadline)))
(pr :deadline (- (org-time-string-to-seconds deadline)
- (org-float-time))))
+ (float-time))))
result)))
(defun org-notify-todo-list ()
@@ -165,7 +165,7 @@ forgotten tasks."
(dolist (prms (plist-get org-notify-map (td :notify)))
(when (< deadline (org-notify-string->seconds (prm :time)))
(let ((period (org-notify-string->seconds (prm :period)))
- (last-run (prm last-run-sym)) (now (org-float-time))
+ (last-run (prm last-run-sym)) (now (float-time))
(actions (prm :actions)) diff plist)
(when (or (not last-run)
(and period (< period (setq diff (- now last-run)))
diff --git a/contrib/lisp/org-wikinodes.el b/contrib/lisp/org-wikinodes.el
index 428cb6c..02c170d 100644
--- a/contrib/lisp/org-wikinodes.el
+++ b/contrib/lisp/org-wikinodes.el
@@ -203,7 +203,7 @@ setting of `org-wikinodes-create-targets'."
(widen)
(goto-char (point-min))
(while (re-search-forward re nil t)
- (push (org-match-string-no-properties 4) targets))))
+ (push (match-string-no-properties 4) targets))))
(nreverse targets)))
(defun org-wikinodes-get-links-for-directory (dir)
diff --git a/contrib/lisp/ox-taskjuggler.el b/contrib/lisp/ox-taskjuggler.el
index 664a0ea..133d8a3 100644
--- a/contrib/lisp/ox-taskjuggler.el
+++ b/contrib/lisp/ox-taskjuggler.el
@@ -603,7 +603,7 @@ doesn't include leading \"depends\"."
(let ((id (org-element-property :TASK_ID dep)))
(and id
(string-match (concat id " +\\({.*?}\\)") dep-str)
- (org-match-string-no-properties 1 dep-str))))
+ (match-string-no-properties 1 dep-str))))
path)
;; Compute number of exclamation marks by looking for the
;; common ancestor between TASK and DEP.
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 3acace7..32f282f 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -73,8 +73,6 @@
(declare-function org-uniquify "org" (list))
(declare-function org-current-level "org" ())
(declare-function org-table-import "org-table" (file arg))
-(declare-function org-add-hook "org-compat"
- (hook function &optional append local))
(declare-function org-table-align "org-table" ())
(declare-function org-table-end "org-table" (&optional table-type))
(declare-function orgtbl-to-generic "org-table" (table params))
@@ -1407,8 +1405,8 @@ portions of results lines."
(add-hook 'org-tab-first-hook 'org-babel-hide-result-toggle-maybe)
;; Remove overlays when changing major mode
(add-hook 'org-mode-hook
- (lambda () (org-add-hook 'change-major-mode-hook
- 'org-babel-show-result-all 'append 'local)))
+ (lambda () (add-hook 'change-major-mode-hook
+ 'org-babel-show-result-all 'append 'local)))
(defvar org-file-properties)
(defun org-babel-params-from-properties (&optional lang)
@@ -1730,7 +1728,7 @@ to `org-babel-named-src-block-regexp'."
(let ((re (org-babel-named-src-block-regexp-for-name))
names)
(while (ignore-errors (org-next-block 1 nil re))
- (push (org-match-string-no-properties 9) names))
+ (push (match-string-no-properties 9) names))
names)))
;;;###autoload
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9981c2f..50f520c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1023,8 +1023,8 @@ headlines as the agenda display heavily relies on them."
(defcustom org-agenda-mouse-1-follows-link nil
"Non-nil means mouse-1 on a link will follow the link in the agenda.
-A longer mouse click will still set point. Does not work on XEmacs.
-Needs to be set before org.el is loaded."
+A longer mouse click will still set point. Needs to be set
+before org.el is loaded."
:group 'org-agenda-startup
:type 'boolean)
@@ -2170,10 +2170,10 @@ The following commands are available:
(easy-menu-add org-agenda-menu)
(if org-startup-truncated (setq truncate-lines t))
(setq-local line-move-visual nil)
- (org-add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)
- (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local)
+ (add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)
+ (add-hook 'pre-command-hook 'org-unhighlight nil 'local)
;; Make sure properties are removed when copying text
- (org-add-hook 'filter-buffer-substring-functions
+ (add-hook 'filter-buffer-substring-functions
(lambda (fun start end delete)
(substring-no-properties (funcall fun start end delete)))
nil t)
@@ -2841,7 +2841,7 @@ Pressing `<' twice means to restrict to the current subtree or region
((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4))))
((equal org-keys "e") (call-interactively 'org-store-agenda-views))
((equal org-keys "?") (org-tags-view nil "+FLAGGED")
- (org-add-hook
+ (add-hook
'post-command-hook
(lambda ()
(unless (current-message)
@@ -3795,7 +3795,7 @@ FILTER-ALIST is an alist of filters we need to apply when
(when (get 'org-agenda-effort-filter :preset-filter)
(org-agenda-filter-apply
(get 'org-agenda-effort-filter :preset-filter) 'effort))
- (org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))))
+ (add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))))
(defun org-agenda-mark-clocking-task ()
"Mark the current clock entry in the agenda if it is present."
@@ -3952,7 +3952,7 @@ functions do."
(defvar org-agenda-markers nil
"List of all currently active markers created by `org-agenda'.")
-(defvar org-agenda-last-marker-time (org-float-time)
+(defvar org-agenda-last-marker-time (float-time)
"Creation time of the last agenda marker.")
(defun org-agenda-new-marker (&optional pos)
@@ -3960,7 +3960,7 @@ functions do."
Maker is at point, or at POS if non-nil. Org mode keeps a list of
these markers and resets them when they are no longer in use."
(let ((m (copy-marker (or pos (point)) t)))
- (setq org-agenda-last-marker-time (org-float-time))
+ (setq org-agenda-last-marker-time (float-time))
(if org-agenda-buffer
(with-current-buffer org-agenda-buffer
(push m org-agenda-markers))
@@ -5118,12 +5118,12 @@ of what a project is and how to check if it stuck, customize the variable
(tags (nth 2 org-stuck-projects))
(tags-re (if (member "*" tags)
(concat org-outline-regexp-bol
- (org-re ".*:[[:alnum:]_@#%]+:[ \t]*$"))
+ ".*:[[:alnum:]_@#%]+:[ \t]*$")
(if tags
(concat org-outline-regexp-bol
".*:\\("
- (mapconcat 'identity tags "\\|")
- (org-re "\\):[[:alnum:]_@#%:]*[ \t]*$")))))
+ (mapconcat #'identity tags "\\|")
+ "\\):[[:alnum:]_@#%:]*[ \t]*$"))))
(gen-re (nth 3 org-stuck-projects))
(re-list
(delq nil
@@ -5290,7 +5290,7 @@ So the example above may also be written as
The function expects the lisp variables `entry' and `date' to be provided
by the caller, because this is how the calendar works. Don't use this
function from a program - use `org-agenda-get-day-entries' instead."
- (when (> (- (org-float-time)
+ (when (> (- (float-time)
org-agenda-last-marker-time)
5)
;; I am not sure if this works with sticky agendas, because the marker
@@ -5302,7 +5302,7 @@ function from a program - use `org-agenda-get-day-entries' instead."
(let* ((files (if (and entry (stringp entry) (string-match "\\S-" entry))
(list entry)
(org-agenda-files t)))
- (time (org-float-time))
+ (time (float-time))
file rtn results)
(when (or (not org-diary-last-run-time)
(> (- time
@@ -5945,7 +5945,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
(re (concat "^[ \t]*"
org-clock-string
"[ \t]+"
- "\\(\\[.*?\\]\\)" ; group 1 is first stamp
+ "\\(\\[.*?\\]\\)" ; group 1 is first stamp
"\\(-\\{1,3\\}\\(\\[.*?\\]\\)\\)?")) ; group 3 is second
(tlstart 0.)
(tlend 0.)
@@ -5981,10 +5981,10 @@ See also the user option `org-agenda-clock-consistency-checks'."
(throw 'next t))
(setq ts (match-string 1)
te (match-string 3)
- ts (org-float-time
- (apply 'encode-time (org-parse-time-string ts)))
- te (org-float-time
- (apply 'encode-time (org-parse-time-string te)))
+ ts (float-time
+ (apply #'encode-time (org-parse-time-string ts)))
+ te (float-time
+ (apply #'encode-time (org-parse-time-string te)))
dt (- te ts))))
(cond
((> dt (* 60 maxtime))
@@ -6580,8 +6580,7 @@ Any match of REMOVE-RE will be removed from TXT."
(setq duration (- (org-hh:mm-string-to-minutes s2)
(org-hh:mm-string-to-minutes s1)))))
- (when (string-match (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
- txt)
+ (when (string-match "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$" txt)
;; Tags are in the string
(if (or (eq org-agenda-remove-tags t)
(and org-agenda-remove-tags
@@ -6656,7 +6655,7 @@ Any match of REMOVE-RE will be removed from TXT."
The modified list may contain inherited tags, and tags matched by
`org-agenda-hide-tags-regexp' will be removed."
(when (or add-inherited hide-re)
- (if (string-match (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") txt)
+ (if (string-match "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$" txt)
(setq txt (substring txt 0 (match-beginning 0))))
(setq tags
(delq nil
@@ -7152,7 +7151,7 @@ their type."
'face 'org-agenda-restriction-lock)
(overlay-put org-agenda-restriction-lock-overlay
'help-echo "Agendas are currently limited to this subtree.")
-(org-detach-overlay org-agenda-restriction-lock-overlay)
+(delete-overlay org-agenda-restriction-lock-overlay)
;;;###autoload
(defun org-agenda-set-restriction-lock (&optional type)
@@ -7198,8 +7197,8 @@ in the file. Otherwise, restriction will be to the current subtree."
(defun org-agenda-remove-restriction-lock (&optional noupdate)
"Remove the agenda restriction lock."
(interactive "P")
- (org-detach-overlay org-agenda-restriction-lock-overlay)
- (org-detach-overlay org-speedbar-restriction-lock-overlay)
+ (delete-overlay org-agenda-restriction-lock-overlay)
+ (delete-overlay org-speedbar-restriction-lock-overlay)
(setq org-agenda-overriding-restriction nil)
(setq org-agenda-restrict nil)
(put 'org-agenda-files 'org-restrict nil)
@@ -8144,7 +8143,7 @@ so that the date SD will be in that range."
(defun org-unhighlight ()
"Detach overlay INDEX."
- (org-detach-overlay org-hl))
+ (delete-overlay org-hl))
(defun org-unhighlight-once ()
"Remove the highlight from its position, and this function from the hook."
@@ -8291,7 +8290,7 @@ When called with a prefix argument, include all archive files as well."
(t ""))
(if (or org-agenda-category-filter
(get 'org-agenda-category-filter :preset-filter))
- '(:eval (org-propertize
+ '(:eval (propertize
(concat " <"
(mapconcat
'identity
@@ -8304,7 +8303,7 @@ When called with a prefix argument, include all archive files as well."
'help-echo "Category used in filtering")) "")
(if (or org-agenda-tag-filter
(get 'org-agenda-tag-filter :preset-filter))
- '(:eval (org-propertize
+ '(:eval (propertize
(concat " {"
(mapconcat
'identity
@@ -8317,7 +8316,7 @@ When called with a prefix argument, include all archive files as well."
'help-echo "Tags used in filtering")) "")
(if (or org-agenda-effort-filter
(get 'org-agenda-effort-filter :preset-filter))
- '(:eval (org-propertize
+ '(:eval (propertize
(concat " {"
(mapconcat
'identity
@@ -8330,7 +8329,7 @@ When called with a prefix argument, include all archive files as well."
'help-echo "Effort conditions used in filtering")) "")
(if (or org-agenda-regexp-filter
(get 'org-agenda-regexp-filter :preset-filter))
- '(:eval (org-propertize
+ '(:eval (propertize
(concat " ["
(mapconcat
'identity
@@ -8986,7 +8985,7 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
(let ((inhibit-read-only t) l c)
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
- (while (re-search-forward (org-re "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
+ (while (re-search-forward "\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(if line (point-at-eol) nil) t)
(add-text-properties
(match-beginning 2) (match-end 2)
@@ -9530,7 +9529,7 @@ a timestamp can be added there."
(insert text)
(org-end-of-meta-data)
(unless (bolp) (insert "\n"))
- (when org-adapt-indentation (org-indent-to-column 2)))
+ (when org-adapt-indentation (indent-to-column 2)))
(defun org-agenda-insert-diary-make-new-entry (text)
"Make a new entry with TEXT as a child of the current subtree.
@@ -9552,8 +9551,8 @@ a timestamp can be added there."
(org-end-of-meta-data)
;; Ensure point is left on a blank line, at proper indentation.
(unless (bolp) (insert "\n"))
- (unless (org-looking-at-p "^[ \t]*$") (save-excursion (insert "\n")))
- (when org-adapt-indentation (org-indent-to-column col)))
+ (unless (looking-at-p "^[ \t]*$") (save-excursion (insert "\n")))
+ (when org-adapt-indentation (indent-to-column col)))
(org-show-set-visibility 'lineage))
(defun org-agenda-diary-entry ()
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index e7f5bee..45b0d3f 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -171,7 +171,7 @@ archive file is."
(if (eq (match-string 1) ":") (org-at-property-p)
(eq (org-element-type (org-element-at-point)) 'keyword)))
(let ((file (org-extract-archive-file
- (org-match-string-no-properties 2))))
+ (match-string-no-properties 2))))
(when (and (org-string-nw-p file) (file-exists-p file))
(push file files))))))
(setq files (nreverse files))
@@ -318,7 +318,7 @@ this heading."
(progn
(if (re-search-forward
(concat "^" (regexp-quote heading)
- (org-re "[ \t]*\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\($\\|\r\\)"))
+ "[ \t]*\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\($\\|\r\\)")
nil t)
(goto-char (match-end 0))
;; Heading not found, just insert it at the end
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index d0d8791..9633106 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -671,19 +671,19 @@ If not, show simply the clocked time like 01:50."
(let* ((effort-in-minutes
(org-duration-string-to-minutes org-clock-effort))
(work-done-str
- (org-propertize
+ (propertize
(org-minutes-to-clocksum-string clocked-time)
'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text))
'org-mode-line-clock-overrun 'org-mode-line-clock)))
(effort-str (org-minutes-to-clocksum-string effort-in-minutes))
- (clockstr (org-propertize
+ (clockstr (propertize
(concat " [%s/" effort-str
"] (" (replace-regexp-in-string "%" "%%" org-clock-heading) ")")
'face 'org-mode-line-clock)))
(format clockstr work-done-str))
- (org-propertize (concat "[" (org-minutes-to-clocksum-string clocked-time)
- "]" (format " (%s)" org-clock-heading))
- 'face 'org-mode-line-clock))))
+ (propertize (concat "[" (org-minutes-to-clocksum-string clocked-time)
+ "]" (format " (%s)" org-clock-heading))
+ 'face 'org-mode-line-clock))))
(defun org-clock-get-last-clock-out-time ()
"Get the last clock-out time for the current subtree."
@@ -698,20 +698,20 @@ If not, show simply the clocked time like 01:50."
(org-clock-notify-once-if-expired)
(setq org-clock-task-overrun nil))
(setq org-mode-line-string
- (org-propertize
+ (propertize
(let ((clock-string (org-clock-get-clock-string))
(help-text "Org-mode clock is running.\nmouse-1 shows a menu\nmouse-2 will jump to task"))
(if (and (> org-clock-string-limit 0)
(> (length clock-string) org-clock-string-limit))
- (org-propertize
+ (propertize
(substring clock-string 0 org-clock-string-limit)
'help-echo (concat help-text ": " org-clock-heading))
- (org-propertize clock-string 'help-echo help-text)))
+ (propertize clock-string 'help-echo help-text)))
'local-map org-clock-mode-line-map
'mouse-face 'mode-line-highlight))
(if (and org-clock-task-overrun org-clock-task-overrun-text)
(setq org-mode-line-string
- (concat (org-propertize
+ (concat (propertize
org-clock-task-overrun-text
'face 'org-mode-line-clock-overrun) org-mode-line-string)))
(force-mode-line-update))
@@ -721,8 +721,8 @@ If not, show simply the clocked time like 01:50."
The time returned includes the time spent on this task in
previous clocking intervals."
(let ((currently-clocked-time
- (floor (- (org-float-time)
- (org-float-time org-clock-start-time)) 60)))
+ (floor (- (float-time)
+ (float-time org-clock-start-time)) 60)))
(+ currently-clocked-time (or org-clock-total-time 0))))
(defun org-clock-modify-effort-estimate (&optional value)
@@ -1033,7 +1033,7 @@ to be CLOCKED OUT."))))
nil 45)))
(and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default
- (floor (/ (org-float-time
+ (floor (/ (float-time
(time-subtract (current-time) last-valid)) 60)))
(keep
(and (memq ch '(?k ?K))
@@ -1042,8 +1042,8 @@ to be CLOCKED OUT."))))
(and (memq ch '(?g ?G))
(read-number "Got back how many minutes ago? " default)))
(subtractp (memq ch '(?s ?S)))
- (barely-started-p (< (- (org-float-time last-valid)
- (org-float-time (cdr clock))) 45))
+ (barely-started-p (< (- (float-time last-valid)
+ (float-time (cdr clock))) 45))
(start-over (and subtractp barely-started-p)))
(cond
((memq ch '(?j ?J))
@@ -1102,8 +1102,8 @@ 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)
- (org-float-time (cdr clock)))
+ (floor (- (float-time)
+ (float-time (cdr clock)))
60)))))
(or last-valid
(cdr clock)))))))))))
@@ -1112,7 +1112,7 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
"Return the current Emacs idle time in seconds, or nil if not idle."
(let ((idle-time (current-idle-time)))
(if idle-time
- (org-float-time idle-time)
+ (float-time idle-time)
0)))
(defun org-mac-idle-seconds ()
@@ -1163,7 +1163,7 @@ so long."
org-clock-start-time)
(lambda (_)
(format "Clocked in & idle for %.1f mins"
- (/ (org-float-time
+ (/ (float-time
(time-subtract (current-time)
org-clock-user-idle-start))
60.0)))
@@ -1204,7 +1204,7 @@ make this the default behavior.)"
(not org-clock-resolving-clocks))
(setq org-clock-leftover-time nil)
(let ((org-clock-clocking-in t))
- (org-resolve-clocks))) ; check if any clocks are dangling
+ (org-resolve-clocks))) ; check if any clocks are dangling
(when (equal select '(64))
;; Set start-time to `org-clock-out-time'
@@ -1316,7 +1316,7 @@ make this the default behavior.)"
(end-of-line 0)
(org-in-item-p)))
(beginning-of-line 1)
- (org-indent-line-to (- (org-get-indentation) 2)))
+ (indent-line-to (- (org-get-indentation) 2)))
(insert org-clock-string " ")
(setq org-clock-effort (org-entry-get (point) org-effort-property))
(setq org-clock-total-time (org-clock-sum-current-item
@@ -1327,9 +1327,10 @@ make this the default behavior.)"
(y-or-n-p
(format
"You stopped another clock %d mins ago; start this one from then? "
- (/ (- (org-float-time
+ (/ (- (float-time
(org-current-time org-clock-rounding-minutes t))
- (org-float-time leftover)) 60)))
+ (float-time leftover))
+ 60)))
leftover)
start-time
(org-current-time org-clock-rounding-minutes t)))
@@ -1580,8 +1581,10 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
(delete-region (point) (point-at-eol))
(insert "--")
(setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive))
- (setq s (- (org-float-time (apply 'encode-time (org-parse-time-string te)))
- (org-float-time (apply 'encode-time (org-parse-time-string ts))))
+ (setq s (- (float-time
+ (apply #'encode-time (org-parse-time-string te)))
+ (float-time
+ (apply #'encode-time (org-parse-time-string ts))))
h (floor (/ s 3600))
s (- s (* 3600 h))
m (floor (/ s 60))
@@ -1691,7 +1694,7 @@ Optional argument N tells to change by that many units."
(save-excursion
(goto-char begts)
(org-timestamp-change
- (round (/ (org-float-time tdiff)
+ (round (/ (float-time tdiff)
(cond ((eq org-ts-what 'minute) 60)
((eq org-ts-what 'hour) 3600)
((eq org-ts-what 'day) (* 24 3600))
@@ -1712,8 +1715,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 ".*")
- (line-beginning-position))
+ (if (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 (point)))
(message "Clock gone, cancel the timer anyway")
@@ -1799,8 +1802,8 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
time)
(if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart)))
(if (stringp tend) (setq tend (org-time-string-to-seconds tend)))
- (if (consp tstart) (setq tstart (org-float-time tstart)))
- (if (consp tend) (setq tend (org-float-time tend)))
+ (if (consp tstart) (setq tstart (float-time tstart)))
+ (if (consp tend) (setq tend (float-time tend)))
(remove-text-properties (point-min) (point-max)
`(,(or propname :org-clock-minutes) t
:org-clock-force-headline-inclusion t))
@@ -1812,10 +1815,10 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
;; Two time stamps
(setq ts (match-string 2)
te (match-string 3)
- ts (org-float-time
- (apply 'encode-time (org-parse-time-string ts)))
- te (org-float-time
- (apply 'encode-time (org-parse-time-string te)))
+ ts (float-time
+ (apply #'encode-time (org-parse-time-string ts)))
+ te (float-time
+ (apply #'encode-time (org-parse-time-string te)))
ts (if tstart (max ts tstart) ts)
te (if tend (min te tend) te)
dt (- te ts)
@@ -1831,10 +1834,11 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
(equal (marker-position org-clock-hd-marker) (point))
tstart
tend
- (>= (org-float-time org-clock-start-time) tstart)
- (<= (org-float-time org-clock-start-time) tend))
- (let ((time (floor (- (org-float-time)
- (org-float-time org-clock-start-time)) 60)))
+ (>= (float-time org-clock-start-time) tstart)
+ (<= (float-time org-clock-start-time) tend))
+ (let ((time (floor (- (float-time)
+ (float-time org-clock-start-time))
+ 60)))
(setq t1 (+ t1 time))))
(let* ((headline-forced
(get-text-property (point)
@@ -1922,7 +1926,7 @@ Use \\[org-clock-remove-overlays] to remove the subtree times."
m (- org-clock-file-total-minutes (* 60 h)))
;; Arrange to remove the overlays upon next change.
(when org-remove-highlights-with-change
- (org-add-hook 'before-change-functions 'org-clock-remove-overlays
+ (add-hook 'before-change-functions 'org-clock-remove-overlays
nil 'local))))
(message (concat (format "Total file time%s: "
(cond (todayp " for today")
@@ -2703,18 +2707,17 @@ LEVEL is an integer. Indent by two spaces per level above 1."
((numberp ts)
;; If ts is a number, it's an absolute day number from org-agenda.
(destructuring-bind (month day year) (calendar-gregorian-from-absolute ts)
- (setq ts (org-float-time (encode-time 0 0 0 day month year)))))
+ (setq ts (float-time (encode-time 0 0 0 day month year)))))
(ts
- (setq ts (org-float-time
- (apply 'encode-time (org-parse-time-string ts))))))
+ (setq ts (float-time
+ (apply #'encode-time (org-parse-time-string ts))))))
(cond
((numberp te)
;; Likewise for te.
(destructuring-bind (month day year) (calendar-gregorian-from-absolute te)
- (setq te (org-float-time (encode-time 0 0 0 day month year)))))
+ (setq te (float-time (encode-time 0 0 0 day month year)))))
(te
- (setq te (org-float-time
- (apply 'encode-time (org-parse-time-string te))))))
+ (setq te (float-time (apply #'encode-time (org-parse-time-string te))))))
(setq tsb
(if (eq step0 'week)
(- ts (* 86400 (- (nth 6 (decode-time (seconds-to-time ts))) ws)))
@@ -2814,7 +2817,7 @@ TIME: The sum of all time spend in this tree, in minutes. This time
(when (setq time (get-text-property p :org-clock-minutes))
(save-excursion
(beginning-of-line 1)
- (when (and (looking-at (org-re "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))
+ (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[[:alnum:]_@#%:]+:\\)?[ \t]*$")
(setq level (org-reduced-level
(- (match-end 1) (match-beginning 1))))
(<= level maxlevel))
@@ -2907,10 +2910,10 @@ Otherwise, return nil."
(end-of-line 1)
(setq ts (match-string 1)
te (match-string 3))
- (setq s (- (org-float-time
- (apply 'encode-time (org-parse-time-string te)))
- (org-float-time
- (apply 'encode-time (org-parse-time-string ts))))
+ (setq s (- (float-time
+ (apply #'encode-time (org-parse-time-string te)))
+ (float-time
+ (apply #'encode-time (org-parse-time-string ts))))
neg (< s 0)
s (abs s)
h (floor (/ s 3600))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 92ced53..df030a5 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -263,7 +263,7 @@ initialized."
org-agenda-columns-add-appointments-to-effort-sum
(string= p (upcase org-effort-property))
(get-text-property (point) 'duration)
- (org-propertize
+ (propertize
(org-minutes-to-clocksum-string
(get-text-property (point) 'duration))
'face 'org-warning))
@@ -438,7 +438,7 @@ for the duration of the command.")
(org-add-props " " nil 'display '(space :align-to 0))
(org-add-props (substring title 0 -1) nil 'face 'org-column-title)))
(setq org-columns-previous-hscroll -1)
- (org-add-hook 'post-command-hook 'org-columns-hscoll-title nil 'local)))
+ (add-hook 'post-command-hook 'org-columns-hscoll-title nil 'local)))
(defun org-columns-hscoll-title ()
"Set the `header-line-format' so that it scrolls along with the table."
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index c10690a..91daf8c 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -24,45 +24,34 @@
;;
;;; Commentary:
-;; This file contains code needed for compatibility with XEmacs and older
+;; This file contains code needed for compatibility with older
;; versions of GNU Emacs.
;;; Code:
(eval-when-compile
(require 'cl))
-
(require 'org-macs)
-;; The following constant is for backward compatibility. We do not use
-;; it in org-mode, because the Byte compiler evaluates (featurep 'xemacs)
-;; at compilation time and can therefore optimize code better.
-(defconst org-xemacs-p (featurep 'xemacs))
-
(defun org-compatible-face (inherits specs)
"Make a compatible face specification.
If INHERITS is an existing face and if the Emacs version supports it,
just inherit the face. If INHERITS is set and the Emacs version does
not support it, copy the face specification from the inheritance face.
-If INHERITS is not given and SPECS is, use SPECS to define the face.
-XEmacs and Emacs 21 do not know about the `min-colors' attribute.
-For them we convert a (min-colors 8) entry to a `tty' entry and move it
-to the top of the list. The `min-colors' attribute will be removed from
-any other entries, and any resulting duplicates will be removed entirely."
+If INHERITS is not given and SPECS is, use SPECS to define the face."
(when (and inherits (facep inherits) (not specs))
(setq specs (or specs
(get inherits 'saved-face)
(get inherits 'face-defface-spec))))
(cond
((and inherits (facep inherits)
- (not (featurep 'xemacs))
(>= emacs-major-version 22)
;; do not inherit outline faces before Emacs 23
(or (>= emacs-major-version 23)
(not (string-match "\\`outline-[0-9]+"
(symbol-name inherits)))))
(list (list t :inherit inherits)))
- ((or (featurep 'xemacs) (< emacs-major-version 22))
+ ((< emacs-major-version 22)
;; These do not understand the `min-colors' attribute.
(let (r e a)
(while (setq e (pop specs))
@@ -104,7 +93,7 @@ any other entries, and any resulting duplicates will be removed entirely."
t)))
-;;;; Emacs/XEmacs compatibility
+;;; Emacs/XEmacs compatibility
(eval-and-compile
(defun org-defvaralias (new-alias base-variable &optional docstring)
@@ -118,95 +107,39 @@ Don't do the aliasing when `defvaralias' is not bound."
(boundp 'user-init-directory))
(org-defvaralias 'user-emacs-directory 'user-init-directory)))
-(when (featurep 'xemacs)
- (defadvice custom-handle-keyword
- (around org-custom-handle-keyword
- activate preactivate)
- "Remove custom keywords not recognized to avoid producing an error."
- (cond
- ((eq (ad-get-arg 1) :package-version))
- (t ad-do-it)))
- (defadvice define-obsolete-variable-alias
- (around org-define-obsolete-variable-alias
- (obsolete-name current-name &optional when docstring)
- activate preactivate)
- "Declare arguments defined in later versions of Emacs."
- ad-do-it)
- (defadvice define-obsolete-function-alias
- (around org-define-obsolete-function-alias
- (obsolete-name current-name &optional when docstring)
- activate preactivate)
- "Declare arguments defined in later versions of Emacs."
- ad-do-it)
- (defvar customize-package-emacs-version-alist nil)
- (defvar temporary-file-directory (temp-directory)))
-
-;; Keys
-(defconst org-xemacs-key-equivalents
- '(([mouse-1] . [button1])
- ([mouse-2] . [button2])
- ([mouse-3] . [button3])
- ([C-mouse-4] . [(control mouse-4)])
- ([C-mouse-5] . [(control mouse-5)]))
- "Translation alist for a couple of keys.")
-
-;; Overlay compatibility functions
-(defun org-detach-overlay (ovl)
- (if (featurep 'xemacs) (detach-extent ovl) (delete-overlay ovl)))
-(defun org-overlay-display (ovl text &optional face evap)
- "Make overlay OVL display TEXT with face FACE."
- (if (featurep 'xemacs)
- (let ((gl (make-glyph text)))
- (and face (set-glyph-face gl face))
- (set-extent-property ovl 'invisible t)
- (set-extent-property ovl 'end-glyph gl))
- (overlay-put ovl 'display text)
- (if face (overlay-put ovl 'face face))
- (if evap (overlay-put ovl 'evaporate t))))
-(defun org-overlay-before-string (ovl text &optional face evap)
- "Make overlay OVL display TEXT with face FACE."
- (if (featurep 'xemacs)
- (let ((gl (make-glyph text)))
- (and face (set-glyph-face gl face))
- (set-extent-property ovl 'begin-glyph gl))
- (if face (org-add-props text nil 'face face))
- (overlay-put ovl 'before-string text)
- (if evap (overlay-put ovl 'evaporate t))))
-(defun org-find-overlays (prop &optional pos delete)
- "Find all overlays specifying PROP at POS or point.
-If DELETE is non-nil, delete all those overlays."
- (let ((overlays (overlays-at (or pos (point))))
- ov found)
- (while (setq ov (pop overlays))
- (if (overlay-get ov prop)
- (if delete (delete-overlay ov) (push ov found))))
- found))
+(define-obsolete-function-alias 'org-add-hook 'add-hook "Org 9.0")
+(define-obsolete-function-alias 'org-decompose-region 'decompose-region "Org 9.0")
+(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "Org 9.0")
+(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "Org 9.0")
+(define-obsolete-function-alias 'org-float-time 'float-time "Org 9.0")
+(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "Org 9.0")
+(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "Org 9.0")
+(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "Org 9.0")
+(define-obsolete-function-alias 'org-looking-back 'looking-back "Org 9.0")
+(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-properties "Org 9.0")
+(define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0")
+(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0")
+
+(defmacro org-re (s)
+ "Replace posix classes in regular expression."
+ (declare (debug (form)))
+ s)
+(make-obsolete 'org-re "It is now a no-op. Please remove it altogether." "Org 9.0")
+
+;;; Miscellaneous functions
(defun org-get-x-clipboard (value)
- "Get the value of the x or Windows clipboard, compatible with XEmacs, and GNU Emacs 21."
+ "Get the value of the X or Windows clipboard."
(cond ((eq window-system 'x)
- (let ((x (org-get-x-clipboard-compat value)))
- (if x (org-no-properties x))))
+ (org-no-properties
+ (ignore-errors
+ (or (x-get-selection value 'UTF8_STRING)
+ (x-get-selection value 'COMPOUND_TEXT)
+ (x-get-selection value 'STRING)
+ (x-get-selection value 'TEXT)))))
((and (eq window-system 'w32) (fboundp 'w32-get-clipboard-data))
(w32-get-clipboard-data))))
-(defsubst org-decompose-region (beg end)
- "Decompose from BEG to END."
- (if (featurep 'xemacs)
- (let ((modified-p (buffer-modified-p))
- (buffer-read-only nil))
- (remove-text-properties beg end '(composition nil))
- (set-buffer-modified-p modified-p))
- (decompose-region beg end)))
-
-;; Miscellaneous functions
-
-(defun org-add-hook (hook function &optional append local)
- "Add-hook, compatible with both Emacsen."
- (if (and local (featurep 'xemacs))
- (add-local-hook hook function append)
- (add-hook hook function append local)))
-
(defun org-add-props (string plist &rest props)
"Add text properties to entire string, from beginning to end.
PLIST may be a list of properties, PROPS are individual properties and values
@@ -259,31 +192,28 @@ ignored in this case."
'set-transient-map
'set-temporary-overlay-map))
-;; Region compatibility
+;;; Region compatibility
(defvar org-ignore-region nil
"Non-nil means temporarily disable the active region.")
(defun org-region-active-p ()
- "Is `transient-mark-mode' on and the region active?
-Works on both Emacs and XEmacs."
+ "Is `transient-mark-mode' on and the region active?"
(if org-ignore-region
nil
- (if (featurep 'xemacs)
- (and zmacs-regions (region-active-p))
- (if (fboundp 'use-region-p)
- (use-region-p)
- (and transient-mark-mode mark-active))))) ; Emacs 22 and before
+ (if (fboundp 'use-region-p)
+ (use-region-p)
+ (and transient-mark-mode mark-active)))) ; Emacs 22 and before
(defun org-cursor-to-region-beginning ()
(when (and (org-region-active-p)
(> (point) (region-beginning)))
(exchange-point-and-mark)))
-;; Old alias for emacs 22 compatibility, now dropped
+;;; Old alias for emacs 22 compatibility, now dropped
(define-obsolete-function-alias 'org-activate-mark 'activate-mark)
-;; Invisibility compatibility
+;;; Invisibility compatibility
(defun org-remove-from-invisibility-spec (arg)
"Remove elements from `buffer-invisibility-spec'."
@@ -298,65 +228,14 @@ Works on both Emacs and XEmacs."
(if (consp buffer-invisibility-spec)
(member arg buffer-invisibility-spec)))
-(defmacro org-xemacs-without-invisibility (&rest body)
- "Turn off extents with invisibility while executing BODY."
- `(let ((ext-inv (extent-list nil (point-at-bol) (point-at-eol)
- 'all-extents-closed-open 'invisible))
- ext-inv-specs)
- (dolist (ext ext-inv)
- (when (extent-property ext 'invisible)
- (add-to-list 'ext-inv-specs (list ext (extent-property
- ext 'invisible)))
- (set-extent-property ext 'invisible nil)))
- ,@body
- (dolist (ext-inv-spec ext-inv-specs)
- (set-extent-property (car ext-inv-spec) 'invisible
- (cadr ext-inv-spec)))))
-(def-edebug-spec org-xemacs-without-invisibility (body))
-
-(defun org-indent-to-column (column &optional minimum buffer)
- "Work around a bug with extents with invisibility in XEmacs."
- (if (featurep 'xemacs)
- (org-xemacs-without-invisibility (indent-to-column column minimum buffer))
- (indent-to-column column minimum)))
-
-(defun org-indent-line-to (column)
- "Work around a bug with extents with invisibility in XEmacs."
- (if (featurep 'xemacs)
- (org-xemacs-without-invisibility (indent-line-to column))
- (indent-line-to column)))
-
(defun org-move-to-column (column &optional force buffer)
"Move to column COLUMN.
-Pass COLUMN and FORCE to `move-to-column'.
-Pass BUFFER to the XEmacs version of `move-to-column'."
+Pass COLUMN and FORCE to `move-to-column'."
(let ((buffer-invisibility-spec
(if (listp buffer-invisibility-spec)
(remove '(org-filtered) buffer-invisibility-spec)
buffer-invisibility-spec)))
- (if (featurep 'xemacs)
- (org-xemacs-without-invisibility
- (move-to-column column force buffer))
- (move-to-column column force))))
-
-(defun org-get-x-clipboard-compat (value)
- "Get the clipboard value on XEmacs or Emacs 21."
- (cond ((featurep 'xemacs)
- (org-no-warnings (get-selection-no-error value)))
- ((fboundp 'x-get-selection)
- (condition-case nil
- (or (x-get-selection value 'UTF8_STRING)
- (x-get-selection value 'COMPOUND_TEXT)
- (x-get-selection value 'STRING)
- (x-get-selection value 'TEXT))
- (error nil)))))
-
-(defun org-propertize (string &rest properties)
- (if (featurep 'xemacs)
- (progn
- (add-text-properties 0 (length string) properties string)
- string)
- (apply 'propertize string properties)))
+ (move-to-column column force)))
(defmacro org-find-library-dir (library)
`(file-name-directory (or (locate-library ,library) "")))
@@ -375,32 +254,6 @@ Pass BUFFER to the XEmacs version of `move-to-column'."
string)
(apply 'kill-new string args))
-(defun org-select-frame-set-input-focus (frame)
- "Select FRAME, raise it, and set input focus, if possible."
- (cond ((featurep 'xemacs)
- (if (fboundp 'select-frame-set-input-focus)
- (select-frame-set-input-focus frame)
- (raise-frame frame)
- (select-frame frame)
- (focus-frame frame)))
- ;; `select-frame-set-input-focus' defined in Emacs 21 will not
- ;; set the input focus.
- ((>= emacs-major-version 22)
- (select-frame-set-input-focus frame))
- (t
- (raise-frame frame)
- (select-frame frame)
- (cond ((memq window-system '(x ns mac))
- (x-focus-frame frame))
- ((and (eq window-system 'w32)
- (fboundp 'w32-focus-frame))
- (w32-focus-frame frame)))
- (when focus-follows-mouse
- (set-mouse-position frame (1- (frame-width frame)) 0)))))
-
-(defalias 'org-float-time
- (if (featurep 'xemacs) 'time-to-seconds 'float-time))
-
;; `user-error' is only available from 24.2.50 on
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
@@ -432,46 +285,6 @@ effect, which variables to use depends on the Emacs version."
(save-match-data
(funcall 'string-match regexp string start))))
-(if (fboundp 'looking-at-p)
- (defalias 'org-looking-at-p 'looking-at-p)
- (defun org-looking-at-p (&rest args)
- (save-match-data
- (apply 'looking-at args))))
-
-;; XEmacs does not have `looking-back'.
-(if (fboundp 'looking-back)
- (defalias 'org-looking-back 'looking-back)
- (defun org-looking-back (regexp &optional limit greedy)
- "Return non-nil if text before point matches regular expression REGEXP.
-Like `looking-at' except matches before point, and is slower.
-LIMIT if non-nil speeds up the search by specifying a minimum
-starting position, to avoid checking matches that would start
-before LIMIT.
-
-If GREEDY is non-nil, extend the match backwards as far as
-possible, stopping when a single additional previous character
-cannot be part of a match for REGEXP. When the match is
-extended, its starting position is allowed to occur before
-LIMIT."
- (let ((start (point))
- (pos
- (save-excursion
- (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)
- (point)))))
- (if (and greedy pos)
- (save-restriction
- (narrow-to-region (point-min) start)
- (while (and (> pos (point-min))
- (save-excursion
- (goto-char pos)
- (backward-char 1)
- (looking-at (concat "\\(?:" regexp "\\)\\'"))))
- (setq pos (1- pos)))
- (save-excursion
- (goto-char pos)
- (looking-at (concat "\\(?:" regexp "\\)\\'")))))
- (not (null pos)))))
-
(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."
@@ -526,16 +339,6 @@ With two arguments, return floor and remainder of their quotient."
(defun org-release () "N/A")
(defun org-git-version () "N/A !!check installation!!"))))))
-(defun org-file-equal-p (f1 f2)
- "Return t if files F1 and F2 are the same.
-Implements `file-equal-p' for older emacsen and XEmacs."
- (if (fboundp 'file-equal-p)
- (file-equal-p f1 f2)
- (let (f1-attr f2-attr)
- (and (setq f1-attr (file-attributes (file-truename f1)))
- (setq f2-attr (file-attributes (file-truename f2)))
- (equal f1-attr f2-attr)))))
-
;; `buffer-narrowed-p' is available for Emacs >=24.3
(defun org-buffer-narrowed-p ()
"Compatibility function for `buffer-narrowed-p'."
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index d1bba35..3d8edf7 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -142,7 +142,7 @@ See `org-crypt-disable-auto-save'."
(message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage."))
((eq org-crypt-disable-auto-save 'encrypt)
(message "org-decrypt: Enabling re-encryption on auto-save.")
- (org-add-hook 'auto-save-hook
+ (add-hook 'auto-save-hook
(lambda ()
(message "org-crypt: Re-encrypting all decrypted entries due to auto-save.")
(org-encrypt-entries))
@@ -263,7 +263,7 @@ See `org-crypt-disable-auto-save'."
"Add a hook to automatically encrypt entries before a file is saved to disk."
(add-hook
'org-mode-hook
- (lambda () (org-add-hook 'before-save-hook 'org-encrypt-entries nil t))))
+ (lambda () (add-hook 'before-save-hook 'org-encrypt-entries nil t))))
(add-hook 'org-reveal-start-hook 'org-decrypt-entry)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 2b92617..8745ef3 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -716,7 +716,7 @@ Assume point is at beginning of drawer."
(save-excursion
(let* ((drawer-end-line (match-beginning 0))
(name (progn (looking-at org-drawer-regexp)
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
(begin (car affiliated))
(post-affiliated (point))
;; Empty drawers have no contents.
@@ -772,8 +772,8 @@ Assume point is at beginning of dynamic block."
(let ((block-end-line (match-beginning 0)))
(save-excursion
(let* ((name (progn (looking-at org-dblock-start-re)
- (org-match-string-no-properties 1)))
- (arguments (org-match-string-no-properties 3))
+ (match-string-no-properties 1)))
+ (arguments (match-string-no-properties 3))
(begin (car affiliated))
(post-affiliated (point))
;; Empty blocks have no contents.
@@ -831,7 +831,7 @@ a plist containing `:label', `:begin' `:end', `:contents-begin',
Assume point is at the beginning of the footnote definition."
(save-excursion
(let* ((label (progn (looking-at org-footnote-definition-re)
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
(begin (car affiliated))
(post-affiliated (point))
(ending
@@ -846,7 +846,7 @@ Assume point is at the beginning of the footnote definition."
;; before any affiliated keyword above.
(forward-line -1)
(while (and (> (point) post-affiliated)
- (org-looking-at-p org-element--affiliated-re))
+ (looking-at-p org-element--affiliated-re))
(forward-line -1))
(line-beginning-position 2))
(t (match-beginning 0)))))
@@ -889,13 +889,13 @@ obtained through property drawer and default properties from the
parser (e.g. `:end' and :END:). Return value is a plist."
(save-excursion
(forward-line)
- (when (org-looking-at-p org-planning-line-re) (forward-line))
+ (when (looking-at-p org-planning-line-re) (forward-line))
(when (looking-at org-property-drawer-re)
(forward-line)
(let ((end (match-end 0)) properties)
(while (< (line-end-position) end)
(looking-at org-property-re)
- (push (org-match-string-no-properties 3) properties)
+ (push (match-string-no-properties 3) properties)
(push (intern (concat ":" (upcase (match-string 2)))) properties)
(forward-line))
properties))))
@@ -958,7 +958,7 @@ Assume point is at beginning of the headline."
(goto-char (match-end 0))))
(title-start (point))
(tags (when (re-search-forward
- (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
+ "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position)
'move)
(goto-char (match-beginning 0))
@@ -1100,7 +1100,7 @@ Assume point is at beginning of the inline task."
(aref (match-string 0) 2))))
(title-start (point))
(tags (when (re-search-forward
- (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
+ "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position)
'move)
(goto-char (match-beginning 0))
@@ -1111,7 +1111,7 @@ Assume point is at beginning of the inline task."
(task-end (save-excursion
(end-of-line)
(and (re-search-forward org-outline-regexp-bol limit t)
- (org-looking-at-p "END[ \t]*$")
+ (looking-at-p "END[ \t]*$")
(line-beginning-position))))
(standard-props (and task-end (org-element--get-node-properties)))
(time-props (and task-end (org-element--get-time-properties)))
@@ -1214,7 +1214,7 @@ Assume point is at the beginning of the item."
(beginning-of-line)
(looking-at org-list-full-item-re)
(let* ((begin (point))
- (bullet (org-match-string-no-properties 1))
+ (bullet (match-string-no-properties 1))
(checkbox (let ((box (match-string 3)))
(cond ((equal "[ ]" box) 'off)
((equal "[X]" box) 'on)
@@ -1363,7 +1363,7 @@ CONTENTS is the contents of the element."
(forward-line)
(let ((origin (point)))
(when (re-search-forward inlinetask-re limit t)
- (if (org-looking-at-p "END[ \t]*$") (forward-line)
+ (if (looking-at-p "END[ \t]*$") (forward-line)
(goto-char origin)))))
;; At some text line. Check if it ends any previous item.
(t
@@ -1405,7 +1405,7 @@ containing `:type', `:begin', `:end', `:contents-begin' and
Assume point is at the beginning of the list."
(save-excursion
(let* ((struct (or structure (org-element--list-struct limit)))
- (type (cond ((org-looking-at-p "[ \t]*[A-Za-z0-9]") 'ordered)
+ (type (cond ((looking-at-p "[ \t]*[A-Za-z0-9]") 'ordered)
((nth 5 (assq (point) struct)) 'descriptive)
(t 'unordered)))
(contents-begin (point))
@@ -1701,7 +1701,7 @@ Return a list whose CAR is `clock' and CDR is a plist containing
(duration (and (search-forward " => " (line-end-position) t)
(progn (skip-chars-forward " \t")
(looking-at "\\(\\S-+\\)[ \t]*$"))
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
(status (if duration 'closed 'running))
(post-blank (let ((before-blank (progn (forward-line) (point))))
(skip-chars-forward " \r\t\n" limit)
@@ -1850,7 +1850,7 @@ containing `:begin', `:end', `:value', `:post-blank' and
(let ((begin (car affiliated))
(post-affiliated (point))
(value (progn (looking-at "\\(%%(.*\\)[ \t]*$")
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
(pos-before-blank (progn (forward-line) (point)))
(end (progn (skip-chars-forward " \r\t\n" limit)
(if (eobp) (point) (line-beginning-position)))))
@@ -1892,7 +1892,7 @@ containing `:begin', `:end', `:number-lines', `:preserve-indent',
(let* ((switches
(progn
(looking-at "^[ \t]*#\\+BEGIN_EXAMPLE\\(?: +\\(.*\\)\\)?")
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
;; Switches analysis.
(number-lines
(and switches
@@ -2123,7 +2123,7 @@ containing `:key', `:value', `:begin', `:end', `:post-blank' and
(let ((begin (or (car affiliated) (point)))
(post-affiliated (point))
(key (progn (looking-at "[ \t]*#\\+\\(\\S-+*\\):")
- (upcase (org-match-string-no-properties 1))))
+ (upcase (match-string-no-properties 1))))
(value (org-trim (buffer-substring-no-properties
(match-end 0) (point-at-eol))))
(pos-before-blank (progn (forward-line) (point)))
@@ -2214,8 +2214,8 @@ containing `:key', `:value', `:begin', `:end', `:post-blank' and
(looking-at org-property-re)
(let ((case-fold-search t)
(begin (point))
- (key (org-match-string-no-properties 2))
- (value (org-match-string-no-properties 3))
+ (key (match-string-no-properties 2))
+ (value (match-string-no-properties 3))
(end (save-excursion
(end-of-line)
(if (re-search-forward org-property-re limit t)
@@ -2403,11 +2403,11 @@ Assume point is at the beginning of the block."
\\(?: +\\(\\S-+\\)\\)?\
\\(\\(?: +\\(?:-\\(?:l \".+\"\\|[ikr]\\)\\|[-+]n\\(?: *[0-9]+\\)?\\)\\)+\\)?\
\\(.*\\)[ \t]*$")
- (org-match-string-no-properties 1)))
+ (match-string-no-properties 1)))
;; Get switches.
- (switches (org-match-string-no-properties 2))
+ (switches (match-string-no-properties 2))
;; Get parameters.
- (parameters (org-match-string-no-properties 3))
+ (parameters (match-string-no-properties 3))
;; Switches analysis.
(number-lines
(and switches
@@ -2522,7 +2522,7 @@ Assume point is at the beginning of the table."
(point)))
(tblfm (let (acc)
(while (looking-at "[ \t]*#\\+TBLFM: +\\(.*\\)[ \t]*$")
- (push (org-match-string-no-properties 1) acc)
+ (push (match-string-no-properties 1) acc)
(forward-line))
acc))
(pos-before-blank (point))
@@ -2704,7 +2704,7 @@ Assume point is at the first tilde marker."
(unless (bolp) (backward-char 1))
(when (looking-at org-emph-re)
(let ((begin (match-beginning 2))
- (value (org-match-string-no-properties 4))
+ (value (match-string-no-properties 4))
(post-blank (progn (goto-char (match-end 2))
(skip-chars-forward " \t")))
(end (point)))
@@ -2780,7 +2780,7 @@ Assume point is at the beginning of the snippet."
(re-search-forward "@@" nil t)
(match-beginning 0))))
(let* ((begin (match-beginning 0))
- (back-end (org-match-string-no-properties 1))
+ (back-end (match-string-no-properties 1))
(value (buffer-substring-no-properties
(match-end 0) contents-end))
(post-blank (skip-chars-forward " \t"))
@@ -3039,7 +3039,7 @@ and cdr a plist with `:begin', `:end' and `:post-blank' keywords.
Otherwise, return nil.
Assume point is at the beginning of the line break."
- (when (and (org-looking-at-p "\\\\\\\\[ \t]*$")
+ (when (and (looking-at-p "\\\\\\\\[ \t]*$")
(not (eq (char-before) ?\\)))
(list 'line-break
(list :begin (point)
@@ -3074,7 +3074,7 @@ Assume point is at the beginning of the link."
(looking-at org-target-link-regexp)))
(setq type "radio"
link-end (match-end 1)
- path (org-match-string-no-properties 1)
+ path (match-string-no-properties 1)
contents-begin (match-beginning 1)
contents-end (match-end 1)))
;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]]
@@ -3096,7 +3096,7 @@ Assume point is at the beginning of the link."
(setq raw-link (org-link-expand-abbrev
(replace-regexp-in-string
"[ \t]*\n[ \t]*" " "
- (org-match-string-no-properties 1))))
+ (match-string-no-properties 1))))
;; Determine TYPE of link and set PATH accordingly. According
;; to RFC 3986, remove whitespaces from URI in external links.
;; In internal ones, treat indentation as a single space.
@@ -3130,21 +3130,21 @@ Assume point is at the beginning of the link."
(setq path raw-link))))
;; Type 3: Plain link, e.g., http://orgmode.org
((looking-at org-plain-link-re)
- (setq raw-link (org-match-string-no-properties 0)
- type (org-match-string-no-properties 1)
+ (setq raw-link (match-string-no-properties 0)
+ type (match-string-no-properties 1)
link-end (match-end 0)
- path (org-match-string-no-properties 2)))
+ path (match-string-no-properties 2)))
;; Type 4: Angular link, e.g., <http://orgmode.org>. Unlike to
;; bracket links, follow RFC 3986 and remove any extra
;; whitespace in URI.
((looking-at org-angle-link-re)
- (setq type (org-match-string-no-properties 1))
+ (setq type (match-string-no-properties 1))
(setq link-end (match-end 0))
(setq raw-link
(buffer-substring-no-properties
(match-beginning 1) (match-end 2)))
(setq path (replace-regexp-in-string
- "[ \t]*\n[ \t]*" "" (org-match-string-no-properties 2))))
+ "[ \t]*\n[ \t]*" "" (match-string-no-properties 2))))
(t (throw 'no-object nil)))
;; In any case, deduce end point after trailing white space from
;; LINK-END variable.
@@ -3211,12 +3211,12 @@ Assume point is at the macro."
(save-excursion
(when (looking-at "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\(([ \t\n]*\\([^\000]*?\\))\\)?}}}")
(let ((begin (point))
- (key (downcase (org-match-string-no-properties 1)))
- (value (org-match-string-no-properties 0))
+ (key (downcase (match-string-no-properties 1)))
+ (value (match-string-no-properties 0))
(post-blank (progn (goto-char (match-end 0))
(skip-chars-forward " \t")))
(end (point))
- (args (let ((args (org-match-string-no-properties 3)))
+ (args (let ((args (match-string-no-properties 3)))
(and args (org-macro-extract-arguments args)))))
(list 'macro
(list :key key
@@ -3247,7 +3247,7 @@ Assume point is at the radio target."
(let ((begin (point))
(contents-begin (match-beginning 1))
(contents-end (match-end 1))
- (value (org-match-string-no-properties 1))
+ (value (match-string-no-properties 1))
(post-blank (progn (goto-char (match-end 0))
(skip-chars-forward " \t")))
(end (point)))
@@ -3441,7 +3441,7 @@ Assume point is at the target."
(save-excursion
(when (looking-at org-target-regexp)
(let ((begin (point))
- (value (org-match-string-no-properties 1))
+ (value (match-string-no-properties 1))
(post-blank (progn (goto-char (match-end 0))
(skip-chars-forward " \t")))
(end (point)))
@@ -3479,7 +3479,7 @@ cdr a plist with `:type', `:raw-value', `:year-start',
Otherwise, return nil.
Assume point is at the beginning of the timestamp."
- (when (org-looking-at-p org-element--timestamp-regexp)
+ (when (looking-at-p org-element--timestamp-regexp)
(save-excursion
(let* ((begin (point))
(activep (eq (char-after) ?<))
@@ -3709,7 +3709,7 @@ Assume point is at the first equal sign marker."
(unless (bolp) (backward-char 1))
(when (looking-at org-emph-re)
(let ((begin (match-beginning 2))
- (value (org-match-string-no-properties 4))
+ (value (match-string-no-properties 4))
(post-blank (progn (goto-char (match-end 2))
(skip-chars-forward " \t")))
(end (point)))
@@ -3915,7 +3915,7 @@ position of point and CDR is nil."
(dualp (member kwd org-element-dual-keywords))
(dual-value
(and dualp
- (let ((sec (org-match-string-no-properties 2)))
+ (let ((sec (match-string-no-properties 2)))
(if (or (not sec) (not parsedp)) sec
(save-match-data
(org-element--parse-objects
@@ -6025,7 +6025,7 @@ end of ELEM-A."
(goto-char beg-B)
(when specialp
(setq body-B (replace-regexp-in-string "\\`[ \t]*" "" body-B))
- (org-indent-to-column ind-B))
+ (indent-to-column ind-B))
(insert body-A)
;; Restore ex ELEM-A overlays.
(let ((offset (- beg-B beg-A)))
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index d39217a..f185e88 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -182,11 +182,7 @@ character (this might for example be the a TODO keyword) might still
shine through in some properties. So when your column view looks
funny, with \"random\" colors, weight, strike-through, try to explicitly
set the properties in the `org-column' face. For example, set
-:underline to nil, or the :slant to `normal'.
-
-Under XEmacs, the rules are simpler, because the XEmacs version of
-column view defines special faces for each outline level. See the file
-`org-colview-xemacs.el' in Org's contrib/ directory for details."
+:underline to nil, or the :slant to `normal'."
:group 'org-faces)
(defface org-column-title
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index 20b6afb..abf3451 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -625,7 +625,7 @@ containing the properties `:guid' and `:item-full-text'."
(match-beginning 0)))
(setq item (buffer-substring beg end)
guid (if (string-match "<guid\\>.*?>\\(.*?\\)</guid>" item)
- (xml-substitute-special (org-match-string-no-properties 1 item))))
+ (xml-substitute-special (match-string-no-properties 1 item))))
(setq entry (list :guid guid :item-full-text item))
(push entry entries)
(widen)
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index a847326..d4e7671 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -244,7 +244,7 @@ otherwise."
(concat org-outline-regexp-bol
"\\|^\\([ \t]*\n\\)\\{2,\\}") nil t))))
(when (re-search-backward org-footnote-definition-re lim t)
- (let ((label (org-match-string-no-properties 1))
+ (let ((label (match-string-no-properties 1))
(beg (match-beginning 0))
(beg-def (match-end 0))
(end (if (progn
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index b1aaee9..ba248f8 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -185,7 +185,7 @@ This list represents a \"habit\" for the rest of this module."
habit-entry))
(setq sr-days (org-habit-duration-to-days scheduled-repeat)
sr-type (progn (string-match "[\\.+]?\\+" scheduled-repeat)
- (org-match-string-no-properties 0 scheduled-repeat)))
+ (match-string-no-properties 0 scheduled-repeat)))
(unless (> sr-days 0)
(error "Habit %s scheduled repeat period is less than 1d" habit-entry))
(when (string-match "/\\([0-9]+[dwmy]\\)" scheduled-repeat)
@@ -222,8 +222,8 @@ This list represents a \"habit\" for the rest of this module."
(while (and (< count maxdays) (funcall search re limit t))
(push (time-to-days
(org-time-string-to-time
- (or (org-match-string-no-properties 1)
- (org-match-string-no-properties 2))))
+ (or (match-string-no-properties 1)
+ (match-string-no-properties 2))))
closed-dates)
(setq count (1+ count))))
(list scheduled sr-days deadline dr-days closed-dates sr-type))))
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 8c277c4..da5b38e 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -495,7 +495,7 @@ When CHECK is given, prepare detailed information about duplicate IDs."
(goto-char (point-min))
(while (re-search-forward "^[ \t]*:ID:[ \t]+\\(\\S-+\\)[ \t]*$"
nil t)
- (setq id (org-match-string-no-properties 1))
+ (setq id (match-string-no-properties 1))
(if (member id found)
(progn
(message "Duplicate ID \"%s\", also in file %s"
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index 8357fd4..f9be735 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -139,13 +139,13 @@ during idle time."
(setq-local org-hide-leading-stars-before-indent-mode
org-hide-leading-stars)
(setq-local org-hide-leading-stars t))
- (org-add-hook 'filter-buffer-substring-functions
+ (add-hook 'filter-buffer-substring-functions
(lambda (fun start end delete)
(org-indent-remove-properties-from-string
(funcall fun start end delete)))
nil t)
- (org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
- (org-add-hook 'before-change-functions
+ (add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
+ (add-hook 'before-change-functions
'org-indent-notify-modified-headline nil 'local)
(and font-lock-mode (org-restart-font-lock))
(org-indent-remove-properties (point-min) (point-max))
@@ -314,7 +314,7 @@ stopped."
;; Headline or inline task.
((looking-at org-outline-regexp)
(let* ((nstars (- (match-end 0) (match-beginning 0) 1))
- (type (or (org-looking-at-p limited-re) 'inlinetask)))
+ (type (or (looking-at-p limited-re) 'inlinetask)))
(org-indent-set-line-properties nstars 0 type)
;; At an headline, define new value for LEVEL.
(unless (eq type 'inlinetask) (setq level nstars))))
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index b780f5c..391bb8f 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -167,9 +167,9 @@ The number of levels is controlled by `org-inlinetask-min-level'."
(stars-re (org-inlinetask-outline-regexp))
(task-beg-re (concat stars-re "\\(?:.*\\)"))
(task-end-re (concat stars-re "END[ \t]*$")))
- (or (org-looking-at-p task-beg-re)
+ (or (looking-at-p task-beg-re)
(and (re-search-forward "^\\*+[ \t]+" nil t)
- (progn (beginning-of-line) (org-looking-at-p task-end-re)))))))
+ (progn (beginning-of-line) (looking-at-p task-end-re)))))))
(defun org-inlinetask-goto-beginning ()
"Go to the beginning of the inline task at point."
@@ -177,7 +177,7 @@ The number of levels is controlled by `org-inlinetask-min-level'."
(let ((case-fold-search t)
(inlinetask-re (org-inlinetask-outline-regexp)))
(re-search-backward inlinetask-re nil t)
- (when (org-looking-at-p (concat inlinetask-re "END[ \t]*$"))
+ (when (looking-at-p (concat inlinetask-re "END[ \t]*$"))
(re-search-backward inlinetask-re nil t))))
(defun org-inlinetask-goto-end ()
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index f89fe47..744be3b 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -370,7 +370,7 @@ called with one argument, the key used for comparison."
t)))
reports)
(while (re-search-forward regexp nil t)
- (let ((key (upcase (org-match-string-no-properties 1))))
+ (let ((key (upcase (match-string-no-properties 1))))
(when (< (point)
(org-element-property :post-affiliated (org-element-at-point)))
(push
@@ -416,7 +416,7 @@ instead"
(list (org-element-property :begin datum)
(format "Deprecated syntax for \"%s\". \
Use header-args instead"
- (org-match-string-no-properties 1 value))))))
+ (match-string-no-properties 1 value))))))
(`node-property
(and (member-ignore-case key deprecated-babel-properties)
(list
@@ -757,7 +757,7 @@ Use \"export %s\" instead"
(defun org-lint-incomplete-drawer (_)
(let (reports)
(while (re-search-forward org-drawer-regexp nil t)
- (let ((name (org-trim (org-match-string-no-properties 0)))
+ (let ((name (org-trim (match-string-no-properties 0)))
(element (org-element-at-point)))
(pcase (org-element-type element)
((or `drawer `property-drawer)
@@ -812,7 +812,7 @@ Use \"export %s\" instead"
(regexp-opt org-element-dual-keywords)))
reports)
(while (re-search-forward regexp nil t)
- (let ((name (org-match-string-no-properties 1)))
+ (let ((name (match-string-no-properties 1)))
(unless (or (string-prefix-p "BEGIN" name t)
(string-prefix-p "END" name t)
(save-excursion
diff --git a/lisp/org-list.el b/lisp/org-list.el
index cd374ce..fc5bf37 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1330,7 +1330,7 @@ This function modifies STRUCT."
(size-offset (- item-size (length text-cut))))
;; 4. Insert effectively item into buffer.
(goto-char item)
- (org-indent-to-column ind)
+ (indent-to-column ind)
(insert body item-sep)
;; 5. Add new item to STRUCT.
(mapc (lambda (e)
@@ -1889,8 +1889,8 @@ Initial position of cursor is restored after the changes."
((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning))
;; Shift only non-empty lines.
- ((org-looking-at-p "^[ \t]*\\S-")
- (org-indent-line-to (+ (org-get-indentation) delta))))
+ ((looking-at-p "^[ \t]*\\S-")
+ (indent-line-to (+ (org-get-indentation) delta))))
(forward-line -1)))))
(modify-item
(function
@@ -1973,7 +1973,7 @@ Initial position of cursor is restored after the changes."
(while (< (point) down)
;; Ignore empty lines. Also ignore blocks and
;; drawers contents.
- (unless (org-looking-at-p "[ \t]*$")
+ (unless (looking-at-p "[ \t]*$")
(setq min-ind (min (org-get-indentation) min-ind))
(cond
((and (looking-at "#\\+BEGIN\\(:\\|_\\S-+\\)")
@@ -2808,7 +2808,7 @@ Return t at each successful move."
((and (= ind (car org-tab-ind-state))
(ignore-errors (org-list-indent-item-generic 1 t struct))))
(t (delete-region (point-at-bol) (point-at-eol))
- (org-indent-to-column (car org-tab-ind-state))
+ (indent-to-column (car org-tab-ind-state))
(insert (cdr org-tab-ind-state) " ")
;; Break cycle
(setq this-command 'identity)))
@@ -2911,7 +2911,7 @@ ignores hidden links."
(save-excursion (re-search-forward org-ts-regexp-both
(point-at-eol) t)))
(org-time-string-to-seconds (match-string 0)))
- (t (org-float-time now))))
+ (t (float-time now))))
((= dcst ?x) (or (and (stringp (match-string 1))
(match-string 1))
""))
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 4821909..952f17d 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -57,14 +57,12 @@
(defmacro org-called-interactively-p (&optional kind)
(declare (debug (&optional ("quote" symbolp)))) ;Why not just t?
- (if (featurep 'xemacs)
- `(interactive-p)
- (if (or (> emacs-major-version 23)
- (and (>= emacs-major-version 23)
- (>= emacs-minor-version 2)))
- ;; defined with no argument in <=23.1
- `(with-no-warnings (called-interactively-p ,kind))
- `(interactive-p))))
+ (if (or (> emacs-major-version 23)
+ (and (>= emacs-major-version 23)
+ (>= emacs-minor-version 2)))
+ ;; defined with no argument in <=23.1
+ `(with-no-warnings (called-interactively-p ,kind))
+ `(interactive-p)))
(defmacro org-bound-and-true-p (var)
"Return the value of symbol VAR if it is bound, else nil."
@@ -97,11 +95,6 @@ Otherwise return nil."
(setq ss (replace-match "\001-@[-`{-~" t t ss)))
ss)))
-(defmacro org-re (s)
- "Replace posix classes in regular expression."
- (declare (debug (form)))
- (if (featurep 'xemacs) `(org-substitute-posix-classes ,s) s))
-
(defmacro org-preserve-lc (&rest body)
(declare (debug (body)))
(org-with-gensyms (line col)
@@ -200,13 +193,6 @@ We use a macro so that the test can happen at compilation time."
org-emphasis t)
"Properties to remove when a string without properties is wanted.")
-(defsubst org-match-string-no-properties (num &optional string)
- (if (featurep 'xemacs)
- (let ((s (match-string num string)))
- (and s (remove-text-properties 0 (length s) org-rm-props s))
- s)
- (match-string-no-properties num string)))
-
(defsubst org-no-properties (s &optional restricted)
"Remove all text properties from string S.
When RESTRICTED is non-nil, only remove the properties listed
diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el
index 96e676d..6fc2cc5 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]+:" (line-beginning-position))
+ (when (looking-back ":[A-Za-z]+:" (line-beginning-position))
(skip-chars-backward ":A-Za-z")
(skip-chars-backward "\t ")))
@@ -575,7 +575,7 @@ This means, between the beginning of line and the point."
(beginning-of-line)
(looking-at "[ \t]*")
(open-line 1)
- (org-indent-to-column (- (match-end 0) (match-beginning 0)))
+ (indent-to-column (- (match-end 0) (match-beginning 0)))
(insert "+ "))
(:middle ; insert after
(end-of-line)
@@ -585,7 +585,7 @@ This means, between the beginning of line and the point."
(:end ; insert text here
(skip-chars-backward " \t")
(kill-region (point) (point-at-eol))
- (unless (org-looking-back org-mouse-punctuation (line-beginning-position))
+ (unless (looking-back org-mouse-punctuation (line-beginning-position))
(insert (concat org-mouse-punctuation " ")))))
(insert text)
(beginning-of-line))
@@ -643,7 +643,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" (- (point) 2)
+ (looking-back " \\|\t" (- (point) 2)
(line-beginning-position))))
(org-mouse-popup-global-menu))
((funcall get-context :checkbox)
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 4cc2bda..37b5ade 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -59,7 +59,7 @@
"Examine the thing at point and let the caller know what it is.
The return value is a string naming the thing at point."
(let ((beg1 (save-excursion
- (skip-chars-backward (org-re "[:alnum:]-_@"))
+ (skip-chars-backward "[:alnum:]-_@")
(point)))
(beg (save-excursion
(skip-chars-backward "a-zA-Z0-9-_:$")
@@ -95,10 +95,10 @@ The return value is a string naming the thing at point."
(skip-chars-backward "[ \t\n]")
;; org-drawer-regexp matches a whole line but while
;; looking-back, we just ignore trailing whitespaces
- (or (org-looking-back (substring org-drawer-regexp 0 -1)
- (line-beginning-position))
- (org-looking-back org-property-re
- (line-beginning-position)))))
+ (or (looking-back (substring org-drawer-regexp 0 -1)
+ (line-beginning-position))
+ (looking-back org-property-re
+ (line-beginning-position)))))
(cons "prop" nil))
((and (equal (char-before beg1) ?:)
(not (equal (char-after (point-at-bol)) ?*)))
diff --git a/lisp/org-src.el b/lisp/org-src.el
index c5c6101..f3a0960 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -376,7 +376,7 @@ Assume point is in the corresponding edit buffer."
(let ((ind (make-string indentation ?\s)))
(goto-char (point-min))
(while (not (eobp))
- (when (org-looking-at-p "[ \t]*\\S-") (insert ind))
+ (when (looking-at-p "[ \t]*\\S-") (insert ind))
(forward-line))))
(buffer-string))))
@@ -607,7 +607,7 @@ See also `org-src-mode-hook'."
(defun org-src-mode-configure-edit-buffer ()
(when (org-bound-and-true-p org-src--from-org-mode)
- (org-add-hook 'kill-buffer-hook #'org-src--remove-overlay nil 'local)
+ (add-hook 'kill-buffer-hook #'org-src--remove-overlay nil 'local)
(if (org-bound-and-true-p org-src--allow-write-back)
(progn
(setq buffer-offer-save t)
@@ -616,7 +616,7 @@ See also `org-src-mode-hook'."
"[" (buffer-name) "]")))
(setq buffer-read-only t))))
-(org-add-hook 'org-src-mode-hook #'org-src-mode-configure-edit-buffer)
+(add-hook 'org-src-mode-hook #'org-src-mode-configure-edit-buffer)
@@ -636,7 +636,7 @@ See also `org-src-mode-hook'."
(when org-src--babel-info
(org-src-associate-babel-session org-src--babel-info)))
-(org-add-hook 'org-src-mode-hook #'org-src-babel-configure-edit-buffer)
+(add-hook 'org-src-mode-hook #'org-src-babel-configure-edit-buffer)
(defmacro org-src-do-at-code-block (&rest body)
"Execute a command from an edit buffer in the Org mode buffer."
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 7d5e107..1739d24 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -672,7 +672,7 @@ extension of the given file name, and finally on the variable
(when (file-directory-p file)
(user-error "This is a directory path, not a file"))
(when (and (buffer-file-name (buffer-base-buffer))
- (org-file-equal-p
+ (file-equal-p
(file-truename file)
(file-truename (buffer-file-name (buffer-base-buffer)))))
(user-error "Please specify a file name that is different from current"))
@@ -1721,7 +1721,7 @@ numeric compare based on the type of the first key in the table."
((?t ?T)
(lambda (f)
(cond ((string-match org-ts-regexp-both f)
- (org-float-time
+ (float-time
(org-time-string-to-time (match-string 0 f))))
((string-match "[0-9]\\{1,2\\}:[0-9]\\{2\\}" f)
(org-hh:mm-string-to-minutes f))
@@ -2064,8 +2064,8 @@ current field. The mode exits automatically when the cursor leaves the
table (but see `org-table-exit-follow-field-mode-when-leaving-table')."
nil " TblFollow" nil
(if org-table-follow-field-mode
- (org-add-hook 'post-command-hook 'org-table-follow-fields-with-editor
- 'append 'local)
+ (add-hook 'post-command-hook 'org-table-follow-fields-with-editor
+ 'append 'local)
(remove-hook 'post-command-hook 'org-table-follow-fields-with-editor 'local)
(let* ((buf (get-buffer "*Org Table Edit Field*"))
(win (and buf (get-buffer-window buf))))
@@ -2303,7 +2303,7 @@ LOCATION is a buffer position, consider the formulas there."
(goto-char (org-table-end)))
(let ((case-fold-search t))
(when (looking-at "\\([ \t]*\n\\)*[ \t]*#\\+TBLFM: *\\(.*\\)")
- (let ((strings (org-split-string (org-match-string-no-properties 2)
+ (let ((strings (org-split-string (match-string-no-properties 2)
" *:: *"))
eq-alist seen)
(dolist (string strings (nreverse eq-alist))
@@ -3471,7 +3471,7 @@ borders of the table using the @< @> $< $> makers."
(when value
(setq new (replace-match
(concat (and pp "(") value (and pp ")")) t t new))))))
- (if org-table-formula-debug (org-propertize new :orig-formula f)) new))
+ (if org-table-formula-debug (propertize new :orig-formula f) new)))
(defun org-table-get-constant (const)
"Find the value for a parameter or constant in a formula.
@@ -3573,7 +3573,7 @@ Parameters get priority."
(setq-local org-window-configuration wc)
(setq-local org-selected-window sel-win)
(use-local-map org-table-fedit-map)
- (org-add-hook 'post-command-hook #'org-table-fedit-post-command t t)
+ (add-hook 'post-command-hook #'org-table-fedit-post-command t t)
(easy-menu-add org-table-fedit-menu)
(setq startline (org-current-line))
(dolist (entry eql)
@@ -3960,8 +3960,8 @@ When LOCAL is non-nil, show references for the table at point."
(when (and match (not (equal (match-beginning 0) (point-at-bol))))
(org-table-add-rectangle-overlay (match-beginning 0) (match-end 0)
'secondary-selection))
- (org-add-hook 'before-change-functions
- #'org-table-remove-rectangle-highlight)
+ (add-hook 'before-change-functions
+ #'org-table-remove-rectangle-highlight)
(when (eq what 'name) (setq var (substring match 1)))
(when (eq what 'range)
(unless (eq (string-to-char match) ?@) (setq match (concat "@" match)))
@@ -4273,15 +4273,15 @@ FACE, when non-nil, for the highlight."
(and c (setq minor-mode-map-alist
(cons c (delq c minor-mode-map-alist)))))
(setq-local org-table-may-need-update t)
- (org-add-hook 'before-change-functions 'org-before-change-function
- nil 'local)
+ (add-hook 'before-change-functions 'org-before-change-function
+ nil 'local)
(setq-local org-old-auto-fill-inhibit-regexp
- auto-fill-inhibit-regexp)
+ auto-fill-inhibit-regexp)
(setq-local auto-fill-inhibit-regexp
- (if auto-fill-inhibit-regexp
- (concat orgtbl-line-start-regexp "\\|"
- auto-fill-inhibit-regexp)
- orgtbl-line-start-regexp))
+ (if auto-fill-inhibit-regexp
+ (concat orgtbl-line-start-regexp "\\|"
+ auto-fill-inhibit-regexp)
+ orgtbl-line-start-regexp))
(add-to-invisibility-spec '(org-cwidth))
(when (fboundp 'font-lock-add-keywords)
(font-lock-add-keywords nil orgtbl-extra-font-lock-keywords)
diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index bec6e76..0e508cf 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -140,10 +140,10 @@ the region 0:00:00."
(setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s)))))
(setq org-timer-start-time
(seconds-to-time
- ;; Pass `current-time' result to `org-float-time'
- ;; (instead of calling without arguments) so that only
+ ;; Pass `current-time' result to `float-time' (instead
+ ;; of calling without arguments) so that only
;; `current-time' has to be overriden in tests.
- (- (org-float-time (current-time)) delta))))
+ (- (float-time (current-time)) delta))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(message "Timer start time set to %s, current value is %s"
@@ -159,8 +159,8 @@ With prefix arg STOP, stop it entirely."
(stop (org-timer-stop))
((not org-timer-start-time) (error "No timer is running"))
(org-timer-pause-time
- (let ((start-secs (org-float-time org-timer-start-time))
- (pause-secs (org-float-time org-timer-pause-time)))
+ (let ((start-secs (float-time org-timer-start-time))
+ (pause-secs (float-time org-timer-pause-time)))
(if org-timer-countdown-timer
(let ((new-secs (- start-secs pause-secs)))
(setq org-timer-countdown-timer
@@ -169,10 +169,10 @@ With prefix arg STOP, stop it entirely."
(setq org-timer-start-time
(time-add (current-time) (seconds-to-time new-secs))))
(setq org-timer-start-time
- ;; Pass `current-time' result to `org-float-time'
- ;; (instead of calling without arguments) so that only
+ ;; Pass `current-time' result to `float-time' (instead
+ ;; of calling without arguments) so that only
;; `current-time' has to be overriden in tests.
- (seconds-to-time (- (org-float-time (current-time))
+ (seconds-to-time (- (float-time (current-time))
(- pause-secs start-secs)))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
@@ -229,14 +229,14 @@ it in the buffer."
(abs (floor (org-timer-seconds))))))
(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
+ ;; Pass `current-time' result to `float-time' (instead of calling
+ ;; without arguments) so that only `current-time' has to be
;; overriden in tests.
(if org-timer-countdown-timer
- (- (org-float-time org-timer-start-time)
- (org-float-time (or org-timer-pause-time (current-time))))
- (- (org-float-time (or org-timer-pause-time (current-time)))
- (org-float-time org-timer-start-time))))
+ (- (float-time org-timer-start-time)
+ (float-time (or org-timer-pause-time (current-time))))
+ (- (float-time (or org-timer-pause-time (current-time)))
+ (float-time org-timer-start-time))))
;;;###autoload
(defun org-timer-change-times-in-region (beg end delta)
diff --git a/lisp/org.el b/lisp/org.el
index a80b962..d615de2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -875,10 +875,7 @@ can be used to switch TODO sets,
and properties can be edited by hand or in column view.
However, when the cursor is on a timestamp, shift-cursor commands
-will still edit the time stamp - this is just too good to give up.
-
-XEmacs user should have this variable set to nil, because
-`shift-select-mode' is in Emacs 23 or later only."
+will still edit the time stamp - this is just too good to give up."
:group 'org
:type '(choice
(const :tag "Never" nil)
@@ -1059,9 +1056,9 @@ become effective."
(defcustom org-use-extra-keys nil
"Non-nil means use extra key sequence definitions for certain commands.
-This happens automatically if you run XEmacs or if `window-system'
-is nil. This variable lets you do the same manually. You must
-set it before loading org.
+This happens automatically if `window-system' is nil. This
+variable lets you do the same manually. You must set it before
+loading org.
Example: on Carbon Emacs 22 running graphically, with an external
keyboard on a Powerbook, the default way of setting M-left might
@@ -1091,8 +1088,7 @@ therefore you'll have to restart Emacs to apply it after changing."
(defun org-key (key)
"Select key according to `org-replace-disputed-keys' and `org-disputed-keys'.
-Or return the original if not disputed.
-Also apply the translations defined in `org-xemacs-key-equivalents'."
+Or return the original if not disputed."
(when org-replace-disputed-keys
(let* ((nkey (key-description key))
(x (org-find-if (lambda (x)
@@ -1980,8 +1976,8 @@ In tables, the special behavior of RET has precedence."
(defcustom org-mouse-1-follows-link
(if (boundp 'mouse-1-click-follows-link) mouse-1-click-follows-link t)
"Non-nil means mouse-1 on a link will follow the link.
-A longer mouse click will still set point. Does not work on XEmacs.
-Needs to be set before org.el is loaded."
+A longer mouse click will still set point. Needs to be set
+before org.el is loaded."
:group 'org-link-follow
:version "24.4"
:package-version '(Org . "8.3")
@@ -4496,14 +4492,6 @@ This is needed for font-lock setup.")
;;; Functions and variables from their packages
;; Declared here to avoid compiler warnings
-
-;; XEmacs only
-(defvar outline-mode-menu-heading)
-(defvar outline-mode-menu-show)
-(defvar outline-mode-menu-hide)
-(defvar zmacs-regions) ; XEmacs regions
-
-;; Emacs only
(defvar mark-active)
;; Various packages
@@ -4578,7 +4566,7 @@ If `org-enable-table-editor' is nil, return nil unconditionally."
org-enable-table-editor
(save-excursion
(beginning-of-line)
- (org-looking-at-p (if table-type "[ \t]*[|+]" "[ \t]*|")))
+ (looking-at-p (if table-type "[ \t]*[|+]" "[ \t]*|")))
(or (not (derived-mode-p 'org-mode))
(let ((e (org-element-lineage (org-element-at-point) '(table) t)))
(and e (or table-type (eq (org-element-property :type e) 'org)))))))
@@ -5155,7 +5143,7 @@ related expressions."
"\\(?: +" org-todo-regexp "\\)?"
"\\(?: +\\(\\[#.\\]\\)\\)?"
"\\(?: +\\(.*?\\)\\)??"
- (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?")
+ "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?"
"[ \t]*$")
org-complex-heading-regexp-format
(concat "^\\(\\*+\\)"
@@ -5167,13 +5155,13 @@ related expressions."
"\\(%s\\)"
"\\(?: *\\[[0-9%%/]+\\]\\)*"
"\\)"
- (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?")
+ "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?"
"[ \t]*$")
org-todo-line-tags-regexp
(concat "^\\(\\*+\\)"
"\\(?: +" org-todo-regexp "\\)?"
"\\(?: +\\(.*?\\)\\)??"
- (org-re "\\(?:[ \t]+\\(:[[:alnum:]:_@#%]+:\\)\\)?")
+ "\\(?:[ \t]+\\(:[[:alnum:]:_@#%]+:\\)\\)?"
"[ \t]*$"))
(org-compute-latex-and-related-regexp)))))
@@ -5225,8 +5213,8 @@ Return value contains the following keys: `archive', `category',
((equal key "LINK")
(when (string-match "\\`\\(\\S-+\\)[ \t]+\\(.+\\)" value)
(let ((links (assq 'link alist))
- (pair (cons (org-match-string-no-properties 1 value)
- (org-match-string-no-properties 2 value))))
+ (pair (cons (match-string-no-properties 1 value)
+ (match-string-no-properties 2 value))))
(if links (push pair (cdr links))
(push (list 'link pair) alist)))))
((equal key "OPTIONS")
@@ -5243,8 +5231,8 @@ Return value contains the following keys: `archive', `category',
(when (string-match "\\(\\S-+\\)[ \t]+\\(.*\\)" value)
(let* ((property (assq 'property alist))
(value (org--update-property-plist
- (org-match-string-no-properties 1 value)
- (org-match-string-no-properties 2 value)
+ (match-string-no-properties 1 value)
+ (match-string-no-properties 2 value)
(cdr property))))
(if property (setcdr property value)
(push (cons 'property value) alist)))))
@@ -5463,7 +5451,6 @@ This variable is set by `org-before-change-function'.
(require 'outline)
(when (and (not (keymapp outline-mode-map)) (featurep 'allout))
(error "Conflict with outdated version of allout.el. Load org.el before allout.el, or upgrade to newer allout, for example by switching to Emacs 22"))
-(require 'noutline "noutline" 'noerror) ;; stock XEmacs does not have it
;; Other stuff we need.
(require 'time-date)
@@ -5548,9 +5535,9 @@ The following commands are available:
(setq-local font-lock-unfontify-region-function 'org-unfontify-region)
;; Activate before-change-function
(setq-local org-table-may-need-update t)
- (org-add-hook 'before-change-functions 'org-before-change-function nil 'local)
+ (add-hook 'before-change-functions 'org-before-change-function nil 'local)
;; Check for running clock before killing a buffer
- (org-add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
+ (add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
;; Initialize macros templates.
(org-macro-initialize-templates)
;; Initialize radio targets.
@@ -5674,8 +5661,8 @@ the rounding returns a past time."
(apply 'encode-time
(append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r)))))
(nthcdr 2 time))))
- (if (and past (< (org-float-time (time-subtract (current-time) res)) 0))
- (seconds-to-time (- (org-float-time res) (* r 60)))
+ (if (and past (< (float-time (time-subtract (current-time) res)) 0))
+ (seconds-to-time (- (float-time res) (* r 60)))
res))))
(defun org-today ()
@@ -5791,7 +5778,7 @@ This should be called after the variable `org-link-types' has changed."
org-plain-link-re
(concat
"\\<" types-re ":"
- (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
+ "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)")
;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
org-bracket-link-regexp
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
@@ -5906,7 +5893,7 @@ prompted for."
(not (org-in-src-block-p)))
(let ((face (get-text-property (max (1- (match-beginning 0)) (point-min))
'face))
- (link (org-match-string-no-properties 0)))
+ (link (match-string-no-properties 0)))
(unless (if (consp face) (memq 'org-tag face) (eq 'org-tag face))
(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
(add-text-properties (match-beginning 0) (match-end 0)
@@ -6097,7 +6084,7 @@ by a #."
"Add text properties for bracketed links."
(when (and (re-search-forward org-bracket-link-regexp limit t)
(not (org-in-src-block-p)))
- (let* ((hl (org-match-string-no-properties 1))
+ (let* ((hl (match-string-no-properties 1))
(help (concat "LINK: " (save-match-data (org-link-unescape hl))))
(ip (org-maybe-intangible
(list 'invisible 'org-link
@@ -6292,7 +6279,7 @@ done, nil otherwise."
(defun org-activate-tags (limit)
(when (re-search-forward
- (org-re "^\\*+.*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") limit t)
+ "^\\*+.*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$" limit t)
(org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1))
(add-text-properties (match-beginning 1) (match-end 1)
(list 'mouse-face 'highlight
@@ -6484,7 +6471,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
(message "Entities are now displayed as UTF8 characters")
(save-restriction
(widen)
- (org-decompose-region (point-min) (point-max))
+ (decompose-region (point-min) (point-max))
(message "Entities are now displayed as plain text"))))
(defvar-local org-custom-properties-overlays nil
@@ -6624,7 +6611,7 @@ If TAG is a number, get the corresponding match group."
(inhibit-read-only t) (inhibit-point-motion-hooks t)
(inhibit-modification-hooks t)
deactivate-mark buffer-file-name buffer-file-truename)
- (org-decompose-region beg end)
+ (decompose-region beg end)
(remove-text-properties beg end
'(mouse-face t keymap t org-linked-text t
invisible t intangible t
@@ -6663,8 +6650,8 @@ and subscripts."
(link-p (get-text-property mpos 'mouse-face))
(keyw-p (eq 'org-special-keyword (get-text-property mpos 'face))))
(goto-char (point-at-bol))
- (setq table-p (org-looking-at-p org-table-dataline-regexp)
- comment-p (org-looking-at-p "^[ \t]*#[ +]"))
+ (setq table-p (looking-at-p org-table-dataline-regexp)
+ comment-p (looking-at-p "^[ \t]*#[ +]"))
(goto-char pos)
;; Handle a_b^c
(when (member (char-after) '(?_ ?^)) (goto-char (1- pos)))
@@ -6935,7 +6922,6 @@ Use \\[org-edit-special] to edit table.el tables"))
(org-list-search-forward (org-item-beginning-re) eos t)))))
;; Determine end invisible part of buffer (EOL)
(beginning-of-line 2)
- ;; XEmacs doesn't have `next-single-char-property-change'
(while (and (not (eobp)) ;This is like `next-line'.
(get-char-property (1- (point)) 'invisible))
(goto-char (next-single-char-property-change (point) 'invisible))
@@ -7268,7 +7254,7 @@ show that drawer instead."
(let ((drawer (or element
(and (save-excursion
(beginning-of-line)
- (org-looking-at-p org-drawer-regexp))
+ (looking-at-p org-drawer-regexp))
(org-element-at-point)))))
(when (memq (org-element-type drawer) '(drawer property-drawer))
(let ((post (org-element-property :post-affiliated drawer)))
@@ -7427,8 +7413,8 @@ a block. Return a non-nil value when toggling is successful."
(add-hook 'org-tab-first-hook 'org-hide-block-toggle-maybe)
;; Remove overlays when changing major mode
(add-hook 'org-mode-hook
- (lambda () (org-add-hook 'change-major-mode-hook
- 'org-show-block-all 'append 'local)))
+ (lambda () (add-hook 'change-major-mode-hook
+ 'org-show-block-all 'append 'local)))
;;; Org-goto
@@ -7877,13 +7863,13 @@ unconditionally."
;; If we insert after content, move there and clean up
;; whitespace.
(when (and respect-content
- (not (org-looking-at-p org-outline-regexp-bol)))
+ (not (looking-at-p org-outline-regexp-bol)))
(if (not (org-before-first-heading-p))
(org-end-of-subtree nil t)
(re-search-forward org-outline-regexp-bol)
(beginning-of-line 0))
(skip-chars-backward " \r\t\n")
- (and (not (org-looking-back "^\\*+" (line-beginning-position)))
+ (and (not (looking-back "^\\*+" (line-beginning-position)))
(looking-at "[ \t]+") (replace-match ""))
(unless (eobp) (forward-char 1))
(when (looking-at "^\\*")
@@ -7998,10 +7984,10 @@ This is a list with the following elements:
nil)
(list (length (match-string 1))
(org-reduced-level (length (match-string 1)))
- (org-match-string-no-properties 2)
+ (match-string-no-properties 2)
(and (match-end 3) (aref (match-string 3) 2))
- (org-match-string-no-properties 4)
- (org-match-string-no-properties 5))))))
+ (match-string-no-properties 4)
+ (match-string-no-properties 5))))))
(defun org-get-entry ()
"Get the entry text, after heading, entire subtree."
@@ -8325,7 +8311,7 @@ Assume point is at a heading or an inlinetask beginning."
(point)))
(forward-line)
;; Indent properly planning info and property drawer.
- (when (org-looking-at-p org-planning-line-re)
+ (when (looking-at-p org-planning-line-re)
(org-indent-line)
(forward-line))
(when (looking-at org-property-drawer-re)
@@ -8346,12 +8332,12 @@ Assume point is at a heading or an inlinetask beginning."
(save-excursion
(while (not (eobp))
(cond
- ((org-looking-at-p "[ \t]*$") (forward-line))
- ((and (org-looking-at-p org-footnote-definition-re)
+ ((looking-at-p "[ \t]*$") (forward-line))
+ ((and (looking-at-p org-footnote-definition-re)
(let ((e (org-element-at-point)))
(and (eq (org-element-type e) 'footnote-definition)
(goto-char (org-element-property :end e))))))
- ((org-looking-at-p org-outline-regexp) (forward-line))
+ ((looking-at-p org-outline-regexp) (forward-line))
;; Give up if shifting would move before column 0 or
;; if it would introduce a headline or a footnote
;; definition.
@@ -8359,13 +8345,13 @@ Assume point is at a heading or an inlinetask beginning."
(skip-chars-forward " \t")
(let ((ind (current-column)))
(when (or (< ind diff)
- (and (= ind diff) (org-looking-at-p forbidden-re)))
+ (and (= ind diff) (looking-at-p forbidden-re)))
(throw 'no-shift nil)))
;; Ignore contents of example blocks and source
;; blocks if their indentation is meant to be
;; preserved. Jump to block's closing line.
(beginning-of-line)
- (or (and (org-looking-at-p "[ \t]*#\\+BEGIN_\\(EXAMPLE\\|SRC\\)")
+ (or (and (looking-at-p "[ \t]*#\\+BEGIN_\\(EXAMPLE\\|SRC\\)")
(let ((e (org-element-at-point)))
(and (memq (org-element-type e)
'(example-block src-block))
@@ -8381,16 +8367,16 @@ Assume point is at a heading or an inlinetask beginning."
;; when indentation is meant to be preserved.
(while (not (eobp))
(cond
- ((and (org-looking-at-p org-footnote-definition-re)
+ ((and (looking-at-p org-footnote-definition-re)
(let ((e (org-element-at-point)))
(and (eq (org-element-type e) 'footnote-definition)
(goto-char (org-element-property :end e))))))
- ((org-looking-at-p org-outline-regexp) (forward-line))
- ((org-looking-at-p "[ \t]*$") (forward-line))
+ ((looking-at-p org-outline-regexp) (forward-line))
+ ((looking-at-p "[ \t]*$") (forward-line))
(t
- (org-indent-line-to (+ (org-get-indentation) diff))
+ (indent-line-to (+ (org-get-indentation) diff))
(beginning-of-line)
- (or (and (org-looking-at-p "[ \t]*#\\+BEGIN_\\(EXAMPLE\\|SRC\\)")
+ (or (and (looking-at-p "[ \t]*#\\+BEGIN_\\(EXAMPLE\\|SRC\\)")
(let ((e (org-element-at-point)))
(and (memq (org-element-type e)
'(example-block src-block))
@@ -9087,24 +9073,24 @@ When sorting is done, call `org-after-sorting-entries-or-items-hook'."
(if (or (re-search-forward org-ts-regexp end t)
(re-search-forward org-ts-regexp-both end t))
(org-time-string-to-seconds (match-string 0))
- (org-float-time now))))
+ (float-time now))))
((= dcst ?c)
(let ((end (save-excursion (outline-next-heading) (point))))
(if (re-search-forward
(concat "^[ \t]*\\[" org-ts-regexp1 "\\]")
end t)
(org-time-string-to-seconds (match-string 0))
- (org-float-time now))))
+ (float-time now))))
((= dcst ?s)
(let ((end (save-excursion (outline-next-heading) (point))))
(if (re-search-forward org-scheduled-time-regexp end t)
(org-time-string-to-seconds (match-string 1))
- (org-float-time now))))
+ (float-time now))))
((= dcst ?d)
(let ((end (save-excursion (outline-next-heading) (point))))
(if (re-search-forward org-deadline-time-regexp end t)
(org-time-string-to-seconds (match-string 1))
- (org-float-time now))))
+ (float-time now))))
((= dcst ?p)
(if (re-search-forward org-priority-regexp (point-at-eol) t)
(string-to-char (match-string 2))
@@ -9575,7 +9561,7 @@ the value of the drawer property."
(widen)
(goto-char (point-min))
(while (re-search-forward (concat "^[ \t]*:" dprop ": +\\(.*\\)[ \t]*$") nil t)
- (org-refresh-property tprop (org-match-string-no-properties 1))))))))
+ (org-refresh-property tprop (match-string-no-properties 1))))))))
(defun org-refresh-property (tprop p)
"Refresh the buffer text property TPROP from the drawer property P.
@@ -9627,7 +9613,7 @@ The refresh happens only for the current tree (not subtree)."
(goto-char (point-min))
(let ((regexp (org-re-property "CATEGORY")))
(while (re-search-forward regexp nil t)
- (let ((value (org-match-string-no-properties 3)))
+ (let ((value (match-string-no-properties 3)))
(when (org-at-property-p)
(put-text-property
(save-excursion (org-back-to-heading t) (point))
@@ -9819,7 +9805,7 @@ active region."
(beginning-of-line)
(looking-at (concat (format org-coderef-label-format "\\(.*?\\)")
"[ \t]*$")))
- (setq link (format "(%s)" (org-match-string-no-properties 1))))
+ (setq link (format "(%s)" (match-string-no-properties 1))))
((org-called-interactively-p 'any)
(let (label)
(while (or (not label)
@@ -10358,10 +10344,10 @@ be used as the default description."
((org-in-regexp org-bracket-link-regexp 1)
;; We do have a link at point, and we are going to edit it.
(setq remove (list (match-beginning 0) (match-end 0)))
- (setq desc (when (match-end 3) (org-match-string-no-properties 3)))
+ (setq desc (when (match-end 3) (match-string-no-properties 3)))
(setq link (read-string "Link: "
(org-link-unescape
- (org-match-string-no-properties 1)))))
+ (match-string-no-properties 1)))))
((or (org-in-regexp org-angle-link-re)
(org-in-regexp org-plain-link-re))
;; Convert to bracket link
@@ -11161,7 +11147,7 @@ of matched result, with is either `dedicated' or `fuzzy'."
sep)))
(if starred (substring title 1) title))
sep "?"
- (org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
+ "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?"
"[ \t]*$")))
(goto-char (point-min))
(re-search-forward re nil t)))
@@ -11535,7 +11521,7 @@ be opened in Emacs."
(when add-auto-mode
(mapcar (lambda (x) (cons (car x) 'emacs)) auto-mode-alist))))
-(defvar ange-ftp-name-format) ; to silence the XEmacs compiler.
+(defvar ange-ftp-name-format)
(defun org-file-remote-p (file)
"Test whether FILE specifies a location on a remote system.
Return non-nil if the location is indeed remote.
@@ -11692,7 +11678,7 @@ order.")
(beginning-of-line)
(looking-at org-complex-heading-regexp)
(let ((begin (point))
- (heading (org-match-string-no-properties 4)))
+ (heading (match-string-no-properties 4)))
(unless (or (and
org-refile-target-verify-function
(not
@@ -11749,7 +11735,7 @@ Assume buffer is widened and point is on a headline."
(org-link-display-format
(replace-regexp-in-string
"\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" ""
- (org-match-string-no-properties 4))))))))
+ (match-string-no-properties 4))))))))
(if (org-up-heading-safe)
(let ((path (cons heading (org--get-outline-path-1 use-cache))))
(when use-cache
@@ -12138,7 +12124,7 @@ this function appends the default value from
(widen)
(goto-char pos)
(beginning-of-line 1)
- (unless (org-looking-at-p re)
+ (unless (looking-at-p re)
(user-error "Invalid refile position, please clear the cache with `C-0 C-c C-w' before refiling")))))))))
(defun org-refile-new-child (parent-target child)
@@ -13534,7 +13520,7 @@ nil."
;; planning info location is fixed in the section.
(org-with-wide-buffer
(beginning-of-line)
- (and (org-looking-at-p org-planning-line-re)
+ (and (looking-at-p org-planning-line-re)
(eq (point)
(ignore-errors
(if (and (featurep 'org-inlinetask) (org-inlinetask-in-task-p))
@@ -13582,7 +13568,7 @@ WHAT entry will also be removed."
(org-back-to-heading t)
(forward-line)
(unless (bolp) (insert "\n"))
- (cond ((org-looking-at-p org-planning-line-re)
+ (cond ((looking-at-p org-planning-line-re)
;; Move to current indentation.
(skip-chars-forward " \t")
;; Check if we have to remove something.
@@ -13606,7 +13592,7 @@ WHAT entry will also be removed."
(line-end-position))))))
;; If there is nothing more to add and no more keyword
;; is left, remove the line completely.
- (if (and (org-looking-at-p "[ \t]*$") (not what))
+ (if (and (looking-at-p "[ \t]*$") (not what))
(delete-region (line-beginning-position)
(line-beginning-position 2))
;; If we removed last keyword, do not leave trailing
@@ -13620,7 +13606,7 @@ WHAT entry will also be removed."
(t (insert-before-markers "\n")
(backward-char 1)
(when org-adapt-indentation
- (org-indent-to-column (1+ (org-outline-level))))))
+ (indent-to-column (1+ (org-outline-level))))))
(when what
;; Insert planning keyword.
(insert (cl-case what
@@ -13734,7 +13720,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
("%T" . ,org-ts-regexp)
("%u" . ".*?")
("%U" . ".*?")))))))
- (while (org-looking-at-p regexp)
+ (while (looking-at-p regexp)
(goto-char (or (org-list-get-next-item (point) struct prevs)
(org-list-get-item-end (point) struct)))))))
@@ -13840,7 +13826,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
;; Otherwise, indent line like a regular one.
(let ((itemp (org-in-item-p)))
(if itemp
- (org-indent-line-to
+ (indent-line-to
(let ((struct (save-excursion
(goto-char itemp) (org-list-struct))))
(org-list-get-ind (org-list-get-top-point struct) struct)))
@@ -13849,7 +13835,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
(let ((ind (org-list-item-body-column (line-beginning-position))))
(dolist (line lines)
(insert "\n")
- (org-indent-line-to ind)
+ (indent-line-to ind)
(insert line)))
(message "Note stored")
(org-back-to-heading t)
@@ -13988,8 +13974,8 @@ The function must neither move point nor alter narrowing."
(org-highlight-new-match (match-beginning 0) (match-end 0)))
(org-show-context 'occur-tree)))))
(when org-remove-highlights-with-change
- (org-add-hook 'before-change-functions 'org-remove-occur-highlights
- nil 'local))
+ (add-hook 'before-change-functions 'org-remove-occur-highlights
+ nil 'local))
(unless org-sparse-tree-open-archived-trees
(org-hide-archived-subtrees (point-min) (point-max)))
(run-hooks 'org-occur-hook)
@@ -14286,8 +14272,8 @@ headlines matching this string."
(concat "\\*\\{" (number-to-string start-level) "\\} ")
org-outline-regexp)
" *\\(\\<\\("
- (mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
- (org-re "\\)\\>\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$")))
+ (mapconcat #'regexp-quote org-todo-keywords-1 "\\|")
+ "\\)\\>\\)? *\\(.*?\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*$"))
(props (list 'face 'default
'done-face 'org-agenda-done
'undone-face 'default
@@ -14319,8 +14305,8 @@ headlines matching this string."
(catch :skip
(setq todo
;; TODO: is the 1-2 difference a bug?
- (when (match-end 1) (org-match-string-no-properties 2))
- tags (when (match-end 4) (org-match-string-no-properties 4)))
+ (when (match-end 1) (match-string-no-properties 2))
+ tags (when (match-end 4) (match-string-no-properties 4)))
(goto-char (setq lspos (match-beginning 0)))
(setq level (org-reduced-level (org-outline-level))
category (org-get-category))
@@ -14527,7 +14513,7 @@ See also `org-scan-tags'."
'org-tags-completion-function nil nil nil 'org-tags-history))))
(let ((match0 match)
- (re (org-re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL\\([<=>]\\{1,2\\}\\)\\([0-9]+\\)\\|\\(\\(?:[[:alnum:]_]+\\(?:\\\\-\\)*\\)+\\)\\([<>=]\\{1,2\\}\\)\\({[^}]+}\\|\"[^\"]*\"\\|-?[.0-9]+\\(?:[eE][-+]?[0-9]+\\)?\\)\\|[[:alnum:]_@#%]+\\)"))
+ (re "^&?\\([-+:]\\)?\\({[^}]+}\\|LEVEL\\([<=>]\\{1,2\\}\\)\\([0-9]+\\)\\|\\(\\(?:[[:alnum:]_]+\\(?:\\\\-\\)*\\)+\\)\\([<>=]\\{1,2\\}\\)\\({[^}]+}\\|\"[^\"]*\"\\|-?[.0-9]+\\(?:[eE][-+]?[0-9]+\\)?\\)\\|[[:alnum:]_@#%]+\\)")
(start 0)
tagsmatch todomatch tagsmatcher todomatcher)
@@ -14848,7 +14834,7 @@ epoch to the beginning of today (00:00)."
(defvar org-add-colon-after-tag-completion nil) ;; dynamically scoped param
(defvar org-tags-overlay (make-overlay 1 1))
-(org-detach-overlay org-tags-overlay)
+(delete-overlay org-tags-overlay)
(defun org-get-local-tags-at (&optional pos)
"Get a list of tags defined in the current headline."
@@ -14882,10 +14868,9 @@ ignore inherited ones."
(org-back-to-heading t)
(while (not (equal lastpos (point)))
(setq lastpos (point))
- (when (looking-at
- (org-re "[^\r\n]+?:\\([[:alnum:]_@#%:]+\\):[ \t]*$"))
+ (when (looking-at ".+:\\([[:alnum:]_@#%:]+\\):[ \t]*$")
(setq ltags (org-split-string
- (org-match-string-no-properties 1) ":"))
+ (match-string-no-properties 1) ":"))
(when parent
(setq ltags (mapcar 'org-add-prop-inherited ltags)))
(setq tags (append
@@ -14916,7 +14901,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
(let (res current)
(save-excursion
(org-back-to-heading t)
- (if (re-search-forward (org-re "[ \t]:\\([[:alnum:]_@#%:]+\\):[ \t]*$")
+ (if (re-search-forward "[ \t]:\\([[:alnum:]_@#%:]+\\):[ \t]*$"
(point-at-eol) t)
(progn
(setq current (match-string 1))
@@ -14947,7 +14932,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
"Align tags on the current headline to TO-COL."
(let ((pos (point)) (col (current-column)) ncol tags-l p)
(beginning-of-line 1)
- (if (and (looking-at (org-re ".*?\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))
+ (if (and (looking-at ".*?\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
(< pos (match-beginning 2)))
(progn
(setq tags-l (- (match-end 2) (match-beginning 2)))
@@ -15098,7 +15083,7 @@ When JUST-ALIGN is non-nil, only align tags."
(setq tags
(mapconcat
#'identity
- (sort (org-split-string tags (org-re "[^[:alnum:]_@#%]+"))
+ (sort (org-split-string tags "[^[:alnum:]_@#%]+")
org-tags-sort-function)
":")))
@@ -15256,8 +15241,7 @@ Returns the new tags string, or nil to not change the current settings."
groups ingroup intaggroup)
(save-excursion
(beginning-of-line 1)
- (if (looking-at
- (org-re ".*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))
+ (if (looking-at ".*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
(setq ov-start (match-beginning 1)
ov-end (match-end 1)
ov-prefix "")
@@ -15372,7 +15356,7 @@ Returns the new tags string, or nil to not change the current settings."
(org-fit-window-to-buffer)))
((or (= c ?\C-g)
(and (= c ?q) (not (rassoc c ntable))))
- (org-detach-overlay org-tags-overlay)
+ (delete-overlay org-tags-overlay)
(setq quit-flag t))
((= c ?\ )
(setq current nil)
@@ -15416,8 +15400,7 @@ Returns the new tags string, or nil to not change the current settings."
(delete-region (point) (point-at-eol))
(org-fast-tag-insert "Current" current c-face)
(org-set-current-tags-overlay current ov-prefix)
- (while (re-search-forward
- (org-re "\\[.\\] \\([[:alnum:]_@#%]+\\)") nil t)
+ (while (re-search-forward "\\[.\\] \\([[:alnum:]_@#%]+\\)" nil t)
(setq tg (match-string 1))
(add-text-properties
(match-beginning 1) (match-end 1)
@@ -15427,7 +15410,7 @@ Returns the new tags string, or nil to not change the current settings."
((member tg inherited) i-face)
(t (get-text-property (match-beginning 1) 'face))))))
(goto-char (point-min)))))
- (org-detach-overlay org-tags-overlay)
+ (delete-overlay org-tags-overlay)
(if rtn
(mapconcat 'identity current ":")
nil))))
@@ -15438,8 +15421,8 @@ Returns the new tags string, or nil to not change the current settings."
(user-error "Not on a heading"))
(save-excursion
(beginning-of-line 1)
- (if (looking-at (org-re ".*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))
- (org-match-string-no-properties 1)
+ (if (looking-at ".*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$")
+ (match-string-no-properties 1)
"")))
(defun org-get-tags ()
@@ -15451,11 +15434,10 @@ Returns the new tags string, or nil to not change the current settings."
(org-with-wide-buffer
(goto-char (point-min))
(let ((tag-re (concat org-outline-regexp-bol
- "\\(?:.*?[ \t]\\)?"
- (org-re ":\\([[:alnum:]_@#%:]+\\):[ \t]*$")))
+ "\\(?:.*?[ \t]\\)?:\\([[:alnum:]_@#%:]+\\):[ \t]*$"))
tags)
(while (re-search-forward tag-re nil t)
- (dolist (tag (org-split-string (org-match-string-no-properties 1) ":"))
+ (dolist (tag (org-split-string (match-string-no-properties 1) ":"))
(push tag tags)))
(mapcar #'list (append org-file-tags (org-uniquify tags))))))
@@ -15651,7 +15633,7 @@ return nil."
(org-back-to-heading t))
(t (org-with-limited-levels (org-back-to-heading t))))))
(forward-line)
- (when (org-looking-at-p org-planning-line-re) (forward-line))
+ (when (looking-at-p org-planning-line-re) (forward-line))
(cond ((looking-at org-property-drawer-re)
(forward-line)
(cons (point) (progn (goto-char (match-end 0))
@@ -15801,12 +15783,12 @@ strings."
(when (or (not specific) (string= specific "TODO"))
(let ((case-fold-search nil))
(when (and (looking-at org-todo-line-regexp) (match-end 2))
- (push (cons "TODO" (org-match-string-no-properties 2)) props)))
+ (push (cons "TODO" (match-string-no-properties 2)) props)))
(when specific (throw 'exit props)))
(when (or (not specific) (string= specific "PRIORITY"))
(push (cons "PRIORITY"
(if (looking-at org-priority-regexp)
- (org-match-string-no-properties 2)
+ (match-string-no-properties 2)
(char-to-string org-default-priority)))
props)
(when specific (throw 'exit props)))
@@ -15831,7 +15813,7 @@ strings."
(when (or (not specific)
(member specific '("CLOSED" "DEADLINE" "SCHEDULED")))
(forward-line)
- (when (org-looking-at-p org-planning-line-re)
+ (when (looking-at-p org-planning-line-re)
(end-of-line)
(let ((bol (line-beginning-position))
;; Backward compatibility: time keywords used to
@@ -15848,7 +15830,7 @@ strings."
(skip-chars-forward " \t")
(and (looking-at org-ts-regexp-both)
(push (cons (car pair)
- (org-match-string-no-properties 0))
+ (match-string-no-properties 0))
props)))))))
(when specific (throw 'exit props)))
(when (or (not specific)
@@ -15906,7 +15888,7 @@ strings."
(forward-line)
;; Then find timestamps in the section, skipping
;; planning line.
- (when (org-looking-at-p org-planning-line-re)
+ (when (looking-at-p org-planning-line-re)
(forward-line))
(let ((end (save-excursion (outline-next-heading))))
(setq props (nconc (funcall find-ts end ts) props))))))))
@@ -15928,10 +15910,10 @@ strings."
;; after its extension. We also forbid standard
;; properties to be named as special properties.
(while (re-search-forward org-property-re end t)
- (let* ((key (upcase (org-match-string-no-properties 2)))
+ (let* ((key (upcase (match-string-no-properties 2)))
(extendp (org-string-match-p "\\+\\'" key))
(key-base (if extendp (substring key 0 -1) key))
- (value (org-match-string-no-properties 3)))
+ (value (match-string-no-properties 3)))
(cond
((member-ignore-case key-base org-special-properties))
(extendp
@@ -15964,12 +15946,12 @@ unless LITERAL-NIL is non-nil."
(save-excursion
(let ((v (and (re-search-forward
(org-re-property property nil t) end t)
- (org-match-string-no-properties 3))))
+ (match-string-no-properties 3))))
(list (if literal-nil v (org-not-nil v)))))))
;; Find additional values.
(let* ((property+ (org-re-property (concat property "+") nil t)))
(while (re-search-forward property+ end t)
- (push (org-match-string-no-properties 3) value)))
+ (push (match-string-no-properties 3) value)))
;; Return final values.
(and (not (equal value '(nil))) (nreverse value))))))
@@ -16177,7 +16159,7 @@ decreases scheduled or deadline date by one day."
(org-set-tags nil 'align))
((equal property "SCHEDULED")
(forward-line)
- (if (and (org-looking-at-p org-planning-line-re)
+ (if (and (looking-at-p org-planning-line-re)
(re-search-forward
org-scheduled-time-regexp (line-end-position) t))
(cond ((string= value "earlier") (org-timestamp-change -1 'day))
@@ -16189,7 +16171,7 @@ decreases scheduled or deadline date by one day."
(org-schedule nil value))))
((equal property "DEADLINE")
(forward-line)
- (if (and (org-looking-at-p org-planning-line-re)
+ (if (and (looking-at-p org-planning-line-re)
(re-search-forward
org-deadline-time-regexp (line-end-position) t))
(cond ((string= value "earlier") (org-timestamp-change -1 'day))
@@ -16270,7 +16252,7 @@ automatically performed, such drawers will be silently ignored."
(if (< begin (point)) (throw 'skip nil) (goto-char begin))
(while (< (point) end)
(let ((p (progn (looking-at org-property-re)
- (org-match-string-no-properties 2))))
+ (match-string-no-properties 2))))
;; Only add true property name, not extension symbol.
(push (if (not (org-string-match-p "\\+\\'" p)) p
(substring p 0 -1))
@@ -16286,7 +16268,7 @@ automatically performed, such drawers will be silently ignored."
(start 0))
(while (string-match "%[0-9]*\\(\\S-+\\)" value start)
(setq start (match-end 0))
- (let ((p (org-match-string-no-properties 1 value)))
+ (let ((p (match-string-no-properties 1 value)))
(unless (member-ignore-case p org-special-properties)
(push p props))))))))))
(sort (delete-dups props) (lambda (a b) (string< (upcase a) (upcase b))))))
@@ -16309,8 +16291,8 @@ automatically performed, such drawers will be silently ignored."
(org-back-to-heading t)
(org-with-limited-levels (org-back-to-heading t)))
(forward-line)
- (when (org-looking-at-p org-planning-line-re) (forward-line))
- (unless (org-looking-at-p org-property-drawer-re)
+ (when (looking-at-p org-planning-line-re) (forward-line))
+ (unless (looking-at-p org-property-drawer-re)
;; Make sure we start editing a line from current entry, not from
;; next one. It prevents extending text properties or overlays
;; belonging to the latter.
@@ -16418,7 +16400,7 @@ This is computed according to `org-property-set-functions-alist'."
"Read a property name."
(let ((completion-ignore-case t)
(default-prop (or (and (org-at-property-p)
- (org-match-string-no-properties 2))
+ (match-string-no-properties 2))
org-last-set-property)))
(org-completing-read
(concat "Property"
@@ -16533,7 +16515,7 @@ then applies it to the property in the column format's scope."
(interactive)
(unless (org-at-property-p)
(user-error "Not at a property"))
- (let ((prop (org-match-string-no-properties 2)))
+ (let ((prop (match-string-no-properties 2)))
(org-columns-get-format-and-top-level)
(unless (nth 3 (assoc-string prop org-columns-current-fmt-compiled t))
(user-error "No operator defined for property %s" prop))
@@ -16818,7 +16800,7 @@ So these are more for recording a certain time/date."
(defvar org-date-ovl (make-overlay 1 1))
(overlay-put org-date-ovl 'face 'org-date-selected)
-(org-detach-overlay org-date-ovl)
+(delete-overlay org-date-ovl)
(defvar org-ans1) ; dynamically scoped parameter
(defvar org-ans2) ; dynamically scoped parameter
@@ -16840,9 +16822,9 @@ So these are more for recording a certain time/date."
(org-defkey map (kbd ".")
(lambda () (interactive)
;; Are we at the beginning of the prompt?
- (if (org-looking-back "^[^:]+: "
- (let ((inhibit-field-text-motion t))
- (line-beginning-position)))
+ (if (looking-back "^[^:]+: "
+ (let ((inhibit-field-text-motion t))
+ (line-beginning-position)))
(org-eval-in-calendar '(calendar-goto-today))
(insert "."))))
(org-defkey map (kbd "C-.")
@@ -17397,7 +17379,7 @@ Unless KEEPDATE is non-nil, update `org-ans2' to the cursor date."
(setq org-ans2 (format-time-string "%Y-%m-%d" time))))
(move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
(select-window sw)
- (org-select-frame-set-input-focus sf)))
+ (select-frame-set-input-focus sf)))
(defun org-calendar-select ()
"Return to `org-read-date' with the date currently selected.
@@ -17489,7 +17471,7 @@ Don't touch the rest."
(defun org-time-stamp-to-now (timestamp-string &optional seconds)
"Difference between TIMESTAMP-STRING and now in days.
If SECONDS is non-nil, return the difference in seconds."
- (let ((fdiff (if seconds 'org-float-time 'time-to-days)))
+ (let ((fdiff (if seconds #'float-time #'time-to-days)))
(- (funcall fdiff (org-time-string-to-time timestamp-string))
(funcall fdiff (current-time)))))
@@ -17672,8 +17654,8 @@ days in order to avoid rounding problems."
(match-end (match-end 0))
(time1 (org-time-string-to-time ts1))
(time2 (org-time-string-to-time ts2))
- (t1 (org-float-time time1))
- (t2 (org-float-time time2))
+ (t1 (float-time time1))
+ (t2 (float-time time2))
(diff (abs (- t2 t1)))
(negative (< (- t2 t1) 0))
;; (ys (floor (* 365 24 60 60)))
@@ -17742,7 +17724,7 @@ days in order to avoid rounding problems."
(defun org-time-string-to-seconds (s)
"Convert a timestamp string to a number of seconds."
- (org-float-time (org-time-string-to-time s)))
+ (float-time (org-time-string-to-time s)))
(org-define-error 'org-diary-sexp-no-match "Unable to match diary sexp")
@@ -18175,12 +18157,12 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"."
(< 1 (length (delq nil (mapcar 'marker-position
org-clock-history))))))
(message "No clock to adjust")
- (cond ((save-excursion ; fix previous clock?
+ (cond ((save-excursion ; fix previous clock?
(re-search-backward org-ts-regexp0 nil t)
- (org-looking-back (concat org-clock-string " \\[")
- (line-beginning-position)))
+ (looking-back (concat org-clock-string " \\[")
+ (line-beginning-position)))
(setq fixnext 1 clrgx (concat org-ts-regexp0 "\\] =>.*$")))
- ((save-excursion ; fix next clock?
+ ((save-excursion ; fix next clock?
(re-search-backward org-ts-regexp0 nil t)
(looking-at (concat org-ts-regexp0 "\\] =>")))
(setq fixnext -1 clrgx (concat org-clock-string " \\[" org-ts-regexp0))))
@@ -18648,14 +18630,14 @@ the buffer and restores the previous window configuration."
(let ((cw (current-window-configuration)))
(find-file org-agenda-files)
(setq-local org-window-configuration cw)
- (org-add-hook 'after-save-hook
- (lambda ()
- (set-window-configuration
- (prog1 org-window-configuration
- (kill-buffer (current-buffer))))
- (org-install-agenda-files-menu)
- (message "New agenda file list installed"))
- nil 'local)
+ (add-hook 'after-save-hook
+ (lambda ()
+ (set-window-configuration
+ (prog1 org-window-configuration
+ (kill-buffer (current-buffer))))
+ (org-install-agenda-files-menu)
+ (message "New agenda file list installed"))
+ nil 'local)
(message "%s" (substitute-command-keys
"Edit list and finish with \\[save-buffer]")))
(customize-variable 'org-agenda-files)))
@@ -19010,11 +18992,11 @@ environment remains unintended."
(save-excursion
(goto-char beg)
(while (< (point) end)
- (unless (eolp) (org-indent-line-to ind))
+ (unless (eolp) (indent-line-to ind))
(forward-line))))
(goto-char beg)
(forward-line lines)
- (org-indent-line-to ind)))
+ (indent-line-to ind)))
(set-marker beg nil)
(set-marker end nil)))
@@ -21475,7 +21457,7 @@ With a prefix argument ARG, change the region in a single item."
(while (< (point) end)
(unless (or (looking-at "^[ \t]*$")
(looking-at org-outline-regexp-bol))
- (org-indent-line-to (+ (org-get-indentation) delta)))
+ (indent-line-to (+ (org-get-indentation) delta)))
(forward-line)))))))
(skip-blanks
(function
@@ -21533,7 +21515,7 @@ With a prefix argument ARG, change the region in a single item."
;; subtrees.
(when (< level ref-level) (setq ref-level level))
(replace-match bul t t)
- (org-indent-line-to (+ start-ind (* delta bul-len)))
+ (indent-line-to (+ start-ind (* delta bul-len)))
(when (or done todo)
(let* ((struct (org-list-struct))
(old (copy-tree struct)))
@@ -22176,6 +22158,27 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
(<= (point) (match-end 4))
(member (match-string 3) '("=" "~")))))
+(defun org-overlay-display (ovl text &optional face evap)
+ "Make overlay OVL display TEXT with face FACE."
+ (overlay-put ovl 'display text)
+ (if face (overlay-put ovl 'face face))
+ (if evap (overlay-put ovl 'evaporate t)))
+
+(defun org-overlay-before-string (ovl text &optional face evap)
+ "Make overlay OVL display TEXT with face FACE."
+ (if face (org-add-props text nil 'face face))
+ (overlay-put ovl 'before-string text)
+ (if evap (overlay-put ovl 'evaporate t)))
+
+(defun org-find-overlays (prop &optional pos delete)
+ "Find all overlays specifying PROP at POS or point.
+If DELETE is non-nil, delete all those overlays."
+ (let (found)
+ (dolist (ov (overlays-at (or pos (point))) found)
+ (cond ((not (overlay-get ov prop)))
+ (delete (delete-overlay ov))
+ (t (push ov found))))))
+
(defun org-goto-marker-or-bmk (marker &optional bookmark)
"Go to MARKER, widen if necessary. When marker is not live, try BOOKMARK."
(if (and marker (marker-buffer marker)
@@ -22319,7 +22322,7 @@ if it fails."
(let ((ind (progn (skip-chars-forward " \t") (current-column))))
(cond ((eolp) (delete-region (line-beginning-position) (point)))
((< ind n) (throw :exit nil))
- (t (org-indent-line-to (- ind n))))
+ (t (indent-line-to (- ind n))))
(forward-line)))
;; Signal success.
t))))
@@ -23109,8 +23112,8 @@ Also align node properties according to `org-property-format'."
(let ((column (org--get-expected-indentation element nil)))
;; Preserve current column.
(if (<= (current-column) (current-indentation))
- (org-indent-line-to column)
- (save-excursion (org-indent-line-to column))))
+ (indent-line-to column)
+ (save-excursion (indent-line-to column))))
;; Align node property. Also preserve current column.
(when (eq type 'node-property)
(let ((column (current-column)))
@@ -23135,12 +23138,12 @@ assumed to be significant there."
;; once done.
(let ((limit (copy-marker pos)))
(while (< (point) limit)
- (unless (org-looking-at-p "[ \t]*$") (org-indent-line-to ind))
+ (unless (looking-at-p "[ \t]*$") (indent-line-to ind))
(forward-line))
(set-marker limit nil))))
(end (copy-marker end)))
(while (< (point) end)
- (if (or (org-looking-at-p " \r\t\n") (org-at-heading-p)) (forward-line)
+ (if (or (looking-at-p " \r\t\n") (org-at-heading-p)) (forward-line)
(let* ((element (org-element-at-point))
(type (org-element-type element))
(element-end (copy-marker (org-element-property :end element)))
@@ -23230,7 +23233,7 @@ assumed to be significant there."
(interactive)
(unless (save-excursion
(beginning-of-line)
- (org-looking-at-p org-drawer-regexp))
+ (looking-at-p org-drawer-regexp))
(user-error "Not at a drawer"))
(let ((element (org-element-at-point)))
(unless (memq (org-element-type element) '(drawer property-drawer))
@@ -23246,7 +23249,7 @@ assumed to be significant there."
(unless (save-excursion
(beginning-of-line)
(let ((case-fold-search t))
- (org-looking-at-p "[ \t]*#\\+\\(begin\\|end\\)_")))
+ (looking-at-p "[ \t]*#\\+\\(begin\\|end\\)_")))
(user-error "Not at a block"))
(let ((element (org-element-at-point)))
(unless (memq (org-element-type element)
@@ -23320,7 +23323,7 @@ matches in paragraphs or comments, use it."
(save-excursion
(beginning-of-line)
(cond ((not (message-in-body-p)) (throw 'exit nil))
- ((org-looking-at-p org-table-line-regexp) (throw 'exit nil))
+ ((looking-at-p org-table-line-regexp) (throw 'exit nil))
((looking-at message-cite-prefix-regexp)
(throw 'exit (match-string-no-properties 0)))
((looking-at org-outline-regexp)
@@ -23578,7 +23581,7 @@ region only contains such lines."
(<= (org-element-property :post-affiliated element) (point)))
(skip-chars-forward " \t")
(insert ": "))
- ((and (org-looking-at-p "[ \t]*$")
+ ((and (looking-at-p "[ \t]*$")
(or (eq type 'inlinetask)
(save-excursion
(skip-chars-forward " \r\t\n")
@@ -23627,7 +23630,7 @@ region only contains such lines."
(setq min-ind 0)
(catch 'zerop
(while (< (point) end)
- (unless (org-looking-at-p "[ \t]*$")
+ (unless (looking-at-p "[ \t]*$")
(let ((ind (org-get-indentation)))
(setq min-ind (min min-ind ind))
(when (zerop ind) (throw 'zerop t))))
@@ -23641,10 +23644,10 @@ region only contains such lines."
((org-at-heading-p)
(insert ": ")
(forward-line)
- (while (and (< (point) end) (org-looking-at-p "[ \t]*$"))
+ (while (and (< (point) end) (looking-at-p "[ \t]*$"))
(insert ":")
(forward-line)))
- ((org-looking-at-p "[ \t]*:\\( \\|$\\)")
+ ((looking-at-p "[ \t]*:\\( \\|$\\)")
(let* ((element (org-element-at-point))
(element-end (org-element-property :end element)))
(if (eq (org-element-type element) 'fixed-width)
@@ -23995,7 +23998,7 @@ the cursor is already beyond the end of the headline."
((memq type '(headline inlinetask))
(let ((pos (point)))
(beginning-of-line 1)
- (if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$"))
+ (if (looking-at ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$")
(if (eq special t)
(if (or (< pos (match-beginning 1)) (= pos (match-end 0)))
(goto-char (match-beginning 1))
@@ -24077,7 +24080,7 @@ depending on context."
(user-error "C-k aborted as it would kill a hidden subtree"))
(call-interactively
(if (org-bound-and-true-p visual-line-mode) 'kill-visual-line 'kill-line)))
- ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$"))
+ ((looking-at ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$")
(kill-region (point) (match-beginning 1))
(org-set-tags nil t))
(t (kill-region (point) (point-at-eol)))))
@@ -24440,7 +24443,7 @@ clocking lines and regular drawers at the beginning of the
entry."
(org-back-to-heading t)
(forward-line)
- (when (org-looking-at-p org-planning-line-re) (forward-line))
+ (when (looking-at-p org-planning-line-re) (forward-line))
(when (looking-at org-property-drawer-re)
(goto-char (match-end 0))
(forward-line))
@@ -24449,11 +24452,11 @@ entry."
(let ((end (save-excursion (outline-next-heading) (point)))
(re (concat "[ \t]*$" "\\|" org-clock-line-re)))
(while (not (eobp))
- (cond ((org-looking-at-p org-drawer-regexp)
+ (cond ((looking-at-p org-drawer-regexp)
(if (re-search-forward "^[ \t]*:END:[ \t]*$" end t)
(forward-line)
(throw 'exit t)))
- ((org-looking-at-p re) (forward-line))
+ ((looking-at-p re) (forward-line))
(t (throw 'exit t))))))))
(defun org-forward-heading-same-level (arg &optional invisible-ok)
@@ -25041,7 +25044,7 @@ when non-nil, is a regexp matching keywords names."
(setq level (org-reduced-level (funcall outline-level)))
(when (and (<= level n)
(looking-at org-complex-heading-regexp)
- (setq head0 (org-match-string-no-properties 4)))
+ (setq head0 (match-string-no-properties 4)))
(setq head (org-link-display-format head0)
m (org-imenu-new-marker))
(org-add-props head nil 'org-imenu-marker m 'org-imenu t)
@@ -25089,7 +25092,7 @@ If there is no description, use the link target."
'face 'org-agenda-restriction-lock)
(overlay-put org-speedbar-restriction-lock-overlay
'help-echo "Agendas are currently limited to this item.")
-(org-detach-overlay org-speedbar-restriction-lock-overlay)
+(delete-overlay org-speedbar-restriction-lock-overlay)
(defun org-speedbar-set-agenda-restriction ()
"Restrict future agenda commands to the location at point in speedbar.
@@ -25143,7 +25146,7 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
"Non-nil when Flyspell can check object at point.
ELEMENT is the element at point."
(let ((object (save-excursion
- (when (org-looking-at-p "\\>") (backward-char))
+ (when (looking-at-p "\\>") (backward-char))
(org-element-context element))))
(cl-case (org-element-type object)
;; Prevent checks in links due to keybinding conflict with
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index e8088ba..6c707f8 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -511,7 +511,7 @@ that is according to the widest non blank line in CONTENTS."
;; possible.
(save-excursion
(while (not (eobp))
- (unless (org-looking-at-p "[ \t]*$")
+ (unless (looking-at-p "[ \t]*$")
(end-of-line)
(let ((column (current-column)))
(cond
@@ -524,8 +524,8 @@ that is according to the widest non blank line in CONTENTS."
(if (eq how 'right) 1 2))))
(if (zerop offset) (throw 'exit contents)
(while (not (eobp))
- (unless (org-looking-at-p "[ \t]*$")
- (org-indent-to-column offset))
+ (unless (looking-at-p "[ \t]*$")
+ (indent-to-column offset))
(forward-line)))))
(buffer-string))))))))
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 548445c..e2fcb07 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2047,7 +2047,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Latex Fragment
;; (when latex-frag ; FIXME
-;; (setq href (org-propertize href :title "LaTeX Fragment"
+;; (setq href (propertize href :title "LaTeX Fragment"
;; :description latex-frag)))
;; handle verbatim
;; provide descriptions
diff --git a/lisp/ox.el b/lisp/ox.el
index ada6261..499badc 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1405,7 +1405,7 @@ for export. Return options as a plist."
(cons "TITLE"
(or (org-entry-get (point) "EXPORT_TITLE" 'selective)
(progn (looking-at org-complex-heading-regexp)
- (org-match-string-no-properties 4))))))
+ (match-string-no-properties 4))))))
;; Look for both general keywords and back-end specific
;; options, with priority given to the latter.
(options (append (and backend (org-export-get-all-options backend))
@@ -2675,7 +2675,7 @@ the document. Narrowing, if any, is ignored."
end)
(progn
(forward-line -1)
- (or (org-looking-at-p "^[ \t]*$")
+ (or (looking-at-p "^[ \t]*$")
(org-with-limited-levels
(org-at-heading-p)))))))))
(delete-region start end)
@@ -3386,7 +3386,7 @@ Return a string of lines to be included in the format expected by
(memq (org-element-type element) '(headline inlinetask)))
;; Skip planning line and property-drawer.
(goto-char (point-min))
- (when (org-looking-at-p org-planning-line-re) (forward-line))
+ (when (looking-at-p org-planning-line-re) (forward-line))
(when (looking-at org-property-drawer-re) (goto-char (match-end 0)))
(unless (bolp) (forward-line))
(narrow-to-region (point) (point-max))))
@@ -6213,7 +6213,7 @@ files or buffers, only the display.
header-line-format
'(:eval
(format " %-12s | %6s | %s" "Back-End" "Age" "Source")))
- (org-add-hook 'post-command-hook 'org-export-stack-refresh nil t)
+ (add-hook 'post-command-hook 'org-export-stack-refresh nil t)
(setq-local revert-buffer-function
'org-export-stack-refresh))
@@ -6329,12 +6329,12 @@ back to standard interface."
;; on the first key, if any. A nil value means KEY will
;; only be activated at first level.
(if (or (eq access-key t) (eq access-key first-key))
- (org-propertize key 'face 'org-warning)
+ (propertize key 'face 'org-warning)
key)))
(fontify-value
(lambda (value)
;; Fontify VALUE string.
- (org-propertize value 'face 'font-lock-variable-name-face)))
+ (propertize value 'face 'font-lock-variable-name-face)))
;; Prepare menu entries by extracting them from registered
;; back-ends and sorting them by access key and by ordinal,
;; if any.
diff --git a/testing/lisp/test-org-src.el b/testing/lisp/test-org-src.el
index 7d3d085..4fd581b 100644
--- a/testing/lisp/test-org-src.el
+++ b/testing/lisp/test-org-src.el
@@ -43,7 +43,7 @@
blah(message hello)
#+end_src
"))
- (should (org-looking-at-p "(message hello)")))))
+ (should (looking-at-p "(message hello)")))))
(ert-deftest test-org-src/point-outside-block ()
"Editing with point before/after block signals expected error."
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index effb012..13df4a7 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -972,7 +972,7 @@
(should
(org-test-with-temp-text "| <point>a |\n| b |"
(org-return)
- (org-looking-at-p "b")))
+ (looking-at-p "b")))
;; Open link or timestamp under point when `org-return-follows-link'
;; is non-nil.
(should
@@ -980,27 +980,27 @@
(let ((org-return-follows-link t)
(org-link-search-must-match-exact-headline nil))
(org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
(should-not
(org-test-with-temp-text "Link [[target<point>]] <<target>>"
(let ((org-return-follows-link nil)) (org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
(should
(org-test-with-temp-text "* [[b][a<point>]]\n* b"
(let ((org-return-follows-link t)) (org-return))
- (org-looking-at-p "* b")))
+ (looking-at-p "* b")))
(should
(org-test-with-temp-text "Link [[target][/descipt<point>ion/]] <<target>>"
(let ((org-return-follows-link t)
(org-link-search-must-match-exact-headline nil))
(org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
(should-not
(org-test-with-temp-text "Link [[target]]<point> <<target>>"
(let ((org-return-follows-link t)
(org-link-search-must-match-exact-headline nil))
(org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
;; When `org-return-follows-link' is non-nil, tolerate links and
;; timestamps in comments, node properties, etc.
(should
@@ -1008,22 +1008,22 @@
(let ((org-return-follows-link t)
(org-link-search-must-match-exact-headline nil))
(org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
(should-not
(org-test-with-temp-text "# Comment [[target<point>]]\n <<target>>"
(let ((org-return-follows-link nil)) (org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
(should-not
(org-test-with-temp-text "# Comment [[target]]<point>\n <<target>>"
(let ((org-return-follows-link t)
(org-link-search-must-match-exact-headline nil))
(org-return))
- (org-looking-at-p "<<target>>")))
+ (looking-at-p "<<target>>")))
;; However, do not open link when point is in a table.
(should
(org-test-with-temp-text "| [[target<point>]] |\n| between |\n| <<target>> |"
(let ((org-return-follows-link t)) (org-return))
- (org-looking-at-p "between")))
+ (looking-at-p "between")))
;; Special case: in a list, when indenting, do not break structure.
(should
(equal "- A\n B"
@@ -1886,13 +1886,13 @@ SCHEDULED: <2014-03-04 tue.>"
(org-test-with-temp-text
"* H1\n:PROPERTIES:\n:CUSTOM_ID: custom\n:END:\n* H2\n[[#custom<point>]]"
(org-open-at-point)
- (org-looking-at-p "\\* H1")))
+ (looking-at-p "\\* H1")))
;; Throw an error on false positives.
(should-error
(org-test-with-temp-text
"* H1\n:DRAWER:\n:CUSTOM_ID: custom\n:END:\n* H2\n[[#custom<point>]]"
(org-open-at-point)
- (org-looking-at-p "\\* H1"))))
+ (looking-at-p "\\* H1"))))
;;;; Fuzzy Links
@@ -2882,7 +2882,7 @@ Outside."
(should
(org-test-with-temp-text "#+key1: v\n#+key<point>2: v\n#+key3: v"
(org-drag-element-backward)
- (org-looking-at-p "2")))
+ (looking-at-p "2")))
;; Error when trying to move first element of buffer.
(should-error
(org-test-with-temp-text "Paragraph 1.\n\nParagraph 2."
@@ -3064,7 +3064,7 @@ Text.
(org-odd-levels-only nil))
(org-demote))
(org-move-to-column 10)
- (org-looking-at-p ":tag:$")))
+ (looking-at-p ":tag:$")))
(should-not
(org-test-with-temp-text "* H :tag:"
(let ((org-tags-column 10)
@@ -3072,7 +3072,7 @@ Text.
(org-odd-levels-only nil))
(org-demote))
(org-move-to-column 10)
- (org-looking-at-p ":tag:$")))
+ (looking-at-p ":tag:$")))
;; When `org-adapt-indentation' is non-nil, always indent planning
;; info and property drawers accordingly.
(should
@@ -3222,7 +3222,7 @@ Text.
(org-odd-levels-only nil))
(org-promote))
(org-move-to-column 10)
- (org-looking-at-p ":tag:$")))
+ (looking-at-p ":tag:$")))
(should-not
(org-test-with-temp-text "** H :tag:"
(let ((org-tags-column 10)
@@ -3230,7 +3230,7 @@ Text.
(org-odd-levels-only nil))
(org-promote))
(org-move-to-column 10)
- (org-looking-at-p ":tag:$")))
+ (looking-at-p ":tag:$")))
;; When `org-adapt-indentation' is non-nil, always indent planning
;; info and property drawers.
(should
@@ -3844,12 +3844,12 @@ Paragraph<point>"
;; Get "FILE" property.
(should
(org-test-with-temp-text-in-file "* H\nParagraph"
- (org-file-equal-p (cdr (assoc "FILE" (org-entry-properties nil "FILE")))
- (buffer-file-name))))
+ (file-equal-p (cdr (assoc "FILE" (org-entry-properties nil "FILE")))
+ (buffer-file-name))))
(should
(org-test-with-temp-text-in-file "* H\nParagraph"
- (org-file-equal-p (cdr (assoc "FILE" (org-entry-properties)))
- (buffer-file-name))))
+ (file-equal-p (cdr (assoc "FILE" (org-entry-properties)))
+ (buffer-file-name))))
(should-not
(org-test-with-temp-text "* H\nParagraph"
(cdr (assoc "FILE" (org-entry-properties nil "FILE")))))