Hello, I'm noticing a problem with the `org-goto` command when used with
`org-goto-interface` set to `outline-path-completion`.
I use the standard "*Completions*" buffer for completion, so I would
like to leave the setting of `org-outline-path-complete-in-steps` at its
default (t).
But I've found that I'm unable to complete with `org-goto` if I select
an item in the Completions buffer. This is because as soon as I
select a heading in the Completions buffer, the text that I entered
in the minibuffer is duplicated, so the Completion doesn't match.
Steps to reproduce:
1. Start Emacs with "emacs -Q"
2. In the scratch buffer, evaluate:
(setopt org-goto-interface 'outline-path-completion)
3. Open an Org-mode file that has multiple headings with the same
starting character(s).
4. Enter "C-c C-j" to invoke `org-goto`
5. Enter some text that matches multiple headings, and press "TAB"
6. Attempt to complete from the Completions buffer with "M-<down>"
7. Notice that as soon as you highlight any of the headings listed in
the Completions buffer, the text you typed in the minibuffer
appears twice.
For example, if you type "Emacs", press TAB and attempt to select the
heading "Emacs Usage" in the Completions buffer by pressing
"M-<down>", the text after the minibuffer prompt will be
"EmacsEmacs Usage", which doesn't match any headings.
You will not be able to complete without manually deleting the
duplicated text.
With warm regards and gratitude,
Martin Marshall
------------------------------------------------------------------------
Emacs : GNU Emacs 30.1 (build 2, x86_64-pc-linux-gnu, X toolkit,
cairo version 1.16.0, Xaw3d scroll bars)
of 2025-02-27, modified by Debian
Package: Org mode version 9.7.25 (9.7.25-bdf9f94 @
/home/martin/emacs-work/elpa/org-9.7.25/)
current state:
==============
(setq
org-special-ctrl-a/e '(reversed . t)
org-yank-image-file-name-function 'org-yank-image-autogen-filename
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-log-into-drawer t
org-list-demote-modify-bullet '(("-" . "+") ("+" . "*") ("*" . "-")
("a." . "1.") ("1." . "A.") ("A." . "a.") ("a)" . "1)") ("1)" . "A)")
("A)" . "a)"))
org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-confirm-elisp-link-function 'yes-or-no-p
org-log-done 'time
org-blank-before-new-entry '((heading) (plain-list-item))
org-mode-hook '(org-tempo-setup
#[0
"\305\306
>\203\0\307\n\310\311#\210\307 \312\313#\210\307 \314\315#\210\306
>\203,\0\307\n\316\317#\210\307\n\320\321#\210\322
>\203>\0\307 \323\324#\210\307 \325\324#\210\326
>\203P\0\307\n\327\317#\210\307\n\330\321#\210\331
>\203_\0\332\311\f\333BC\334#\210\335
>\203k\0\332\311\336\334#\210\337
>\203w\0\332\311\340\334#\210\341\342\343\344#\207"
[org-mouse-context-menu-function
org-mouse-features org-mouse-map org-mode-map org-outline-regexp
org-mouse-context-menu context-menu org-defkey [mouse-3] nil
[mouse-3]
org-mouse-show-context-menu [down-mouse-1] org-mouse-down-mouse
[C-drag-mouse-1] org-mouse-move-tree [C-down-mouse-1]
org-mouse-move-tree-start yank-link
[S-mouse-2] org-mouse-yank-link [drag-mouse-3] move-tree
[drag-mouse-3] [down-mouse-3] activate-stars font-lock-add-keywords
(0 `(face org-link mouse-face highlight keymap ,org-mouse-map)
'prepend) t activate-bullets
(("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" (1 `(face org-link
keymap ,org-mouse-map mouse-face highlight) 'prepend)))
activate-checkboxes
(("^[ ]*\\(?:[-+*]\\|[0-9]+[.)]\\)[
]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ ]*\\)?\\(\\[[- X]\\]\\)"
(1 `(face nil keymap ,org-mouse-map mouse-face highlight)
prepend))
)
advice-add org-open-at-point :around org--mouse-open-at-point] 4]
#[0 "\300\301\302\303\304$\207" [add-hook
change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207" [add-hook
change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec
org-babel-hide-all-hashes variable-pitch-mode
abbrev-mode flyspell-mode)
org-hide-emphasis-markers t
org-use-speed-commands t
org-support-shift-select 'always
org-refile-targets '((org-agenda-files :maxlevel . 2))
org-confirm-shell-link-function 'yes-or-no-p
org-archive-hook '(org-attach-archive-delete-maybe)
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-special-ctrl-k t
org-metaup-hook '(org-babel-load-in-session-maybe)
org-occur-hook '(org-first-headline-recenter)
org-enforce-todo-dependencies t
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-link-parameters '(("attachment" :follow org-attach-follow
:complete org-attach-complete-link)
("id" :follow org-id-open :store
org-id-store-link-maybe) ("eww" :follow org-eww-open :store
org-eww-store-link)
("info" :follow org-info-open :export
org-info-export :store org-info-store-link :insert-description
org-info-description-as-command)
("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link) ("doi" :follow org-link-doi-open :export
org-link-doi-export)
("file+sys") ("file+emacs") ("shell" :follow
org-link--open-shell)
("news" :follow #[514 "\301\300\302Q\"\207"
["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
("mailto" :follow #[514
"\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL
ARG)"])
("https" :follow #[514
"\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL
ARG)"])
("http" :follow #[514 "\301\300\302Q\"\207"
["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
("ftp" :follow #[514 "\301\300\302Q\"\207"
["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])
("help" :follow org-link--open-help :store
org-link--store-help) ("file" :complete org-link-complete-file)
("elisp" :follow org-link--open-elisp))
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-return-follows-link t
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-sort-function 'string-collate-lessp
org--warnings nil
org-babel-pre-tangle-hook '(save-buffer)
org-tags-column 0
org-export-before-parsing-hook '(org-attach-expand-links)
org-link-shell-confirm-function 'yes-or-no-p
org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
org-tags-exclude-from-inheritance '("project")
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-agenda-mode-hook '(#[0 "\302\303 \304\305#\210\303
\306\307#\210\303 \310\311#\210\303 \312\313#\210\303
\314\315#\207"
[org-mouse-context-menu-function
org-agenda-mode-map org-mouse-agenda-context-menu org-defkey
[mouse-3]
org-mouse-show-context-menu [down-mouse-3]
org-mouse-move-tree-start [C-mouse-4] org-agenda-earlier [C-mouse-5]
org-agenda-later
[drag-mouse-3]
#[257
"\300!\211\301\267\202\0\302\303!\207\304\303!\207\305\207"
[org-mouse-get-gesture #s(hash-table test
eq purecopy t data (:left 9 :right 13)) org-agenda-earlier 1
org-agenda-later nil] 4
"\n\n(fn EVENT)" "e"]
]
4]
)
org-modules '(ol-doi ol-bibtex ol-docview ol-info ol-eww org-id
org-mouse org-protocol org-tempo)
org-agenda-loop-over-headlines-in-active-region nil
org-auto-align-tags nil
org-agenda-files '("work.org")
org-list-allow-alphabetical t
org-link-elisp-confirm-function 'yes-or-no-p
org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
org-cycle-optimize-window-after-visibility-change
org-cycle-display-inline-images)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
org-use-sub-superscripts '{}
org-id-link-to-org-use-id t
)