* [PATCH] org-ctags: When `ido-mode' is off, use completing-read
@ 2024-02-11 4:55 Martin Marshall
2024-02-11 14:58 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Martin Marshall @ 2024-02-11 4:55 UTC (permalink / raw)
To: emacs-orgmode
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Improve completion for org-ctags-find-tag-interactive --]
[-- Type: text/x-diff, Size: 1047 bytes --]
From 24d731457433b333b28845e6140532bad790800e Mon Sep 17 00:00:00 2001
From: Martin Marshall <law@martinmarshall.com>
Date: Sat, 10 Feb 2024 23:02:34 -0500
Subject: [PATCH] org-ctags: Use `completing-read' if `ido-mode' is off
* org-ctags.el (org-ctags-find-tag-interactive): Only use
`ido-completing-read' if `ido-mode' is enabled, otherwise use
`completing-read'.
---
lisp/org-ctags.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el
index 9d9028704..a825bd7cf 100644
--- a/lisp/org-ctags.el
+++ b/lisp/org-ctags.el
@@ -510,7 +510,8 @@ Uses `ido-mode' if available.
If the user enters a string that does not match an existing tag, create
a new topic."
(interactive)
- (let* ((tag (ido-completing-read "Topic: " org-ctags-tag-list
+ (let* ((compfunc (if ido-mode 'ido-completing-read 'completing-read))
+ (tag (funcall compfunc "Topic: " org-ctags-tag-list
nil 'confirm nil 'org-ctags-find-tag-history)))
(when tag
(cond
--
2.39.2
[-- Attachment #2: Type: text/plain, Size: 263 bytes --]
Here's another patch for org-ctags.el.
`org-ctags-find-tag-interactive' uses `ido-completing-read' for
selecting and jumping to a target.
This patch makes it use `completing-read' instead, unless the user
enabled `ido-mode'.
--
Best regards,
Martin Marshall
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-11 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 4:55 [PATCH] org-ctags: When `ido-mode' is off, use completing-read Martin Marshall
2024-02-11 14:58 ` 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).