unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: David Bremner <david@tethera.net>,
	Alan Schmitt <alan.schmitt@polytechnique.org>,
	notmuch <notmuch@notmuchmail.org>
Subject: Re: notmuch-tag failing on trailing space
Date: Mon, 16 Aug 2021 16:48:17 +0100	[thread overview]
Message-ID: <m2pmud2xxa.fsf@dme.org> (raw)
In-Reply-To: <87a6lh8lln.fsf@tethera.net>

On Monday, 2021-08-16 at 08:17:56 -07, David Bremner wrote:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>>
>> #+begin_src emacs-lisp
>>   (defun trim-tag-changes (args)
>>     (list (car args) (mapcar #'s-trim-right (cadr args))))
>>   (advice-add 'notmuch-tag :filter-args #'trim-tag-changes)
>> #+end_src
>>
>> Could it be integrated directly in the notmuch-tag function?
>>
>
> That particular function won't work for us because it would introduce a
> new dependency on s.el. But if someone wants to make an equivalent using
> only core emacs functions and integrate it into notmuch-tag, that seems
> likely OK to me.

What if someone has trailing spaces on their tags deliberately?

This seems like an oddity of the code in `notmuch-read-tag-changes' that
appends a space to every possible completion. It would probably be a
more annoying change to some users, but I'd be more inclined to remove
that code than this change.

  reply	other threads:[~2021-08-16 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  8:24 notmuch-tag failing on trailing space alan.schmitt
2021-07-27  9:37 ` Tomi Ollila
2021-08-16  9:03 ` Alan Schmitt
2021-08-16 15:17   ` David Bremner
2021-08-16 15:48     ` David Edmondson [this message]
2021-08-17  5:52       ` Tomi Ollila
2021-10-23 17:05         ` [PATCH] emacs: don't add space to tag completion candidates David Bremner
2021-10-29 15:30           ` inwit
2021-10-30  9:31             ` David Bremner
2021-10-31 19:34               ` Tomi Ollila
2021-12-04 16:59           ` David Bremner
2021-08-16 15:52     ` notmuch-tag failing on trailing space Alan Schmitt

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pmud2xxa.fsf@dme.org \
    --to=dme@dme.org \
    --cc=alan.schmitt@polytechnique.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).