emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

org-goto bug


From: Pan Xie
Subject: org-goto bug
Date: Thu, 22 Feb 2024 15:40:25 +0800
User-agent: Mozilla Thunderbird

Hello

Just found a minor issue about the org-goto interface. When I set `org-goto-auto-isearch' as `t', the number keys should also be part of isearch, not treated as "digit argument". However, the current version (9.7-pre) of OrgMode I am using treat the number keys as digit argument in auto isearch mode.

I also find the solution: just pass `t' as second argument to `suppress-keymap', to make all number keys unbound in the keymap:

#+begin_src elisp
;; org-goto.el
(defun org-goto--set-map ()
  "Set the keymap `org-goto'."
  (setq org-goto-map
    (let ((map (make-sparse-keymap)))
      (let ((cmds '(isearch-forward isearch-backward kill-ring-save set-mark-command
                    mouse-drag-region universal-argument org-occur)))
        (dolist (cmd cmds)
          (substitute-key-definition cmd cmd map global-map)))
      (suppress-keymap map t) ;; <==================================== pass t as second argument to fix the issue
      (org-defkey map "\C-m"     'org-goto-ret)
      (org-defkey map [(return)] 'org-goto-ret)

#+end_src

The version of org-mode with the issue:

#+begin_src elisp
  (org-version nil t)
  ;;=> "Org mode version 9.7-pre (release_9.6.19-1208-g7360c6 @ /home/git/org-mode/lisp/)"
#+end_src




reply via email to

[Prev in Thread] Current Thread [Next in Thread]