emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nathaniel Flath <flat0103@gmail.com>
To: org-mode List <emacs-orgmode@gnu.org>
Subject: [PATCH] org-agenda tag completion works with ido
Date: Wed, 12 Jul 2017 17:23:25 -0700	[thread overview]
Message-ID: <CAPrg3HBYSkjj7ev_YR0kciOWhSaF+Ui85tXH4GVtWo1-Frs1rQ@mail.gmail.com> (raw)

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

After upgrading to the latest org-mode, tag completion when filtering
in the agenda was broken - I had to fully enter the tag, despite using
ido  (eg I would have a tag 'home', and 'ho-enter' would not compete).
Minor patch to fix this behaviour is attached.  Let me know if there
are any issues.

Thanks,
Nathaniel Flath

[-- Attachment #2: 0001-completing-read-in-org-agenda-filter-by-tag-complete.patch --]
[-- Type: application/octet-stream, Size: 1116 bytes --]

From c9e2a82d7db183749715bf19ab35609ec5ae3b14 Mon Sep 17 00:00:00 2001
From: Nathaniel Flath <flat0103@gmail.com>
Date: Wed, 12 Jul 2017 17:15:04 -0700
Subject: [PATCH] completing-read in org-agenda-filter-by-tag completes
 partially-entered input

* org-agenda.el (org-agenda-filter-by-tag):
(org-agenda-filter-by-tag): pass t to require-match argument of completing-read.
This causes ido-mode to complete tags properly when inputting partial matches, rather
that just sending the typed input.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9ac4f65..20d128d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7496,7 +7496,7 @@ also press `-' or `+' to switch between filtering and excluding."
 		    (org-global-tags-completion-table)))
       (let ((completion-ignore-case t))
 	(setq tag (completing-read
-		   "Tag: " org-global-tags-completion-table))))
+		   "Tag: " org-global-tags-completion-table nil t))))
     (cond
      ((eq char ?\r)
       (org-agenda-filter-show-all-tag)
-- 
2.10.1 (Apple Git-78)


             reply	other threads:[~2017-07-13  0:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13  0:23 Nathaniel Flath [this message]
2017-07-13  4:35 ` [PATCH] org-agenda tag completion works with ido Kyle Meyer
2017-07-13 17:07   ` Nathaniel Flath
2017-07-13 18:02     ` Kyle Meyer
2017-07-13 18:14       ` Kyle Meyer
2017-07-13 18:19       ` Nathaniel Flath
2017-07-13 19:03         ` Nathaniel Flath
2017-07-13 19:19           ` Kyle Meyer
2017-07-13 19:52             ` Nathaniel Flath
2017-07-13 20:31               ` Kyle Meyer
2017-07-16 16:42                 ` Nathaniel Flath
2017-07-16 21:03                   ` Kyle Meyer

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=CAPrg3HBYSkjj7ev_YR0kciOWhSaF+Ui85tXH4GVtWo1-Frs1rQ@mail.gmail.com \
    --to=flat0103@gmail.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).