Use substitute-command-keys more
* lisp/ob-core.el (org-confirm-babel-evaluate): (org-babel-no-eval-on-ctrl-c-ctrl-c): (org-babel-hash-at-point): * lisp/org-agenda.el (org-agenda-log-mode-items): (org-agenda-auto-exclude-function): (org-search-view): (org-todo-list): (org-tags-view): (org-agenda-log-mode): (org-agenda-show-the-flagging-note): * lisp/org-clock.el (org-clock-out-when-done): * lisp/org-id.el (org-id-link-to-org-use-id): * lisp/org-table.el (org-table-allow-automatic-line-recalculation): (org-table-edit-formulas): * lisp/org.el (org-support-shift-select): (org-remove-highlights-with-change): (org-refile-use-cache): (org-use-fast-todo-selection): (org-time-stamp-rounding-minutes): (org-agenda-text-search-extra-files): (org-cycle): (org-ctrl-c-ctrl-c): Use substitute-command-keys.
This commit is contained in:
parent
f16ae0dcb7
commit
0cf9f17c55
|
@ -110,6 +110,7 @@
|
|||
|
||||
(defcustom org-confirm-babel-evaluate t
|
||||
"Confirm before evaluation.
|
||||
\\<org-mode-map>\
|
||||
Require confirmation before interactively evaluating code
|
||||
blocks in Org-mode buffers. The default value of this variable
|
||||
is t, meaning confirmation is required for any code block
|
||||
|
@ -122,10 +123,11 @@ execution or nil if no prompt is required.
|
|||
|
||||
Warning: Disabling confirmation may result in accidental
|
||||
evaluation of potentially harmful code. It may be advisable
|
||||
remove code block execution from C-c C-c as further protection
|
||||
remove code block execution from \\[org-ctrl-c-ctrl-c] \
|
||||
as further protection
|
||||
against accidental code block evaluation. The
|
||||
`org-babel-no-eval-on-ctrl-c-ctrl-c' variable can be used to
|
||||
remove code block execution from the C-c C-c keybinding."
|
||||
remove code block execution from the \\[org-ctrl-c-ctrl-c] keybinding."
|
||||
:group 'org-babel
|
||||
:version "24.1"
|
||||
:type '(choice boolean function))
|
||||
|
@ -133,7 +135,8 @@ remove code block execution from the C-c C-c keybinding."
|
|||
(put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t)))
|
||||
|
||||
(defcustom org-babel-no-eval-on-ctrl-c-ctrl-c nil
|
||||
"Remove code block evaluation from the C-c C-c key binding."
|
||||
"\\<org-mode-map>\
|
||||
Remove code block evaluation from the \\[org-ctrl-c-ctrl-c] key binding."
|
||||
:group 'org-babel
|
||||
:version "24.1"
|
||||
:type 'boolean)
|
||||
|
@ -1309,8 +1312,9 @@ the `org-mode-hook'."
|
|||
|
||||
(defun org-babel-hash-at-point (&optional point)
|
||||
"Return the value of the hash at POINT.
|
||||
\\<org-mode-map>\
|
||||
The hash is also added as the last element of the kill ring.
|
||||
This can be called with C-c C-c."
|
||||
This can be called with \\[org-ctrl-c-ctrl-c]."
|
||||
(interactive)
|
||||
(let ((hash (car (delq nil (mapcar
|
||||
(lambda (ol) (overlay-get ol 'babel-hash))
|
||||
|
|
|
@ -1292,12 +1292,14 @@ given here."
|
|||
|
||||
(defcustom org-agenda-log-mode-items '(closed clock)
|
||||
"List of items that should be shown in agenda log mode.
|
||||
\\<org-agenda-mode-map>\
|
||||
This list may contain the following symbols:
|
||||
|
||||
closed Show entries that have been closed on that day.
|
||||
clock Show entries that have received clocked time on that day.
|
||||
state Show all logged state changes.
|
||||
Note that instead of changing this variable, you can also press `C-u l' in
|
||||
Note that instead of changing this variable, you can also press \
|
||||
`\\[universal-argument] \\[org-agenda-log-mode]' in
|
||||
the agenda to display all available LOG items temporarily."
|
||||
:group 'org-agenda-daily/weekly
|
||||
:type '(set :greedy t (const closed) (const clock) (const state)))
|
||||
|
@ -1975,7 +1977,8 @@ estimate."
|
|||
:type 'boolean)
|
||||
|
||||
(defcustom org-agenda-auto-exclude-function nil
|
||||
"A function called with a tag to decide if it is filtered on '/ RET'.
|
||||
"A function called with a tag to decide if it is filtered on \
|
||||
\\<org-agenda-mode-map>`\\[org-agenda-filter-by-tag] RET'.
|
||||
The sole argument to the function, which is called once for each
|
||||
possible tag, is a string giving the name of the tag. The
|
||||
function should return either nil if the tag should be included
|
||||
|
@ -4681,7 +4684,12 @@ in `org-agenda-text-search-extra-files'."
|
|||
(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 `\\[org-agenda-manipulate-query-add]', \
|
||||
`\\[org-agenda-manipulate-query-subtract]' to add/sub word, \
|
||||
`\\[org-agenda-manipulate-query-add-re]', \
|
||||
`\\[org-agenda-manipulate-query-subtract-re]' to add/sub regexp, \
|
||||
`\\[universal-argument] \\[org-agenda-redo]' to edit\n"))
|
||||
(add-text-properties pos (1- (point))
|
||||
(list 'face 'org-agenda-structure))))
|
||||
(org-agenda-mark-header-line (point-min))
|
||||
|
@ -4775,7 +4783,8 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
|
|||
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 \\[org-agenda-redo]': (0)[ALL]"))
|
||||
(let ((n 0) s)
|
||||
(mapc (lambda (x)
|
||||
(setq s (format "(%d)%s" (setq n (1+ n)) x))
|
||||
|
@ -4870,7 +4879,9 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
|
|||
(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 `\\[universal-argument] \\[org-agenda-redo]' \
|
||||
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
|
||||
|
@ -8169,7 +8180,8 @@ so that the date SD will be in that range."
|
|||
"Toggle log mode in an agenda buffer.
|
||||
With argument SPECIAL, show all possible log items, not only the ones
|
||||
configured in `org-agenda-log-mode-items'.
|
||||
With a double `C-u' prefix arg, show *only* log items, nothing else."
|
||||
With a double \\[universal-argument] prefix arg, show *only* \
|
||||
log items, nothing else."
|
||||
(interactive "P")
|
||||
(org-agenda-check-type t 'agenda 'timeline)
|
||||
(setq org-agenda-show-log
|
||||
|
@ -10062,7 +10074,8 @@ tag and (if present) the flagging note."
|
|||
(replace-match "\n" t t))
|
||||
(goto-char (point-min))
|
||||
(select-window win)
|
||||
(message "Flagging note pushed to kill ring. Press [?] again to remove tag and note"))))
|
||||
(message (substitute-command-keys "Flagging note pushed to kill ring. \
|
||||
Press \\[org-agenda-show-the-flagging-note] again to remove tag and note")))))
|
||||
|
||||
(defun org-agenda-remove-flag (marker)
|
||||
"Remove the FLAGGED tag and any flagging note in the entry."
|
||||
|
|
|
@ -94,9 +94,10 @@ Return value is either a string, an integer, or nil."
|
|||
|
||||
(defcustom org-clock-out-when-done t
|
||||
"When non-nil, clock will be stopped when the clocked entry is marked DONE.
|
||||
\\<org-mode-map>\
|
||||
DONE here means any DONE-like state.
|
||||
A nil value means clock will keep running until stopped explicitly with
|
||||
`C-c C-x C-o', or until the clock is started in a different item.
|
||||
`\\[org-clock-out]', or until the clock is started in a different item.
|
||||
Instead of t, this can also be a list of TODO states that should trigger
|
||||
clocking out."
|
||||
:group 'org-clock
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
'org-link-to-org-use-id 'org-id-link-to-org-use-id "24.3")
|
||||
(defcustom org-id-link-to-org-use-id nil
|
||||
"Non-nil means storing a link to an Org file will use entry IDs.
|
||||
\\<org-mode-map>\
|
||||
|
||||
The variable can have the following values:
|
||||
|
||||
|
@ -101,7 +102,7 @@ create-if-interactive
|
|||
call `org-capture' that automatically and preemptively creates a
|
||||
link. If you do want to get an ID link in a capture template to
|
||||
an entry not having an ID, create it first by explicitly creating
|
||||
a link to it, using `C-c C-l' first.
|
||||
a link to it, using `\\[org-insert-link]' first.
|
||||
|
||||
create-if-interactive-and-no-custom-id
|
||||
Like create-if-interactive, but do not create an ID if there is
|
||||
|
|
|
@ -343,7 +343,9 @@ Constants can also be defined on a per-file basis using a line like
|
|||
|
||||
(defcustom org-table-allow-automatic-line-recalculation t
|
||||
"Non-nil means lines marked with |#| or |*| will be recomputed automatically.
|
||||
Automatically means when TAB or RET or C-c C-c are pressed in the line."
|
||||
\\<org-mode-map>\
|
||||
Automatically means when TAB or RET or \\[org-ctrl-c-ctrl-c] \
|
||||
are pressed in the line."
|
||||
:group 'org-table-calculation
|
||||
:type 'boolean)
|
||||
|
||||
|
@ -3555,8 +3557,10 @@ Parameters get priority."
|
|||
(when (eq org-table-use-standard-references t)
|
||||
(org-table-fedit-toggle-ref-type))
|
||||
(org-goto-line startline)
|
||||
(message "Edit formulas, finish with `C-c C-c' or `C-c ' '. \
|
||||
See menu for more commands.")))
|
||||
(message
|
||||
(substitute-command-keys "\\<org-mode-map>\
|
||||
Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or `\\[org-edit-special]'. \
|
||||
See menu for more commands."))))
|
||||
|
||||
(defun org-table-fedit-post-command ()
|
||||
(when (not (memq this-command '(lisp-complete-symbol)))
|
||||
|
|
55
lisp/org.el
55
lisp/org.el
|
@ -849,6 +849,7 @@ depends on, if any."
|
|||
|
||||
(defcustom org-support-shift-select nil
|
||||
"Non-nil means make shift-cursor commands select text when possible.
|
||||
\\<org-mode-map>\
|
||||
|
||||
In Emacs 23, when `shift-select-mode' is on, shifted cursor keys
|
||||
start selecting a region, or enlarge regions started in this way.
|
||||
|
@ -875,10 +876,13 @@ if the cursor is exactly on the bullet.
|
|||
If you set this variable to the symbol `always', then the keys
|
||||
will not be special in headlines, property lines, and item lines,
|
||||
to make shift selection work there as well. If this is what you
|
||||
want, you can use the following alternative commands: `C-c C-t'
|
||||
and `C-c ,' to change TODO state and priority, `C-u C-u C-c C-t'
|
||||
can be used to switch TODO sets, `C-c -' to cycle item bullet
|
||||
types, and properties can be edited by hand or in column view.
|
||||
want, you can use the following alternative commands:
|
||||
`\\[org-todo]' and `\\[org-priority]' \
|
||||
to change TODO state and priority,
|
||||
`\\[universal-argument] \\[universal-argument] \\[org-todo]' \
|
||||
can be used to switch TODO sets,
|
||||
`\\[org-ctrl-c-minus]' to cycle item bullet types,
|
||||
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.
|
||||
|
@ -1677,10 +1681,12 @@ changed by an edit command."
|
|||
|
||||
(defcustom org-remove-highlights-with-change t
|
||||
"Non-nil means any change to the buffer will remove temporary highlights.
|
||||
\\<org-mode-map>\
|
||||
Such highlights are created by `org-occur' and `org-clock-display'.
|
||||
When nil, `C-c C-c' needs to be used to get rid of the highlights.
|
||||
When nil, `\\[org-ctrl-c-ctrl-c]' needs to be used \
|
||||
to get rid of the highlights.
|
||||
The highlights created by `org-toggle-latex-fragment' always need
|
||||
`C-c C-x C-l' to be removed."
|
||||
`\\[org-toggle-latex-fragment]' to be removed."
|
||||
:group 'org-sparse-trees
|
||||
:group 'org-time
|
||||
:type 'boolean)
|
||||
|
@ -2435,12 +2441,15 @@ of the subtree."
|
|||
|
||||
(defcustom org-refile-use-cache nil
|
||||
"Non-nil means cache refile targets to speed up the process.
|
||||
\\<org-mode-map>\
|
||||
The cache for a particular file will be updated automatically when
|
||||
the buffer has been killed, or when any of the marker used for flagging
|
||||
refile targets no longer points at a live buffer.
|
||||
If you have added new entries to a buffer that might themselves be targets,
|
||||
you need to clear the cache manually by pressing `C-0 C-c C-w' or, if you
|
||||
find that easier, `C-u C-u C-u C-c C-w'."
|
||||
you need to clear the cache manually by pressing `C-0 \\[org-refile]' or,
|
||||
if you find that easier, \
|
||||
`\\[universal-argument] \\[universal-argument] \\[universal-argument] \
|
||||
\\[org-refile]'."
|
||||
:group 'org-refile
|
||||
:version "24.1"
|
||||
:type 'boolean)
|
||||
|
@ -2623,7 +2632,8 @@ more information."
|
|||
(const type)))
|
||||
|
||||
(defcustom org-use-fast-todo-selection t
|
||||
"Non-nil means use the fast todo selection scheme with C-c C-t.
|
||||
"\\<org-mode-map>\
|
||||
Non-nil means use the fast todo selection scheme with \\[org-todo].
|
||||
This variable describes if and under what circumstances the cycling
|
||||
mechanism for TODO keywords will be replaced by a single-key, direct
|
||||
selection scheme.
|
||||
|
@ -2631,8 +2641,9 @@ selection scheme.
|
|||
When nil, fast selection is never used.
|
||||
|
||||
When the symbol `prefix', it will be used when `org-todo' is called
|
||||
with a prefix argument, i.e. `C-u C-c C-t' in an Org-mode buffer, and
|
||||
`C-u t' in an agenda buffer.
|
||||
with a prefix argument, i.e. `\\[universal-argument] \\[org-todo]' \
|
||||
in an Org-mode buffer, and
|
||||
`\\[universal-argument] t' in an agenda buffer.
|
||||
|
||||
When t, fast selection is used by default. In this case, the prefix
|
||||
argument forces cycling instead.
|
||||
|
@ -3098,6 +3109,7 @@ as an argument and return the numeric priority."
|
|||
|
||||
(defcustom org-time-stamp-rounding-minutes '(0 5)
|
||||
"Number of minutes to round time stamps to.
|
||||
\\<org-mode-map>\
|
||||
These are two values, the first applies when first creating a time stamp.
|
||||
The second applies when changing it with the commands `S-up' and `S-down'.
|
||||
When changing the time stamp, this means that it will change in steps
|
||||
|
@ -3107,7 +3119,8 @@ When a setting is 0 or 1, insert the time unmodified. Useful rounding
|
|||
numbers should be factors of 60, so for example 5, 10, 15.
|
||||
|
||||
When this is larger than 1, you can still force an exact time stamp by using
|
||||
a double prefix argument to a time stamp command like `C-c .' or `C-c !',
|
||||
a double prefix argument to a time stamp command like \
|
||||
`\\[org-time-stamp]' or `\\[org-time-stamp-inactive],
|
||||
and by using a prefix arg to `S-up/down' to specify the exact number
|
||||
of minutes to shift."
|
||||
:group 'org-time
|
||||
|
@ -3854,7 +3867,8 @@ regular expression will be included."
|
|||
(defcustom org-agenda-text-search-extra-files nil
|
||||
"List of extra files to be searched by text search commands.
|
||||
These files will be searched in addition to the agenda files by the
|
||||
commands `org-search-view' (`C-c a s') and `org-occur-in-agenda-files'.
|
||||
commands `org-search-view' (`\\[org-agenda] s') \
|
||||
and `org-occur-in-agenda-files'.
|
||||
Note that these files will only be searched for text search commands,
|
||||
not for the other agenda views like todo lists, tag searches or the weekly
|
||||
agenda. This variable is intended to list notes and possibly archive files
|
||||
|
@ -6657,11 +6671,12 @@ in special contexts.
|
|||
1. OVERVIEW: Show only top-level headlines.
|
||||
2. CONTENTS: Show all headlines of all levels, but no body text.
|
||||
3. SHOW ALL: Show everything.
|
||||
When called with two `C-u C-u' prefixes, switch to the startup visibility,
|
||||
With a double \\[universal-argument] prefix argument, \
|
||||
switch to the startup visibility,
|
||||
determined by the variable `org-startup-folded', and by any VISIBILITY
|
||||
properties in the buffer.
|
||||
When called with three `C-u C-u C-u' prefixed, show the entire buffer,
|
||||
including any drawers.
|
||||
With a triple \\[universal-argument] prefix argument, \
|
||||
show the entire buffer, including any drawers.
|
||||
|
||||
- When inside a table, re-align the table and move to the next field.
|
||||
|
||||
|
@ -6690,7 +6705,7 @@ in special contexts.
|
|||
|
||||
- Special case: if point is at the beginning of the buffer and there is
|
||||
no headline in line 1, this function will act as if called with prefix arg
|
||||
(C-u TAB, same as S-TAB) also when called without prefix arg.
|
||||
(\\[universal-argument] TAB, same as S-TAB) also when called without prefix arg.
|
||||
But only if also the variable `org-cycle-global-at-bob' is t."
|
||||
(interactive "P")
|
||||
(org-load-modules-maybe)
|
||||
|
@ -6741,7 +6756,8 @@ in special contexts.
|
|||
;; 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 (substitute-command-keys "\\<org-mode-map>\
|
||||
Use \\[org-edit-special] to edit table.el tables"))
|
||||
(if arg (org-table-edit-field t)
|
||||
(org-table-justify-field-maybe)
|
||||
(call-interactively 'org-table-next-field))))
|
||||
|
@ -21203,7 +21219,8 @@ This command does many different things, depending on context:
|
|||
;; 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 (substitute-command-keys "\\<org-mode-map>\
|
||||
Use \\[org-edit-special] to edit table.el tables"))
|
||||
(let ((org-enable-table-editor t))
|
||||
(if (or (eq type 'table)
|
||||
;; Check if point is at a TBLFM line.
|
||||
|
|
Loading…
Reference in New Issue