(defcustom org-agenda-custom-commands
- '(("n" "Agenda and all TODO's" ((agenda "") (alltodo ""))))
+ '(("n" "Agenda and all TODOs" ((agenda "") (alltodo ""))))
"Custom commands for the agenda.
These commands will be offered on the splash screen displayed by the
agenda dispatcher \\[org-agenda]. Each entry is a list like this:
(defvar org-depend-tag-blocked)
(defun org-agenda-dim-blocked-tasks (&optional invisible)
- "Dim currently blocked TODO's in the agenda display.
+ "Dim currently blocked TODOs in the agenda display.
When INVISIBLE is non-nil, hide currently blocked TODO instead of
dimming them."
(interactive "P")
(add-text-properties pos (1- (point)) (list 'face 'org-warning))
(setq pos (point))
(unless org-agenda-multi
- (insert "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n")
+ (insert (substitute-command-keys
+ "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n"))
(add-text-properties pos (1- (point))
(list 'face 'org-agenda-structure))))
(org-agenda-mark-header-line (point-min))
org-select-this-todo-keyword))
(setq pos (point))
(unless org-agenda-multi
- (insert "Available with `N r': (0)[ALL]")
+ (insert (substitute-command-keys "Available with `N r': (0)[ALL]"))
(let ((n 0) s)
(mapc (lambda (x)
(setq s (format "(%d)%s" (setq n (1+ n)) x))
(add-text-properties pos (1- (point)) (list 'face 'org-warning))
(setq pos (point))
(unless org-agenda-multi
- (insert "Press `C-u r' to search again with new search string\n"))
+ (insert (substitute-command-keys
+ "Press `C-u r' to search again with new search string\n")))
(add-text-properties pos (1- (point)) (list 'face 'org-agenda-structure)))
(org-agenda-mark-header-line (point-min))
(when rtnall
nil " Rem" org-capture-mode-map
(org-set-local
'header-line-format
- "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'."))
+ (substitute-command-keys
+ "Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.")))
(define-key org-capture-mode-map "\C-c\C-c" 'org-capture-finalize)
(define-key org-capture-mode-map "\C-c\C-k" 'org-capture-kill)
(define-key org-capture-mode-map "\C-c\C-w" 'org-capture-refile)
(delete-region start end)
(condition-case error
(insert-file-contents filename)
- (error (insert (format "%%![Couldn't insert %s: %s]"
+ (error (insert (format "%%![Could not insert %s: %s]"
filename error)))))))
;; %() embedded elisp
(org-capture-expand-embedded-elisp)
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
+;; ‘format-message’ is available only from 25 on
+(unless (fboundp 'format-message)
+ (defalias 'format-message 'format))
+
(defmacro org-no-popups (&rest body)
"Suppress popup windows.
Let-bind some variables to nil around BODY to achieve the desired
(org-open-file filename t))
((or (eql create t)
(and (eql create 'ask)
- (y-or-n-p (format "File `%s.org' not found; create?" name))))
+ (y-or-n-p (format-message
+ "File `%s.org' not found; create?" name))))
(org-ctags-open-file filename name))
(t ;; File does not exist, and we don't want to create it.
nil))))
"This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
Wrapper for org-ctags-append-topic, which first asks the user if they want
to append a new topic."
- (if (y-or-n-p (format "Topic `%s' not found; append to end of buffer?"
- name))
+ (if (y-or-n-p (format-message
+ "Topic `%s' not found; append to end of buffer?" name))
(org-ctags-append-topic name narrowp)
nil))
"Save parent buffer with current state source-code buffer."
(interactive)
(if (string-match "Fixed Width" (buffer-name))
- (user-error "Use C-c ' to save and exit, C-c C-k to abort editing")
+ (user-error "%s" "Use C-c ' to save and exit, C-c C-k to abort editing")
(org-src-in-org-buffer (save-buffer))))
(declare-function org-babel-tangle "ob-tangle" (&optional arg target-file lang))
;; Table: enter it or move to the next field.
((org-at-table-p 'any)
(if (org-at-table.el-p)
- (message "Use C-c ' to edit table.el tables")
+ (message "%s" "Use C-c ' to edit table.el tables")
(if arg (org-table-edit-field t)
(org-table-justify-field-maybe)
(call-interactively 'org-table-next-field))))
(error (error "Bad timestamp `%s'%s\nError was: %s"
s (if (not (and buffer pos))
""
- (format " at %d in buffer `%s'" pos buffer))
+ (format-message " at %d in buffer `%s'" pos buffer))
(cdr errdata)))))
(defun org-time-string-to-seconds (s)
(error (error "Bad timestamp `%s'%s\nError was: %s"
s (if (not (and buffer pos))
""
- (format " at %d in buffer `%s'" pos buffer))
+ (format-message " at %d in buffer `%s'" pos buffer))
(cdr errdata))))))))
(defun org-days-to-iso-week (days)
;; a `table.el' type, just give up. At a table row or
;; cell, maybe recalculate line but always align table.
(if (eq (org-element-property :type context) 'table.el)
- (message "Use C-c ' to edit table.el tables")
+ (message "%s" "Use C-c ' to edit table.el tables")
(let ((org-enable-table-editor t))
(if (or (eq type 'table)
;; Check if point is at a TBLFM line.