Threading of forwarded messages

2019-01-22 Thread Örjan Ekeberg
Hi, Let me first say that I am a very happy user of notmuch+emacs. Once the initial setup and configuration was done, usage has been a very pleasant experience. It daily saves me from getting lost in the constant torrent of incoming e-mail, where most need replies or to be forwarded to others

[RFC PATCH] forward: Add References header to forwarded messages

2019-01-27 Thread Örjan Ekeberg
Include the message-id of forwarded messages in the new message. This ensures that the new message is linked to the same thread. --- emacs/notmuch-mua.el | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index

Re: [PATCH 0/2] Updating tags when replying or forwarding via a buffer-local variable

2019-04-02 Thread Örjan Ekeberg
Tomi Ollila writes: > two things > > - I wonder whether we could drop (defun notmuch-message-mark-replied ()...) > - why is it needed for backward compatibility ? Yes, it would be cleaner to simply remove it. My thought was that there is a slight risk that someone is explicitly using or

[PATCH v2 2/4] emacs: Use a buffer-local variable to update tags when sending replies

2019-04-04 Thread Örjan Ekeberg
Instead of relying on the "In-Reply-To" header, use a buffer-local variable, notmuch-message-queued-tag-changes, to add and remove tags to affected messages when the message-send-hook is triggered. --- emacs/notmuch-message.el | 24 emacs/notmuch-mua.el | 5 + 2

[PATCH v2 1/4] emacs: Add References header to forwarded messages

2019-04-04 Thread Örjan Ekeberg
Include the message-id of forwarded messages in the new message. This ensures that the new (forwarding) message is linked to the same thread as the message being forwarded. --- emacs/notmuch-mua.el | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

Updating tags when replying or forwarding via a buffer-local variable

2019-04-04 Thread Örjan Ekeberg
Updated version of the patches that add references to forwarded messages, and tags to the messages being forwarded. This version has some cleanups and adds code for testing the functionality for forwarded messages. Örjan Ekeberg (4): emacs: Add References header to forwarded messages emacs

[PATCH v2 4/4] test: add test for checking forwarded messages

2019-04-04 Thread Örjan Ekeberg
Add test of forwarding messages from within emacs. The first test checks that a references header is properly added to the new message. The second test checks that the send-hook of the forwarding message adds a forwarded-tag to the original message. --- test/T730-emacs-forwarding.sh | 35

[PATCH v2 3/4] emacs: Tag forwarded messages with +forwarded (customizable)

2019-04-04 Thread Örjan Ekeberg
Use the buffer-local variable notmuch-message-queued-tag-changes to change tags when the forwarding message is sent. --- emacs/notmuch-message.el | 13 + emacs/notmuch-mua.el | 14 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git

[PATCH] emacs: Make first documentation line distinct for "a" and "x" commands.

2019-04-05 Thread Örjan Ekeberg
Since only the first line of the documentation is shown by the help command, it is confusing when "x" and "a" seem to have the same binding in show-mode. This commit makes the two function documentations first lines different and (hopefully) clearer. --- emacs/notmuch-show.el | 4 ++-- 1 file

[PATCH 2/2] emacs: Tag forwarded messages with +forwarded (customizable)

2019-03-30 Thread Örjan Ekeberg
Use the buffer-local variable notmuch-message-queued-tag-changes to change tags when the forwarding message is sent. --- emacs/notmuch-message.el | 13 + emacs/notmuch-mua.el | 21 ++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git

[PATCH 0/2] Updating tags when replying or forwarding via a buffer-local variable

2019-03-30 Thread Örjan Ekeberg
mechanism for forwarded messages. This patch is on top of a previously submitted patch (for adding a References header), and will not apply cleanly without that. Örjan Ekeberg (2): emacs: Use a buffer-local variable to update tags when sending replies emacs: Tag forwarded messages with +forwarded

[PATCH 1/2] emacs: Use a buffer-local variable to update tags when sending replies

2019-03-30 Thread Örjan Ekeberg
Instead of relying on the "In-Reply-To" header, use a buffer-local variable, notmuch-message-queued-tag-changes, to add and remove tags to affected messages when the message-send-hook is triggered. --- emacs/notmuch-message.el | 21 +++-- emacs/notmuch-mua.el | 5 + 2

Re: [PATCH] emacs: Add References header to forwarded messages

2019-04-01 Thread Örjan Ekeberg
Daniel Kahn Gillmor writes: > This seems reasonable to me. I'd personally like forwarded messages to > show up connected to the same thread os the originals, and i don't see a > downside to it. From what I can see, GMail and Outlook already does this (include a references-header in forwarding

Re: [PATCH v2 4/4] test: add test for checking forwarded messages

2019-04-07 Thread Örjan Ekeberg
Tomi Ollila writes: > On Fri, Apr 05 2019, Örjan Ekeberg wrote: > >> +test_begin_subtest "Forward setting the correct references header" >> +message_id='originalmess...@notmuchmail.org' >> +add_message \ >> +[id]="$message_id" \ >&

Re: Threading of forwarded messages

2019-01-23 Thread Örjan Ekeberg
Tomi Ollila writes: > notmuch-mua-new-forward-messages would be the place adding message-id's > to the references header (perhaps where 'appropriate subject' is added) > probably not much work but SMOP anyway ;/ Indeed. Here is an attempt that seems to do the trick. This is a modified version

Re: [PATCH v3 4/4] test: add test for checking forwarded messages

2019-04-11 Thread Örjan Ekeberg
Tomi Ollila writes: > > good stuff -- comments inline Yes, the test suite in general could benefit from more comments, since there are quite a lot of "smart things" going on. >> +test_emacs_expect_t " >> + (progn >> +(notmuch-show \"id:$message_id\") >> +(notmuch-show-forward-message)

[PATCH] emacs: Add missing type and group to defcustom variable

2019-04-15 Thread Örjan Ekeberg
Added the type 'regexp and group 'notmuch-send as properties to the customizable variable notmuch-mua-attachment-regexp. --- emacs/notmuch-mua.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 94fa19d7..7fdd76bc 100644 ---

[PATCH v4 1/4] emacs: Add References header to forwarded messages

2019-04-12 Thread Örjan Ekeberg
Include the message-id of forwarded messages in the new message. This ensures that the new (forwarding) message is linked to the same thread as the message being forwarded. --- emacs/notmuch-mua.el | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v4 4/4] test: add test for checking forwarded messages

2019-04-12 Thread Örjan Ekeberg
Add test of forwarding messages from within emacs. The first test checks that a references header is properly added to the new message. The second test checks that the send-hook of the forwarding message adds a forwarded-tag to the original message. --- test/T730-emacs-forwarding.sh | 41

[PATCH v4 2/4] emacs: Use a buffer-local variable to update tags when sending replies

2019-04-12 Thread Örjan Ekeberg
Instead of relying on the "In-Reply-To" header, use a buffer-local variable, notmuch-message-queued-tag-changes, to add and remove tags to affected messages when the message-send-hook is triggered. --- emacs/notmuch-message.el | 25 - emacs/notmuch-mua.el | 6 ++

[PATCH v4 3/4] emacs: Tag forwarded messages with +forwarded (customizable)

2019-04-12 Thread Örjan Ekeberg
Use the buffer-local variable notmuch-message-queued-tag-changes to change tags when the forwarding message is sent. --- emacs/notmuch-message.el | 13 + emacs/notmuch-mua.el | 14 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git

Updated version of the patch-set for tagging forwarded messages

2019-04-12 Thread Örjan Ekeberg
have reversed the dependency so that notmuch-mua.el requires notmuch-message.el. This change was needed to make the code emacs-compile cleanly since the code in notmuch-mua uses the variables defined in notmuch-message. Örjan Ekeberg (4): emacs: Add References header to forwarded messages

Re: notmuch-message-mark-replied

2019-06-03 Thread Örjan Ekeberg
David Bremner writes: > In d9800c8 we deleted the function notmuch-message-mark-replied. > > Should we make a deprecated-alias for > notmuch-message-apply-queued-tag-changes? The two functions are not interchangeable, so it may not be appropriate to mark it as an alias.

Re: feature request: caching message arrival time

2019-06-03 Thread Örjan Ekeberg
Daniel Kahn Gillmor writes: > So Autocrypt defines the "effective date" of a message as the *earliest* > of two dates: the date that the message is first seen, and the Date: > header itself. So we want our augmented Autocrypt header ingestion > routine to search for all other messages we know

Re: notmuch-message-mark-replied

2019-06-03 Thread Örjan Ekeberg
"Rollins, Jameson" writes: > I have the following in my emacs config: > > '(message-send-hook >(quote > (notmuch-message-mark-replied notmuch-fcc-header-setup))) > > I'm wondering what if anything I should replace this with. You should probably remove this altogether.

Re: feature request: caching message arrival time

2019-06-03 Thread Örjan Ekeberg
Daniel Kahn Gillmor writes: > Sure, assuming that you trust the closest MTA in the chain of MTAs that > handed the message off to you, since an adversarial proximal MTA could > manipulate all the existing Received: headers as well. > > But I'm a bit uncomfortable with it: this sort of protection

[BUG] emacs: notmuch-mua-attachment-check finds triggering string inside forwarded messages

2019-05-08 Thread Örjan Ekeberg
Hi all, I have found what seems to be a bug, or at least a misbehaviour of the "missing attachment warning" implemented by the otherwise so nice notmuch-mua-attachment-check. It works fine to detect the regexp for attachments in simple messages. The problem is that it also triggers the warning

Re: [PATCH] emacs: hint that notmuch-mua-attachment-regexp is a regular expression

2019-04-22 Thread Örjan Ekeberg
This addresses the same issue, and therefore overlaps with the patch I submitted a week ago. (id:20190415133519.4532-1-ekeb...@kth.se) /Örjan Daniel Kahn Gillmor writes: > Without this change, we see the following warnings during the build: > > ``` > In toplevel form: >

[PATCH v3 4/4] test: add test for checking forwarded messages

2019-04-10 Thread Örjan Ekeberg
Add test of forwarding messages from within emacs. The first test checks that a references header is properly added to the new message. The second test checks that the send-hook of the forwarding message adds a forwarded-tag to the original message. --- test/T730-emacs-forwarding.sh | 30

Updated testing script

2019-04-10 Thread Örjan Ekeberg
Based on the feedback from Tomi and David (thanks!), here is a updated and cleaner version of the test associated with the patch-set for forwarding. Örjan Ekeberg (4): emacs: Add References header to forwarded messages emacs: Use a buffer-local variable to update tags when sending replies

Re: script to move messages according to tags

2019-12-11 Thread Örjan Ekeberg
Alan Schmitt writes: > Has someone written such a script that I could copy and > adapt? > > My use cases are: > - find files with a deleted flag not in the Trash and move them to > the > Trash > - find files with an archive flag in my active mail store and move > them > to my local mail

Re: proposing "notmuch purge"

2020-01-15 Thread Örjan Ekeberg
While I like the idea of making it easy to prune away old junk messages from the mail store, I find it dangerously disruptive to suddenly change the semantics of the deleted tag. To me, the deleted tag has always meant something like "I do not want to see this message again; unless it reappears

Re: performance in emacs displaying a huge thread

2020-01-15 Thread Örjan Ekeberg
Hi Alan, Alan Schmitt writes: > > September 07 [13/5767] > > It takes forever to display (I've waited a few minutes and it was still > stuck). I know it's a lot of messages, so is there a way to just display > the 13 that match? Or to limit the total number of messages displayed? I think

Re: notmuch-crypto.el: "‘notmuch-show-get-message-id’ is not known to be defined"

2020-03-18 Thread Örjan Ekeberg
Daniel Kahn Gillmor writes: > When building the current version of notmuch on debian testing/unstable, > i see the following warning: > > ``` > EMACS emacs/notmuch-crypto.elc > > In end of data: > emacs/notmuch-crypto.el:266:1:Warning: the function > ‘notmuch-show-get-message-id’ is not