* Individual tag file lines and removing all tags?
@ 2024-02-11 12:07 Ralph Seichter
2024-02-12 23:38 ` David Bremner
0 siblings, 1 reply; 9+ messages in thread
From: Ralph Seichter @ 2024-02-11 12:07 UTC (permalink / raw)
To: notmuch
Looking at the notmuch-tag(1) man page, I wonder if something like the
following tag file content is currently possible:
-* +deleted -- folder:.Trash
-* +ancient -- date:..10_years_ago
+foo -- from:foo@example.com
What I am trying to achieve with lines 1 and 2 is replacing all existing
tags (symbolised by '-*') with the 'deleted' or 'ancient' tag,
respectively. With line 3, I want to add the 'foo' tag, but leaving any
existing tags untouched (this is already works, of course).
Using both --batch and --remove-all simultaneously for notmuch-tag is
not permitted, and rightly so, because the hypothetical semantics would
seem odd. The remove-all-existing-tags step would probably need to apply
to all tag file lines, which does not seem very useful to me. Does this
paragraph even make sense? ;-)
-Ralph
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-11 12:07 Individual tag file lines and removing all tags? Ralph Seichter
@ 2024-02-12 23:38 ` David Bremner
2024-02-13 0:32 ` Ralph Seichter
0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2024-02-12 23:38 UTC (permalink / raw)
To: Ralph Seichter, notmuch
Ralph Seichter <ralph@ml.seichter.de> writes:
> Looking at the notmuch-tag(1) man page, I wonder if something like the
> following tag file content is currently possible:
>
> -* +deleted -- folder:.Trash
> -* +ancient -- date:..10_years_ago
> +foo -- from:foo@example.com
>
> What I am trying to achieve with lines 1 and 2 is replacing all existing
> tags (symbolised by '-*') with the 'deleted' or 'ancient' tag,
> respectively. With line 3, I want to add the 'foo' tag, but leaving any
> existing tags untouched (this is already works, of course).
As far as I understand your request, this would currently need 3
different calls to notmuch-tag (or some scripting in e.g. python).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-12 23:38 ` David Bremner
@ 2024-02-13 0:32 ` Ralph Seichter
2024-02-13 7:56 ` Sandra Snan
2024-02-14 15:55 ` David Bremner
0 siblings, 2 replies; 9+ messages in thread
From: Ralph Seichter @ 2024-02-13 0:32 UTC (permalink / raw)
To: notmuch
* David Bremner:
> As far as I understand your request, this would currently need 3
> different calls to notmuch-tag (or some scripting in e.g. python).
I currently use a custom wrapper script to call notmuch-tag multiple
times for this very reason. I would prefer being able to use the '-*'
syntax shown in my OP with "notmuch tag --batch".
Is this a reasonable new-feature-suggestion, or do you guys think it
too exotic? Am I perhaps the only one who finds this useful?
-Ralph
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-13 0:32 ` Ralph Seichter
@ 2024-02-13 7:56 ` Sandra Snan
2024-02-14 15:55 ` David Bremner
1 sibling, 0 replies; 9+ messages in thread
From: Sandra Snan @ 2024-02-13 7:56 UTC (permalink / raw)
To: Ralph Seichter, notmuch
Ralph Seichter <ralph@ml.seichter.de> writes:
> I currently use a custom wrapper script to call notmuch-tag
> multiple times for this very reason.
That is the appropriate solution.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-13 0:32 ` Ralph Seichter
2024-02-13 7:56 ` Sandra Snan
@ 2024-02-14 15:55 ` David Bremner
2024-02-14 20:43 ` Ralph Seichter
1 sibling, 1 reply; 9+ messages in thread
From: David Bremner @ 2024-02-14 15:55 UTC (permalink / raw)
To: Ralph Seichter, notmuch
Ralph Seichter <ralph@ml.seichter.de> writes:
> I currently use a custom wrapper script to call notmuch-tag multiple
> times for this very reason. I would prefer being able to use the '-*'
> syntax shown in my OP with "notmuch tag --batch".
>
> Is this a reasonable new-feature-suggestion, or do you guys think it
> too exotic? Am I perhaps the only one who finds this useful?
Is there a benefit beyond simplifying this shell script (and maybe
aesthetics)?
d
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-14 15:55 ` David Bremner
@ 2024-02-14 20:43 ` Ralph Seichter
2024-02-14 21:54 ` Sandra Snan
2024-02-15 0:42 ` David Bremner
0 siblings, 2 replies; 9+ messages in thread
From: Ralph Seichter @ 2024-02-14 20:43 UTC (permalink / raw)
To: notmuch
* David Bremner:
> Is there a benefit beyond simplifying this shell script (and maybe
> aesthetics)?
In addition to what you mentioned, and more importantly, I am thinking
about efficiency.
notmuch-tag(1) states that batch tagging operations are "more efficient
than repeated notmuch tag invocations" (this is not qualified further).
I don't know if the efficiency advantage of batch tagging would justify
the time/effort required to implement the feature?
-Ralph
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-14 20:43 ` Ralph Seichter
@ 2024-02-14 21:54 ` Sandra Snan
2024-02-15 0:42 ` David Bremner
1 sibling, 0 replies; 9+ messages in thread
From: Sandra Snan @ 2024-02-14 21:54 UTC (permalink / raw)
To: Ralph Seichter, notmuch
The current tags file system already makes common things simple and
efficient, while still keeping unusual things possible. Pretty happy
about that
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-14 20:43 ` Ralph Seichter
2024-02-14 21:54 ` Sandra Snan
@ 2024-02-15 0:42 ` David Bremner
2024-02-15 0:58 ` Ralph Seichter
1 sibling, 1 reply; 9+ messages in thread
From: David Bremner @ 2024-02-15 0:42 UTC (permalink / raw)
To: Ralph Seichter, notmuch
Ralph Seichter <ralph@ml.seichter.de> writes:
>
> notmuch-tag(1) states that batch tagging operations are "more efficient
> than repeated notmuch tag invocations" (this is not qualified further).
> I don't know if the efficiency advantage of batch tagging would justify
> the time/effort required to implement the feature?
>
My assumption is that the overhead of multiple invocations is only
noticible for (at a guess) 1000s of calls to notmuch-tag. For two or
three it probably doesn't make much difference. batch-tag is really just
saving the cost of exec as far as I remember.
d
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Individual tag file lines and removing all tags?
2024-02-15 0:42 ` David Bremner
@ 2024-02-15 0:58 ` Ralph Seichter
0 siblings, 0 replies; 9+ messages in thread
From: Ralph Seichter @ 2024-02-15 0:58 UTC (permalink / raw)
To: notmuch
* David Bremner:
> My assumption is that the overhead of multiple invocations is only
> noticible for (at a guess) 1000s of calls to notmuch-tag.
Well, that certainly would mean that my proposal has negligible merit in
terms of efficiency. Matters of convenience and aesthetics probably
don't offer enough justification either. Unless somebody is bored and
looking for things to do, that is. ;-)
-Ralph
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-02-15 0:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 12:07 Individual tag file lines and removing all tags? Ralph Seichter
2024-02-12 23:38 ` David Bremner
2024-02-13 0:32 ` Ralph Seichter
2024-02-13 7:56 ` Sandra Snan
2024-02-14 15:55 ` David Bremner
2024-02-14 20:43 ` Ralph Seichter
2024-02-14 21:54 ` Sandra Snan
2024-02-15 0:42 ` David Bremner
2024-02-15 0:58 ` Ralph Seichter
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).