update packages and add valign
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; org-keys.el --- Key bindings for Org mode -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2018-2026 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;; Maintainer: Ihor Radchenko <yantar92 at posteo dot net>
|
||||
@@ -38,29 +38,29 @@
|
||||
(require 'oc)
|
||||
|
||||
(declare-function org-add-note "org" ())
|
||||
(declare-function org-agenda "org" (&optional arg org-keys restriction))
|
||||
(declare-function org-agenda "org-agenda" (&optional arg org-keys restriction))
|
||||
(declare-function org-agenda-file-to-front "org" (&optional to-end))
|
||||
(declare-function org-agenda-remove-restriction-lock "org" (&optional noupdate))
|
||||
(declare-function org-agenda-set-restriction-lock "org" (&optional type))
|
||||
(declare-function org-archive-subtree "org" (&optional find-done))
|
||||
(declare-function org-archive-subtree-default "org" ())
|
||||
(declare-function org-archive-subtree-default-with-confirmation "org" ())
|
||||
(declare-function org-archive-to-archive-sibling "org" ())
|
||||
(declare-function org-agenda-remove-restriction-lock "org-agenda" (&optional noupdate))
|
||||
(declare-function org-agenda-set-restriction-lock "org-agenda" (&optional type))
|
||||
(declare-function org-archive-subtree "org-archive" (&optional find-done))
|
||||
(declare-function org-archive-subtree-default "org-archive" ())
|
||||
(declare-function org-archive-subtree-default-with-confirmation "org-archive" ())
|
||||
(declare-function org-archive-to-archive-sibling "org-archive" ())
|
||||
(declare-function org-at-heading-p "org" (&optional ignored))
|
||||
(declare-function org-attach "org" ())
|
||||
(declare-function org-attach "org-attach" ())
|
||||
(declare-function org-backward-element "org" ())
|
||||
(declare-function org-backward-heading-same-level "org" (arg &optional invisible-ok))
|
||||
(declare-function org-backward-paragraph "org" ())
|
||||
(declare-function org-backward-paragraph "org" (&optional arg))
|
||||
(declare-function org-backward-sentence "org" (&optional arg))
|
||||
(declare-function org-beginning-of-line "org" (&optional n))
|
||||
(declare-function org-clock-cancel "org" ())
|
||||
(declare-function org-clock-display "org" (&optional arg))
|
||||
(declare-function org-clock-goto "org" (&optional select))
|
||||
(declare-function org-clock-in "org" (&optional select start-time))
|
||||
(declare-function org-clock-in-last "org" (&optional arg))
|
||||
(declare-function org-clock-out "org" (&optional switch-to-state fail-quietly at-time))
|
||||
(declare-function org-clock-cancel "org-clock" ())
|
||||
(declare-function org-clock-display "org-clock" (&optional arg))
|
||||
(declare-function org-clock-goto "org-clock" (&optional select))
|
||||
(declare-function org-clock-in "org-clock" (&optional select start-time))
|
||||
(declare-function org-clock-in-last "org-clock" (&optional arg))
|
||||
(declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time))
|
||||
(declare-function org-clone-subtree-with-time-shift "org" (n &optional shift))
|
||||
(declare-function org-columns "org" (&optional global columns-fmt-string))
|
||||
(declare-function org-columns "org-colview" (&optional global columns-fmt-string))
|
||||
(declare-function org-comment-dwim "org" (arg))
|
||||
(declare-function org-copy-special "org" ())
|
||||
(declare-function org-copy-visible "org" (beg end))
|
||||
@@ -72,15 +72,15 @@
|
||||
(declare-function org-cut-special "org" ())
|
||||
(declare-function org-cut-subtree "org" (&optional n))
|
||||
(declare-function org-cycle "org-cycle" (&optional arg))
|
||||
(declare-function org-cycle-agenda-files "org-cycle" ())
|
||||
(declare-function org-cycle-agenda-files "org" ())
|
||||
(declare-function org-date-from-calendar "org" ())
|
||||
(declare-function org-dynamic-block-insert-dblock "org" (&optional arg))
|
||||
(declare-function org-dynamic-block-insert-dblock "org" (type &optional interactive-p))
|
||||
(declare-function org-dblock-update "org" (&optional arg))
|
||||
(declare-function org-deadline "org" (arg1 &optional time))
|
||||
(declare-function org-decrease-number-at-point "org" (&optional inc))
|
||||
(declare-function org-delete-backward-char "org" (n))
|
||||
(declare-function org-delete-char "org" (n))
|
||||
(declare-function org-delete-indentation "org" (&optional arg))
|
||||
(declare-function org-delete-indentation "org" (&optional arg beg end))
|
||||
(declare-function org-demote-subtree "org" ())
|
||||
(declare-function org-display-outline-path "org" (&optional file current separator just-return-string))
|
||||
(declare-function org-down-element "org" ())
|
||||
@@ -90,7 +90,6 @@
|
||||
(declare-function org-emphasize "org" (&optional char))
|
||||
(declare-function org-end-of-line "org" (&optional n))
|
||||
(declare-function org-entry-put "org" (pom property value))
|
||||
(declare-function org-eval-in-calendar "org" (form &optional keepdate))
|
||||
(declare-function org-calendar-goto-today-or-insert-dot "org" ())
|
||||
(declare-function org-calendar-goto-today "org" ())
|
||||
(declare-function org-calendar-backward-month "org" ())
|
||||
@@ -107,34 +106,34 @@
|
||||
(declare-function org-calendar-scroll-three-months-left "org" ())
|
||||
(declare-function org-calendar-scroll-three-months-right "org" ())
|
||||
(declare-function org-evaluate-time-range "org" (&optional to-buffer))
|
||||
(declare-function org-export-dispatch "org" (&optional arg))
|
||||
(declare-function org-feed-goto-inbox "org" (feed))
|
||||
(declare-function org-feed-update-all "org" ())
|
||||
(declare-function org-export-dispatch "ox" (&optional arg))
|
||||
(declare-function org-feed-goto-inbox "org-feed" (feed))
|
||||
(declare-function org-feed-update-all "org-feed" ())
|
||||
(declare-function org-fill-paragraph "org" (&optional justify region))
|
||||
(declare-function org-find-file-at-mouse "org" (ev))
|
||||
(declare-function org-footnote-action "org" (&optional special))
|
||||
(declare-function org-footnote-action "org-footnote" (&optional special))
|
||||
(declare-function org-cycle-force-archived "org-cycle" ())
|
||||
(declare-function org-force-self-insert "org" (n))
|
||||
(declare-function org-forward-element "org" ())
|
||||
(declare-function org-forward-heading-same-level "org" (arg &optional invisible-ok))
|
||||
(declare-function org-forward-paragraph "org" ())
|
||||
(declare-function org-forward-paragraph "org" (&optional arg))
|
||||
(declare-function org-forward-sentence "org" (&optional arg))
|
||||
(declare-function org-goto "org" (&optional alternative-interface))
|
||||
(declare-function org-goto "org-goto" (&optional alternative-interface))
|
||||
(declare-function org-goto-calendar "org" (&optional arg))
|
||||
(declare-function org-inc-effort "org" ())
|
||||
(declare-function org-increase-number-at-point "org" (&optional inc))
|
||||
(declare-function org-info-find-node "org" (&optional nodename))
|
||||
(declare-function org-insert-all-links "org" (arg &optional pre post))
|
||||
(declare-function org-insert-all-links "ol" (arg &optional pre post))
|
||||
(declare-function org-insert-drawer "org" (&optional arg drawer))
|
||||
(declare-function org-insert-heading-respect-content "org" (&optional invisible-ok))
|
||||
(declare-function org-insert-last-stored-link "org" (arg))
|
||||
(declare-function org-insert-link "org" (&optional complete-file link-location default-description))
|
||||
(declare-function org-insert-last-stored-link "ol" (arg))
|
||||
(declare-function org-insert-link "ol" (&optional complete-file link-location default-description))
|
||||
(declare-function org-insert-structure-template "org" (type))
|
||||
(declare-function org-insert-todo-heading "org" (arg &optional force-heading))
|
||||
(declare-function org-insert-todo-heading-respect-content "org" (&optional force-state))
|
||||
(declare-function org-kill-line "org" (&optional arg))
|
||||
(declare-function org-kill-note-or-show-branches "org" ())
|
||||
(declare-function org-list-make-subtree "org" ())
|
||||
(declare-function org-list-make-subtree "org-list" ())
|
||||
(declare-function org-mark-element "org" ())
|
||||
(declare-function org-mark-ring-goto "org" (&optional n))
|
||||
(declare-function org-mark-ring-push "org" (&optional pos buffer))
|
||||
@@ -149,27 +148,29 @@
|
||||
(declare-function org-narrow-to-element "org" ())
|
||||
(declare-function org-narrow-to-subtree "org" (&optional element))
|
||||
(declare-function org-next-block "org" (arg &optional backward block-regexp))
|
||||
(declare-function org-next-link "org" (&optional search-backward))
|
||||
(declare-function org-next-link "ol" (&optional search-backward))
|
||||
(declare-function org-next-visible-heading "org" (arg))
|
||||
(declare-function org-open-at-mouse "org" (ev))
|
||||
(declare-function org-open-at-point "org" (&optional arg reference-buffer))
|
||||
(declare-function org-open-at-point "org" (&optional arg))
|
||||
(declare-function org-open-line "org" (n))
|
||||
(declare-function org-paste-special "org" (arg))
|
||||
(declare-function org-plot/gnuplot "org-plot" (&optional params))
|
||||
(declare-function org-previous-block "org" (arg &optional block-regexp))
|
||||
(declare-function org-previous-link "org" ())
|
||||
(declare-function org-previous-link "ol" ())
|
||||
(declare-function org-previous-visible-heading "org" (arg))
|
||||
(declare-function org-priority "org" (&optional action show))
|
||||
(defvar org-priority-highest)
|
||||
(defvar org-priority-default)
|
||||
(defvar org-priority-lowest)
|
||||
(declare-function org-promote-subtree "org" ())
|
||||
(declare-function org-redisplay-inline-images "org" ())
|
||||
(declare-function org-refile "org-refile" (&optional arg1 default-buffer rfloc msg))
|
||||
(declare-function org-refile-copy "org-refile" ())
|
||||
(declare-function org-refile-reverse "org-refile" (&optional arg default-buffer rfloc msg))
|
||||
(declare-function org-reftex-citation "org" ())
|
||||
(declare-function org-reload "org" (&optional arg1))
|
||||
(declare-function org-remove-file "org" (&optional file))
|
||||
(declare-function org-resolve-clocks "org" (&optional only-dangling-p prompt-fn last-valid))
|
||||
(declare-function org-return "org" (&optional indent))
|
||||
(declare-function org-resolve-clocks "org-clock" (&optional only-dangling-p prompt-fn last-valid))
|
||||
(declare-function org-return "org" (&optional indent arg interactive))
|
||||
(declare-function org-return-and-maybe-indent "org" ())
|
||||
(declare-function org-fold-reveal "org-fold" (&optional siblings))
|
||||
(declare-function org-schedule "org" (arg &optional time))
|
||||
@@ -191,36 +192,36 @@
|
||||
(declare-function org-shiftright "org" (&optional arg))
|
||||
(declare-function org-shifttab "org" (&optional arg))
|
||||
(declare-function org-shiftup "org" (&optional arg))
|
||||
(declare-function org-fold-show-all "org-fold" (&optional types))
|
||||
(declare-function org-fold-show-children "org-fold" (&optional level))
|
||||
(declare-function org-fold-show-subtree "org-fold" ())
|
||||
(declare-function org-sort "org" (&optional with-case))
|
||||
(declare-function org-sparse-tree "org" (&optional arg type))
|
||||
(declare-function org-table-copy-down "org" (n))
|
||||
(declare-function org-table-create-or-convert-from-region "org" (arg))
|
||||
(declare-function org-table-copy-down "org-table" (n))
|
||||
(declare-function org-table-create-or-convert-from-region "org-table" (arg))
|
||||
(declare-function org-table-create-with-table\.el "org-table" ())
|
||||
(declare-function org-table-edit-field "org" (arg))
|
||||
(declare-function org-table-eval-formula "org" (&optional arg equation suppress-align suppress-const suppress-store suppress-analysis))
|
||||
(declare-function org-table-field-info "org" (arg))
|
||||
(declare-function org-table-rotate-recalc-marks "org" (&optional newchar))
|
||||
(declare-function org-table-sum "org" (&optional beg end nlast))
|
||||
(declare-function org-table-toggle-coordinate-overlays "org" ())
|
||||
(declare-function org-table-toggle-formula-debugger "org" ())
|
||||
(declare-function org-table-edit-field "org-table" (arg))
|
||||
(declare-function org-table-eval-formula "org-table" (&optional arg equation suppress-align suppress-const suppress-store suppress-analysis))
|
||||
(declare-function org-table-field-info "org-table" (arg))
|
||||
(declare-function org-table-rotate-recalc-marks "org-table" (&optional newchar))
|
||||
(declare-function org-table-sum "org-table" (&optional beg end nlast))
|
||||
(declare-function org-table-toggle-coordinate-overlays "org-table" ())
|
||||
(declare-function org-table-toggle-formula-debugger "org-table" ())
|
||||
(declare-function org-timestamp "org" (arg &optional inactive))
|
||||
(declare-function org-timestamp-inactive "org" (&optional arg))
|
||||
(declare-function org-timer "org" (&optional restart no-insert))
|
||||
(declare-function org-timer-item "org" (&optional arg))
|
||||
(declare-function org-timer-pause-or-continue "org" (&optional stop))
|
||||
(declare-function org-timer-set-timer "org" (&optional opt))
|
||||
(declare-function org-timer-start "org" (&optional offset))
|
||||
(declare-function org-timer-stop "org" ())
|
||||
(declare-function org-timer "org-timer" (&optional restart no-insert))
|
||||
(declare-function org-timer-item "org-timer" (&optional arg))
|
||||
(declare-function org-timer-pause-or-continue "org-timer" (&optional stop))
|
||||
(declare-function org-timer-set-timer "org-timer" (&optional opt))
|
||||
(declare-function org-timer-start "org-timer" (&optional offset))
|
||||
(declare-function org-timer-stop "org-timer" ())
|
||||
(declare-function org-todo "org" (&optional arg1))
|
||||
(declare-function org-toggle-archive-tag "org" (&optional find-done))
|
||||
(declare-function org-toggle-checkbox "org" (&optional toggle-presence))
|
||||
(declare-function org-toggle-radio-button "org" (&optional arg))
|
||||
(declare-function org-toggle-archive-tag "org-archive" (&optional find-done))
|
||||
(declare-function org-toggle-checkbox "org-list" (&optional toggle-presence))
|
||||
(declare-function org-toggle-radio-button "org-list" (&optional arg))
|
||||
(declare-function org-toggle-comment "org" ())
|
||||
(declare-function org-toggle-fixed-width "org" ())
|
||||
(declare-function org-toggle-inline-images "org" (&optional include-linked beg end))
|
||||
(declare-function org-link-preview "ol" (&optional arg beg end))
|
||||
(declare-function org-link-preview-refresh "ol" ())
|
||||
(declare-function org-latex-preview "org" (&optional arg))
|
||||
(declare-function org-toggle-narrow-to-subtree "org" ())
|
||||
(declare-function org-toggle-ordered-property "org" ())
|
||||
@@ -234,6 +235,7 @@
|
||||
(declare-function org-update-statistics-cookies "org" (all))
|
||||
(declare-function org-yank "org" (&optional arg))
|
||||
(declare-function orgtbl-ascii-plot "org-table" (&optional ask))
|
||||
(declare-function outline-up-heading "outline" (arg &optional invisible-ok))
|
||||
|
||||
|
||||
|
||||
@@ -391,9 +393,9 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
|
||||
;;; Global bindings
|
||||
|
||||
;;;; Outline functions
|
||||
(define-key org-mode-map [menu-bar headings] 'undefined)
|
||||
(define-key org-mode-map [menu-bar hide] 'undefined)
|
||||
(define-key org-mode-map [menu-bar show] 'undefined)
|
||||
(define-key org-mode-map [menu-bar headings] #'undefined)
|
||||
(define-key org-mode-map [menu-bar hide] #'undefined)
|
||||
(define-key org-mode-map [menu-bar show] #'undefined)
|
||||
|
||||
(define-key org-mode-map [remap outline-mark-subtree] #'org-mark-subtree)
|
||||
(define-key org-mode-map [remap outline-show-subtree] #'org-fold-show-subtree)
|
||||
@@ -411,6 +413,8 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
|
||||
(define-key org-mode-map [remap outline-previous-visible-heading]
|
||||
#'org-previous-visible-heading)
|
||||
(define-key org-mode-map [remap outline-show-children] #'org-fold-show-children)
|
||||
(defalias 'org-up-heading #'outline-up-heading)
|
||||
(define-key org-mode-map [remap outline-up-heading] #'org-up-heading)
|
||||
|
||||
;;;; Make `C-c C-x' a prefix key
|
||||
(org-defkey org-mode-map (kbd "C-c C-x") (make-sparse-keymap))
|
||||
@@ -464,6 +468,37 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
|
||||
(org-defkey org-mode-map (kbd "C-S-<up>") #'org-shiftcontrolup)
|
||||
(org-defkey org-mode-map (kbd "C-S-<down>") #'org-shiftcontroldown)
|
||||
|
||||
;;; Repeat-mode map.
|
||||
(defvar org-navigation-repeat-map (make-sparse-keymap)
|
||||
"Repeat keymap for navigation commands.")
|
||||
(org-defkey org-navigation-repeat-map (kbd "b") #'org-backward-heading-same-level)
|
||||
(org-defkey org-navigation-repeat-map (kbd "f") #'org-forward-heading-same-level)
|
||||
(org-defkey org-navigation-repeat-map (kbd "n") #'org-next-visible-heading)
|
||||
(org-defkey org-navigation-repeat-map (kbd "p") #'org-previous-visible-heading)
|
||||
(org-defkey org-navigation-repeat-map (kbd "u") #'org-up-heading)
|
||||
(map-keymap
|
||||
(lambda (_key cmd)
|
||||
(put cmd 'repeat-map 'org-navigation-repeat-map))
|
||||
org-navigation-repeat-map)
|
||||
|
||||
(defvar org-link-navigation-repeat-map (make-sparse-keymap)
|
||||
"Repeat keymap for link navigation commands.")
|
||||
(org-defkey org-link-navigation-repeat-map (kbd "n") #'org-next-link)
|
||||
(org-defkey org-link-navigation-repeat-map (kbd "p") #'org-previous-link)
|
||||
(map-keymap
|
||||
(lambda (_ cmd)
|
||||
(put cmd 'repeat-map 'org-link-navigation-repeat-map))
|
||||
org-link-navigation-repeat-map)
|
||||
|
||||
(defvar org-block-navigation-repeat-map (make-sparse-keymap)
|
||||
"Repeat keymap for block navigation commands.")
|
||||
(org-defkey org-block-navigation-repeat-map (kbd "f") #'org-next-block)
|
||||
(org-defkey org-block-navigation-repeat-map (kbd "b") #'org-previous-block)
|
||||
(map-keymap
|
||||
(lambda (_ cmd)
|
||||
(put cmd 'repeat-map 'org-block-navigation-repeat-map))
|
||||
org-block-navigation-repeat-map)
|
||||
|
||||
;;;; Extra keys for TTY access.
|
||||
|
||||
;; We only set them when really needed because otherwise the
|
||||
@@ -620,8 +655,8 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
|
||||
(org-defkey org-mode-map (kbd "C-c C-x x") #'org-dynamic-block-insert-dblock)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-u") #'org-dblock-update)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-l") #'org-latex-preview)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-v") #'org-toggle-inline-images)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-M-v") #'org-redisplay-inline-images)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-v") #'org-link-preview)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-M-v") #'org-link-preview-refresh)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x \\") #'org-toggle-pretty-entities)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-b") #'org-toggle-checkbox)
|
||||
(org-defkey org-mode-map (kbd "C-c C-x C-r") #'org-toggle-radio-button)
|
||||
@@ -656,8 +691,13 @@ commands should be active.
|
||||
For example, to activate speed commands when the point is on any
|
||||
star at the beginning of the headline, you can do this:
|
||||
|
||||
(setq org-use-speed-commands
|
||||
(lambda () (and (looking-at org-outline-regexp) (looking-back \"^\\**\"))))"
|
||||
(setopt org-use-speed-commands
|
||||
(lambda ()
|
||||
(and (looking-at org-outline-regexp)
|
||||
(looking-back \"^\\\\**\"))))
|
||||
|
||||
Note that prior to Emacs 29, `setopt' is unavailable, and
|
||||
`custom-set-variables' or `setq' is used instead."
|
||||
:group 'org-structure
|
||||
:type '(choice
|
||||
(const :tag "Never" nil)
|
||||
@@ -720,10 +760,10 @@ hook. The default setting is `org-speed-command-activate'."
|
||||
("Meta Data Editing")
|
||||
("t" . org-todo)
|
||||
("," . (org-priority))
|
||||
("0" . (org-priority ?\ ))
|
||||
("1" . (org-priority ?A))
|
||||
("2" . (org-priority ?B))
|
||||
("3" . (org-priority ?C))
|
||||
("0" . (org-priority 'remove))
|
||||
("1" . (org-priority org-priority-highest))
|
||||
("2" . (org-priority org-priority-default))
|
||||
("3" . (org-priority org-priority-lowest))
|
||||
(":" . org-set-tags-command)
|
||||
("e" . org-set-effort)
|
||||
("E" . org-inc-effort)
|
||||
@@ -749,7 +789,7 @@ interpreted as a descriptive headline that will be added when
|
||||
listing the speed commands in the Help buffer using the `?' speed
|
||||
command."
|
||||
:group 'org-structure
|
||||
:package-version '(Org . "9.5")
|
||||
:package-version '(Org . "9.8")
|
||||
:type '(repeat :value ("k" . ignore)
|
||||
(choice :value ("k" . ignore)
|
||||
(list :tag "Descriptive Headline" (string :tag "Headline"))
|
||||
@@ -757,7 +797,8 @@ command."
|
||||
(string :tag "Command letter")
|
||||
(choice
|
||||
(function)
|
||||
(sexp))))))
|
||||
(sexp)))))
|
||||
:risky t)
|
||||
|
||||
(defun org--print-speed-command (speed-command)
|
||||
"Print information about SPEED-COMMAND in help buffer.
|
||||
|
||||
Reference in New Issue
Block a user