From: Martin Marshall <law@martinmarshall.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-ctags: When `ido-mode' is off, use completing-read
Date: Sat, 10 Feb 2024 23:55:47 -0500 [thread overview]
Message-ID: <87frxzr44s.fsf@martinmarshall.com> (raw)
[-- 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
next reply other threads:[~2024-02-11 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-11 4:55 Martin Marshall [this message]
2024-02-11 14:58 ` [PATCH] org-ctags: When `ido-mode' is off, use completing-read Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frxzr44s.fsf@martinmarshall.com \
--to=law@martinmarshall.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).