emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-goto bug
@ 2012-12-31 16:09 Tyler Smith
  2013-01-02  9:49 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Tyler Smith @ 2012-12-31 16:09 UTC (permalink / raw)
  To: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3737 bytes --]

Hi,

According to the manual, and the help window that pops up when you call it,
org-goto should accept a few one-letter commands to move up one level (u),
quit (q), move to the next (n) or previous(p) heading.
However, whenever I try any of these keys, they are interpreted as the
search string for isearch. My set-up is provided below. I have confirmed
that this is also the case when I start emacs with 'emacs -Q', so I don't
think I've done this in my config.

Thanks,

Tyler


Emacs  : GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-12-27 on ONOTTAR654746
Package: Org-mode version 7.9.1 (7.9.1-dist @
/usr/local/share/emacs/site-lisp/org/)

current state:
==============
(setq
 org-export-blocks '((src org-babel-exp-src-block nil)
                     (export-comment org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil) (dot
org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-export-latex-packages-alist '(("" "natbib" nil) "\\bibpunct{(} {)} {;}
{a} {} {,}")
 org-reverse-note-order t
 org-agenda-skip-scheduled-if-done t
 org-export-with-drawers t
 org-export-with-tags t
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
                      org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-refile-targets '((my-org-refile-targets :maxlevel . 5))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-fast-tag-selection-single-key 'expert
 org-default-notes-file "~/.emacs.d/org/notes.org"
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-cycle-global-at-bob t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-ndays 7
 org-agenda-include-diary t
 org-agenda-skip-deadline-if-done t
 org-enforce-todo-dependencies t
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-mode-hook '(my-org-mode-hook er/add-org-mode-expansions
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all
append local]
 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
org-babel-show-result-all append
 local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-agenda-start-on-weekday nil
 org-directory "~/.emacs.d/org"
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
                               org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )

[-- Attachment #2: Type: text/html, Size: 4234 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-goto bug
  2012-12-31 16:09 org-goto bug Tyler Smith
@ 2013-01-02  9:49 ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-01-02  9:49 UTC (permalink / raw)
  To: Tyler Smith; +Cc: Emacs-orgmode

Hi Tyler,

Tyler Smith <tyler.smith@mail.mcgill.ca> writes:

> According to the manual, and the help window that pops up when you
> call it, org-goto should accept a few one-letter commands to move up
> one level (u), quit (q), move to the next (n) or previous(p) heading.
> However, whenever I try any of these keys, they are interpreted as
> the search string for isearch. My set-up is provided below. I have
> confirmed that this is also the case when I start emacs with 'emacs
> -Q', so I don't think I've done this in my config.

there were even more problems in this area -- using the "*Help*" buffer
wasn't a good idea, customizing `org-goto-auto-isearch' wasn't taken
into account, etc.

So thanks for reporting this, I fixed the problem you reported.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* org-goto bug
@ 2024-02-22  7:40 Pan Xie
  2024-02-24  9:09 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Pan Xie @ 2024-02-22  7:40 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-goto bug
  2024-02-22  7:40 Pan Xie
@ 2024-02-24  9:09 ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-02-24  9:09 UTC (permalink / raw)
  To: Pan Xie; +Cc: emacs-orgmode

Pan Xie <xiepan@skyguard.com.cn> writes:

> 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:

Thanks for reporting!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4b1399fb2

Unconditionally passing t would break things when
`org-goto-auto-isearch' is nil. So, I went with slightly different
approach.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-24  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-31 16:09 org-goto bug Tyler Smith
2013-01-02  9:49 ` Bastien
  -- strict thread matches above, loose matches on Subject: below --
2024-02-22  7:40 Pan Xie
2024-02-24  9:09 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).