Re: notmuch-search not excluding excluded tags

2024-04-16 Thread David Bremner
Richard Stanton writes: > I have spam and trash defined as excluded tags for notmuch searches and when > I run (at the command line) the command > > notmuch search tag:unread > > I get a list of unread messages that does *not* include unread spam or trash > emails. But when I put the following

[emacs] handle unexpected stderr output from notmuch command

2024-04-14 Thread David Bremner
TIL that the running the notmuch command from inside "proxychains4 emacs", generates unexpected output on stderr, which messes up various emacs commands. This can be worked around by running "proxychains4 -q emacs", but it would be nice to handle output on stderr more consistently. I got as far

Re: [PATCH] perf-test/tag: add maildir sync tests

2024-04-05 Thread David Bremner
David Bremner writes: > Today someone asked me the (reasonable) question of how much > performance impact there is from synching tags to maildir flags. It > turns out it is noticeable, about a 50% overhead compared to > non-synched tags (according to these tests). In practice

Re: [PATCH] emacs: Mark "notmuch-tree" command for autoloading

2024-04-04 Thread David Bremner
Dmitry Bogatov writes: > Some people (e.g: me) prefer to read their email with threaded > representation by default. > Applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to

Re: [PATCH] emacs: Autoload notmuch-user-agent related functions

2024-04-04 Thread David Bremner
jli...@fsfe.org writes: > > ;;; _ > - > +;;;#autoload > (define-mail-user-agent 'notmuch-user-agent >'notmuch-mua-mail >'notmuch-mua-send-and-exit Applied to master with the deleted blank line put back ___ notmuch mailing list --

Re: Scheduling mails

2024-04-04 Thread David Bremner
João Pedro writes: > Ah, indeed message properties seem to be more appropriate. Are they > persisted, or are they tied to an Emacs session? They are persisted in the database, and backed up with notmuch dump. > >> but your periodic search would still have to search for all of the >>

Re: Forward email error - forward-sexp: Scan error

2024-04-03 Thread David Bremner
Jon Fineman writes: > Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 22384 > 32216) > scan-sexps(22384 1) > forward-sexp() > mml-expand-html-into-multipart-related((part (type . "text/html") (charset > . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . "

Re: Scheduling mails

2024-04-03 Thread David Bremner
João Pedro writes: > Em terça, 02/04/2024 às 02:05 (+01), Jose A Ortega Ruiz > escreveu: > >> I might be wrong, but I don't think the Gnus agent can be easily reused >> from notmuch. We could perhaps save the message as a draft upon C-c C-j, >> and then have a periodic timer that checks if any

Re: Forward email error - forward-sexp: Scan error

2024-03-19 Thread David Bremner
Jon Fineman writes: > Received this error while trying to forward a complex html email from ebay. > > Unfortunately there is probably some PII embedded in it, so trying to > remove that to include the email might confuse things. > > Any suggestions on how to find the error? > > > Sending... >

Re: (Emacs) Use tree view by default from notmuch-hello and notmuch-jump ?

2024-03-18 Thread David Bremner
Michael Graham writes: > I'm new at notmuch (and the list), so I'm probably doing something > wrong. > > I prefer tree view (notmuch-tree-mode) to search view > (notmuch-search-mode), and I would like my saved searches to open > in tree view automatically. > > I have a bunch of saved

Re: [PATCH] Use `without-restriction` in `with-temporary-notmuch-message-buffer`

2024-03-15 Thread David Bremner
Marc Fargas writes: > I hope my previous e-mails was properly sent. > Yes, it worked fine. > I have been testing the patch and.. does it work? The code looks proper > to me but testing on my computer it is not working properly, as if the > `without-restrictions` was being ignored. It seems

Re: [PATCH] NEWS: aspell(1)d few words

2024-03-12 Thread David Bremner
tomi.oll...@iki.fi writes: > From: Tomi Ollila > > Executed aspell -l en -c NEWS > > and replaced few obvious cases. Applied to master. Or should I say Aplyde to mastre, based on evidence presented. ___ notmuch mailing list -- notmuch@notmuchmail.org

notmuch release 0.38.3 now available

2024-03-09 Thread David Bremner
STaKMHWyK/JLOczrZUsBXIebrUun7iD7zp6a1ICa7uBhsbg5EasHWxb57nfNUTJJ rsQudJmyoNwfVDUUXnCejn05QzWMgH3S3uqFyTY56G6qanuikkNcn5Oq9wxkdalZ VQ7VSFFCe/j/7RxkC3QYyGuP2Zte4szq0t/CRuZG04+YBQmy5Ck= =K3en -END PGP SIGNATURE- https://notmuchmail.org/releases/notmuch-0.38.3.tar.xz.asc (signed by David

Re: user.other_email wildcard config?

2024-03-03 Thread David Bremner
Charles Cazabon writes: > David Bremner wrote: >> Charles Cazabon writes: >> >> > Is there a way to have a wildcard, glob, or regex serve as the >> > configuration for other_email? >> >> [...] the code currently assumes that is a list of literal em

Re: user.other_email wildcard config?

2024-03-03 Thread David Bremner
Charles Cazabon writes: > I've searched the list archives but have only found references to setting > user.other_email to a list of actual addresses. Is there a way to have a > wildcard, glob, or regex serve as the configuration for other_email? Have I > missed something in the documentation?

Re: Individual tag file lines and removing all tags?

2024-02-14 Thread David Bremner
Ralph Seichter 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

Re: Individual tag file lines and removing all tags?

2024-02-14 Thread David Bremner
Ralph Seichter 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

Re: Individual tag file lines and removing all tags?

2024-02-12 Thread David Bremner
Ralph Seichter 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:f...@example.com > > What I am trying to achieve with

Re: [PATCH 1/3] CLI/git: remove unused import

2024-01-16 Thread David Bremner
Jakub Wilk writes: > shutil was used only for the tempfile.TemporaryDirectory backport, > which was removed in commit b7c31f658121a0cf ("CLI/git: drop support for > python < 3.2"). Series applied to master. ___ notmuch mailing list --

Re: Tips re syncing notmuch database and maildir via iCloud?

2024-01-15 Thread David Bremner
HGV writes: > Does anyone have experience syncing the notmuch database or an entire > maildir directory via iCloud? I keep most of my email archive offline > but since iCloud added end-to-end encryption, I've considered syncing my > archived mail and notmuch database via iCloud. But I'm

Re: [BUG] notmuch-search: notmuch search process already running for query

2024-01-11 Thread David Bremner
Sławomir Grochowski writes: > Dear All, > > I just have started using notmuch with Emacs. > > When I run `notmuch-poll-and-refresh-this-buffer` which run script > '.notmuch/hooks/pre-new': > > #!/bin/sh > mbsync -L gmail > > Most of the time it gives me an error & message: > "notmuch-search:

Re: BUG: Python's Message.header fails for empty headers

2024-01-09 Thread David Bremner
Michael J Gruber writes: >> >> I agree the bindings documentation does not make much sense. I suspect >> that the bindings should follow the underlying library and return "" if >> the library does. I don't use the bindings that much, so I am curious >> what others think. > > I might be

Re: BUG: Python's Message.header fails for empty headers

2024-01-08 Thread David Bremner
Vojtěch Káně writes: > At first, this sounds reasonable: the subject is empty, so it is > effectively missing. That would indicate a bug in Lieer itself and would > be fixed by a try-catch block. Notmuch's source for Message.header, > however, states: > >>:returns: The header value, an empty

Re: notmuch show decrypt into mbox format

2023-12-21 Thread David Bremner
Sandra Snan writes: > David Bremner writes: >> By the way, the mailscripts package (elpa-mailscripts on Debian) >> contains some some add-on functions that might reduce the manual >> labour in situations like this. > > That's what I had been using, do they r

Re: notmuch show decrypt into mbox format

2023-12-21 Thread David Bremner
Sandra Snan writes: > Finally saving the patches one by one with w in the Emacs interface to > notmuch gave me patches I could apply. (Just in case someone else > searches the mailing list for the same issue.) By the way, the mailscripts package (elpa-mailscripts on Debian) contains some some

[PATCH] CLI/show: warn if crypto options are used with mbox format

2023-12-21 Thread David Bremner
This limitation seems somewhat hard to fix, but at least try to warn users when combining crypto operations with mbox output format. Because the default is --decrypt=auto, the warning is omitted if --decrypt=auto is specified. While this is not great, it seems more wrong to always warn, or to

Re: notmuch show decrypt into mbox format

2023-12-21 Thread David Bremner
Sandra Snan writes: > David Bremner writes: >> I guess we could add a second code path that parsed and >> decrypted the messages before re-serializing them again. > > Or, as a stop gap measure, a warning when the flags are used > together that mbox doesn't support decr

Re: configure prefix ignored by make install

2023-12-21 Thread David Bremner
Sandra Snan writes: > I did not run configure again, I just went straight to make. I'd think > that after 20 years of using autotools I wouldn't make that mistake > but that's what I found when I scrolled back up the buffer and looked > more carefully. Sounds like it's working for you now. I

Re: notmuch show decrypt into mbox format

2023-12-20 Thread David Bremner
Sandra Snan writes: > This didn't decrypt: > > notmuch show --format=mbox --entire-thread=true --decrypt=true > > The default text format to notmuch show does decrypt the parts just > fine. I wanted the mbox format so I could use it with b4 to extract > patches. Hmm. The code

Re: configure prefix ignored by make install

2023-12-20 Thread David Bremner
Sandra Snan writes: > I used sudo for the install because /tmp/ isn't gonna be my > ultimate destdir and I don't want my own user to own these files, > root should own them. I was planning to use fpm in --dir mode. > Although I didn't get that far because it instead installed into >

Re: configure prefix ignored by make install

2023-12-20 Thread David Bremner
Sandra Snan writes: > I just ran > > ./configure --prefix=/tmp/notmuch > make > sudo make install > > It clobbered /usr/local instead of installing to the prefix. I can't duplicate that on Debian testing with GNU Make. FWIW, it should not be required to use sudo to install into /tmp

Re: [PATCH v5] Add hook inside notmuch-mua-reply

2023-12-19 Thread David Bremner
Sandra Snan writes: > This hook is run after `notmuch reply` has been successfully called > with the headers from the original message. It seems like the commit message should be updated to match the changes in the patch. With my "editor" hat on, it's also a bit ambigous what "with the headers

Re: [PATCH] Add hook inside notmuch-mua-reply

2023-12-11 Thread David Bremner
Tomi Ollila writes: > > another thing what should be the parameters passed, and why. this change > adds (just) message-id but no reasoning (nor documentation) there... > I wonder if we should pass the whole (parsed) original message, for maximum flexibility?

Re: [PATCH] Add hook inside notmuch-mua-reply

2023-12-11 Thread David Bremner
Sandra Snan writes: > +(defvar in-notmuch-mua-reply-functions nil > + "Functions to run after `notmuch-reply' was called successfully > +without erroring. The functions get the message-id as a string > +argument.") > + Overall this looks reasonable to me, but I'm not sure about the name.

Re: [bug] error using company for address (auto)completion

2023-12-11 Thread David Bremner
Giovanni Biscuolo writes: > A previous running generation is using emacs 29.1 with company 0.9.13. > > It seems an incompatibility with company 0.10.2, no? > Seems likely. I have 0.10.0 running OK here. If you are feeling motivated, you could try bisecting between 10.0 and 10.2

Re: [bug] error using company for address (auto)completion

2023-12-10 Thread David Bremner
Giovanni Biscuolo writes: > Hello, > > I recently upgraded my emacs applications, I'm using Guix as package > manager on Debian. > What versions of emacs and company are you using? ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe

Re: potential fix for wrong error message

2023-12-06 Thread David Bremner
Alyssa Ross writes: > David Bremner writes: > >> Hi Alyssa >> >> I'm not sure if this is a fix for your bug, but it is a fix for a >> very similar bug. > > This is a fix for my bug, thanks a lot! > > Tested-by: Alyssa Ross Applied to release and maste

Re: Advanced search with wildcard using notmuch for mutt

2023-12-04 Thread David Bremner
Olly Betts writes: > The development version of Xapian supports both `*` and `?` glob-style > wildcards in any position. > > You can enable them for the QueryParser using FLAG_WILDCARD_MULTI, > FLAG_WILDCARD_SINGLE or FLAG_WILDCARD_GLOB (the last one is just the > first two combined). I see

Re: Advanced search with wildcard using notmuch for mutt

2023-12-04 Thread David Bremner
io writes: > what xapian 'indexing system' did was to index the entire sentence > 'xxx_yyy' and you will not be able to find any sentence which contain > the word 'yyy'? I'm curious that you refer to xxx_yyy as a sentence. In the contexts I am familiar with, the point of _ is to join things

[PATCH 1/2] test: add known broken test for incorrect error message

2023-12-03 Thread David Bremner
Duplicate bug reported in id:87wmtvcor5@alyssa.is The error message is nonsense, because notmuch config list actually includes the database in those two cases. --- test/T055-path-config.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/T055-path-config.sh

potential fix for wrong error message

2023-12-03 Thread David Bremner
Hi Alyssa I'm not sure if this is a fix for your bug, but it is a fix for a very similar bug. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

[PATCH 2/2] lib: clear error message on success in _choose_database_path

2023-12-03 Thread David Bremner
Previously we both found a database and returned a message saying that the database could not be found (along with a success code). This change should prevent spurious error output. --- lib/open.cc | 5 + test/T055-path-config.sh | 1 - 2 files changed, 5 insertions(+), 1

Re: [BUG] "Error: Cannot open database…" when loading config

2023-12-03 Thread David Bremner
Alyssa Ross writes: > Since commit 1c10d91d ("Pass error message from GLib ini parser to CLI"), > when I run "notmuch config list", I get this error message at the start > of the output: > > Error: Cannot open database at /home/qyliss/state/notmuch/default: No > such file or directory. >

Re: Inconsistency in quoting probabilistic prefixes?

2023-12-03 Thread David Bremner
"artur.brzozowski" writes: > Hey, > > Trying to add List matching to my notmuch tagging and I found > something that surprises me. Namely, This is a duplicate message, my fault, I saw it in the moderation queue, didn't realize it already went to the list. d

Re: Inconsistency in quoting probabilistic prefixes?

2023-12-02 Thread David Bremner
"artur.brzozowski" writes: > Hi! > > Trying to add List matching to my notmuch tagging and I found > something that surprises me. Namely, > > 1) when I want to match a bunch of alternatives for > prefix, I have to quote the parenthesis to get the results: > > $ notmuch search

Re: [PATCH] notmuch-emacs-mua: avoid extra separators at the end of the line

2023-12-01 Thread David Bremner
Jani Nikula writes: > Currently the --to/--cc/--bcc options add "u...@example.com, " to the > message headers, with the the unnecessary ", " separator after the > last address, regardless of how many addresses are being added. > > This used to be fine, but with recent emacs mm, trying to send

notmuch release 0.38.2 now available

2023-12-01 Thread David Bremner
-END PGP SIGNATURE- https://notmuchmail.org/releases/notmuch-0.38.2.tar.xz.asc (signed by David Bremner) What's new in notmuch 0.38.2 = Library --- Make sorting of string maps lexicographic on (key,value) pairs. This avoids some test failures due

Re: Advanced search with wildcard using notmuch for mutt

2023-11-30 Thread David Bremner
Michael J Gruber writes: > Using xapian commands, one could extract all stems and grep those for a > term which one "remembers partially" (often happened to me), and then feed > that into notmuch. Might be worthwhile scripting or even integrating into > notmuch (sexp?). The words are stored

Re: [PATCH] lib/string_map: simulate stable sorting

2023-11-28 Thread David Bremner
Tomi Ollila writes: > On Sat, Nov 25 2023, David Bremner wrote: > >> qsort(3) does not promise stability, and recent versions of glibc have >> been showing more unstable behaviour [2]. Michael Gruber observed [1] test >> breakage due to changing output order for mess

Re: macOS and go language bindings

2023-11-26 Thread David Bremner
Reto writes: [thanks for the explanation of how aerc uses notmuch] > > Go will execute a C compiler / linker as usual. > In your case, you basically need to setup 2 things: > > 1) notmuch.h in some include dir, normally /usr/include/notmuch.h or > some such, > which is needed by

[PATCH] lib/string_map: simulate stable sorting

2023-11-25 Thread David Bremner
qsort(3) does not promise stability, and recent versions of glibc have been showing more unstable behaviour [2]. Michael Gruber observed [1] test breakage due to changing output order for message properties. We provide a sorting order of (key,value) pairs that _looks_ stable by breaking ties

Re: T610 failing on Fedora rawhide

2023-11-24 Thread David Bremner
Michael J Gruber writes: > Hi there, > > during my first tests for Python 3.13 (hooray...) I noticed that some tests > in T610 started to fail independent of that. It seems that with notmuch > 0.38.1 on current Fedora rawhide, `notmuch_message_get_properties()` > returns properties in a

Re: T610 failing on Fedora rawhide

2023-11-24 Thread David Bremner
David Bremner writes: > Michael J Gruber writes: > >> during my first tests for Python 3.13 (hooray...) I noticed that some tests >> in T610 started to fail independent of that. It seems that with notmuch >> 0.38.1 on current Fedora rawhide, `notmuch_message_get_

Re: T610 failing on Fedora rawhide

2023-11-24 Thread David Bremner
Michael J Gruber writes: > during my first tests for Python 3.13 (hooray...) I noticed that some tests > in T610 started to fail independent of that. It seems that with notmuch > 0.38.1 on current Fedora rawhide, `notmuch_message_get_properties()` > returns properties in a different order,

Re: [PATCH 26/27] emacs: avoid binding unnamed commands in keymaps

2023-10-29 Thread David Bremner
Ryan Tate writes: > Jonas Bernoulli writes: > >> - -(defun notmuch-tree-close-message-pane-and (func) - "Close >> message pane and execute FUNC. > > I am confused why a function used in config files and documented > on the notmuch website (to this moment) as an example of how to >

notmuch release 0.38.1 now available

2023-10-26 Thread David Bremner
-END PGP SIGNATURE- https://notmuchmail.org/releases/notmuch-0.38.1.tar.xz.asc (signed by David Bremner) What's new in notmuch 0.38.1 = CLI --- Report parse errors in config files. Emacs - Fix image toggling for Emacs >= 29.1. notmuch-m

Re: [PATCH] notmuch-mutt: fix Perl syntax of hash index lookups

2023-10-12 Thread David Bremner
Paul Wise writes: > Fixes: commit 239fdbbbf0cbd6cd6ebafb87e88cdb3cded75364 > --- > contrib/notmuch-mutt/notmuch-mutt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/notmuch-mutt/notmuch-mutt > b/contrib/notmuch-mutt/notmuch-mutt > index 1ac68065..b81252c8

[PATCH 4/4] emacs/mua: change name of ignored parameter

2023-10-06 Thread David Bremner
Suppress compiler warning. --- emacs/notmuch-mua.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 3679d7d7..e4b7e9d1 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -403,7 +403,7 @@ instead of `message-mode'

[PATCH 3/4] emacs/address: rewrite docstring for n-a-selection-function

2023-10-06 Thread David Bremner
The previous version essentially repeated the source code, and generated a compiler warning. --- emacs/notmuch-address.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 1a4cdda2..f756254c 100644 ---

[PATCH 2/4] emacs: wrap docstrings

2023-10-06 Thread David Bremner
Suppress byte-compiler warnings about >80 character docstrings. --- emacs/notmuch-hello.el | 23 ++- emacs/notmuch-show.el | 19 --- emacs/notmuch-tree.el | 9 ++--- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/emacs/notmuch-hello.el

[PATCH 1/4] emacs: update quoting in docstrings

2023-10-06 Thread David Bremner
The complicated looking escapes are needed to avoid compile time warnings. (info "(elisp) Text Quoting Style") for details. --- emacs/notmuch-hello.el | 2 +- emacs/notmuch-lib.el| 6 +++--- emacs/notmuch-parser.el | 8 emacs/notmuch-print.el | 4 ++-- emacs/notmuch-tag.el

partial cleanup of warnings from byte compilation

2023-10-06 Thread David Bremner
This is almost all docstring formatting, except for the last patch. This is really just some low hanging fruit, but presumable eliminating some warnings is better than nothing. The warnings are more annoying now that native compilation exposes them to every user.

Re: v2 Image toggle fixes for emacs 29.1

2023-10-01 Thread David Bremner
Michael J Gruber writes: > Am So., 1. Okt. 2023 um 13:13 Uhr schrieb David Bremner : >> >> I have applied this series to release and master (and uploaded a >> pre-release for 0.38.1) > > Is "pre" the new "rc", or how is this supposed to sort? &

Re: v2 Image toggle fixes for emacs 29.1

2023-10-01 Thread David Bremner
David Bremner writes: > This obsoletes the series > > id:20230916235137.334886-2-da...@tethera.net > > The update consists of the following bugfix: > I have applied this series to release and master (and uploaded a pre-rele

Re: Change duplicate priority?

2023-09-30 Thread David Bremner
Jesse Rosenthal writes: > > Depending on how long the scan takes, getmail might pull down both of > these emails. The second duplicate is available through the emacs change > index command, but the attachment is not available (since it tries to > pull the first attachment from the first version,

[PATCH] perf-test/tag: add maildir sync tests

2023-09-30 Thread David Bremner
Today someone asked me the (reasonable) question of how much performance impact there is from synching tags to maildir flags. It turns out it is noticeable, about a 50% overhead compared to non-synched tags (according to these tests). In practice I don't know if it's a big problem for users,

Re: Fixed Message-ID trouble

2023-09-27 Thread David Bremner
Teemu Likonen writes: > Some person on debian-user mailing list seems to be sending messages > with fixed Message-ID field: the same ID in different messages. In > Notmuch it is creating trouble because it connects unrelated threads to > one. The person has different messages in different

Re: Fixed Message-ID trouble

2023-09-26 Thread David Bremner
Teemu Likonen writes: > Will Notmuch also break the thread so that this edited message will > start a new thread? Maybe the message itself but its follow-ups need to > be fixed too. Often "References" points several earlier messages in the > chain. So, to detach a subthread from bigger thread

Re: Fixed Message-ID trouble

2023-09-26 Thread David Bremner
Alexander Adolf writes: > > Bearing in mind that re-recognising a message which has arrived > multiple times via different routes is a worthwhile feature, it would > seem to me that a hash over the invariant part of the message, that is > the body, would allow for such detection. In that light,

Re: Fixed Message-ID trouble

2023-09-26 Thread David Bremner
Teemu Likonen writes: > * 2023-09-25 07:33:23-0400, Daniel Corbe wrote: > >> Silly question, I know, but have you actually tried reaching out to >> the user? > > Not silly, but I don't even know who the person is. All I see is the > mess, and everything else is my interpretation of the cause.

Re: The unread tag is being swallowed on PGP-signed messages

2023-09-24 Thread David Bremner
Daniel Corbe writes: > Hey All, > > I’m currently running notmuch 0.38 on Mac OS installed via brew: I can duplicate this behaviour running 0.38 on Debian. > When running notmuch new, the unread tag is being swallowed up by the signed > tag on messages that have been PGP-signed: > > ❯ notmuch

[PATCH v2 4/4] emacs/show: special case toggling display of images

2023-09-24 Thread David Bremner
According to emacs upstream [1], we can't expect overlay invisibility and images to get along. This commit uses the previously stashed undisplayer functions to actually remove the images from the buffer. When the image is toggled, it is essentially redisplayed from scratch, using the previously

[PATCH v2 3/4] emacs: save image redisplay data during non-lazy display

2023-09-24 Thread David Bremner
This data will eventually be used to redisplay hidden images. A certain amount of refactoring is done here to avoid code duplication. --- emacs/notmuch-show.el | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH v2 1/4] emacs: save undisplayer function for MIME parts

2023-09-24 Thread David Bremner
For some kinds of MIME parts (at least images), our trickery with overlays will not work, so save the more drastic function created by Gnus that actually deletes the part from the buffer. In an ideal world we would return this function as (part of) a value, but here the call stack is too

v2 Image toggle fixes for emacs 29.1

2023-09-24 Thread David Bremner
This obsoletes the series id:20230916235137.334886-2-da...@tethera.net The update consists of the following bugfix: diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 7a4b489d..4cc5aa57 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1036,7 +1036,7 @@ will

[PATCH v2 2/4] emacs/show: save redisplay redisplay data when showing lazy part.

2023-09-24 Thread David Bremner
This data will be used to redisplay an image that is hidden by deleting it from the buffer. We cannot easily delay until the image is hidden, as we won't have the original data at that point. --- emacs/notmuch-show.el | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH] NEWS: add NEWS item for config error reporting.

2023-09-23 Thread David Bremner
As well as the immediate change, give a bit of the backround on upcoming breaking changes from GLib. --- NEWS | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 34bdfca2..407aded9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,15 @@ Notmuch 0.38.1 (UNRELEASED)

Re: Report GLib errors

2023-09-23 Thread David Bremner
David Bremner writes: > This series obsoletes the WIP series [0]. I think it's probably worth > doing a point release with this fix as it is not too intrusive, and > upcoming GLib releases will likely cause more users to experience the > problems Eric found [1].

Re: automatically changing FCC when From changes (or fill FCC only when sending)

2023-09-22 Thread David Bremner
David Bremner writes: > > Another option that seems technically feasible, but would involve some > elisp programming, would be to write a command that re-applies the > calculation of Fcc from From that already exists, and run that manually > or perhaps opt-in to running it automa

Re: automatically changing FCC when From changes (or fill FCC only when sending)

2023-09-22 Thread David Bremner
David Pinto writes: > > I see what you mean, how changing the FCC would prevent the ability to > manually edit the FCC. But what about updating the FCC when the > "From" changes? I don't know how to efficiently detect changes to From. (notmuch-)message-mode is essentially a text editor buffer,

[PATCH] CLI: update commentary in config file to better match code

2023-09-21 Thread David Bremner
This comment has been out of date since notmuch 0.32. Although it isn't really possible to explain all the options here, explain both one new "split" way of doing things and the traditional one with database inside $MAIL_ROOT/.notmuch. --- notmuch-config.c| 12

Re: [PATCH v2 1/2] test: showcase thread-unsafe s-expression query parser

2023-09-19 Thread David Bremner
Kevin Boulain writes: > The test fails reliably when Notmuch is compiled as such: > ./configure > make CFLAGS=-fsanitize=thread LDFLAGS=-fsanitize=thread > It's still unclear how the test suite could be run with the correct > compilation flags. At the moment I can think of 3 options: 1)

Re: [PATCH] .gitignore: ignore __pycache__

2023-09-19 Thread David Bremner
Eric Blake writes: > Python likes to leave behind cache files; noticeable when doing an > in-tree build. Applied to master. BTW, "make distclean" should now clean up those cache directories; I think it did not when you sent in the patch. ___ notmuch

Re: [PATCH] NEWS: NEWS for 0.38

2023-09-19 Thread David Bremner
David Bremner writes: > --- > I did my best to reconstruct the changes since 0.37. Let me know any > suggested corrections or updates in the next few days. > this (or something very close) has now been released as part of 0.38 ___

Re: [PATCH] devel/nmweb: read mail files in binary mode.

2023-09-18 Thread David Bremner
Tomi Ollila writes: > > Looks good to me. I've been experiencing "text" mode defaulting to 'ascii' > (and had to include encoding='utf-8') lately. Another problem one may > encounter when there are \r chars in the file, text mode may remove those > (In the same case I had a file using '\r\r' as

[PATCH 1/4] emacs: save undisplayer function for MIME parts

2023-09-16 Thread David Bremner
For some kinds of MIME parts (at least images), our trickery with overlays will not work, so save the more drastic function created by Gnus that actually deletes the part from the buffer. In an ideal world we would return this function as (part of) a value, but here the call stack is too

[PATCH 4/4] emacs/show: special case toggling display of images

2023-09-16 Thread David Bremner
According to emacs upstream [1], we can't expect overlay invisibility and images to get along. This commit uses the previously stashed undisplayer functions to actually remove the images from the buffer. When the image is toggled, it is essentially redisplayed from scratch, using the previously

[PATCH 3/4] emacs: save image redisplay data during non-lazy display

2023-09-16 Thread David Bremner
This data will eventually be used to redisplay hidden images. A certain amount of refactoring is done here to avoid code duplication. --- emacs/notmuch-show.el | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH 2/4] emacs/show: save redisplay redisplay data when showing lazy part.

2023-09-16 Thread David Bremner
This data will be used to redisplay an image that is hidden by deleting it from the buffer. We cannot easily delay until the image is hidden, as we won't have the original data at that point. --- emacs/notmuch-show.el | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Fix image toggling for emacs 29.1

2023-09-16 Thread David Bremner
This obsoletes the WIP patch at id:20230903114215.60583-1-da...@tethera.net The main changes are breaking the patch up into more managable pieces, and only saving redisplay data for images. I am more or less satisfied with the performance impact of this change. I ran the following test

Re: automatically changing FCC when From changes (or fill FCC only when sending)

2023-09-16 Thread David Bremner
David Pinto writes: > > My case is that I have multiple email accounts and want the sent > messages saved on different directories based on the "From" address. > I've setup 'notmuch-fcc-dirs' accordingly. Now, when I start > composing a message (notmuch-user-agent), the FCC header is set to >

[PATCH] devel/nmweb: read mail files in binary mode.

2023-09-16 Thread David Bremner
"ju" reported on IRC that browsing https://nmbug.notmuchmail.org/nmweb/show/20160719094205.qmf5sjnja6crt5t3%40gotlib crashed. The underlying issue is that python3 defaults to utf8 decoding files unless they are opened in binary mode. The file in question (in the nmbug archive; it depends a

Re: tagging threads

2023-09-15 Thread David Bremner
Jon Fineman writes: > I have followed this guide to tag a message/thread for deletion that a > shell script will then delete. > Just for the record, "k d" will add the "deleted" tag by default in search, tree and show mode > > However an unwanted

[PATCH 4/4] Pass error message from GLib ini parser to CLI

2023-09-15 Thread David Bremner
The function _notmuch_config_load_from_file is only called in two places in open.cc. Update internal API to match the idiom in open.cc. Adding a newline is needed for consistency with other status strings. Based in part on a patch [1] from Eric Blake. [1]:

[PATCH 3/4] test: add known broken subtest for the bad config error message

2023-09-15 Thread David Bremner
This is a bit fragile w.r.t. glib changing their error message, but it already helped me find one formatting bug, so for now I think it's worth it, instead of just grepping for "UTF-8". --- test/T030-config.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T030-config.sh

[PATCH 1/4] test: add known broken test for bad utf8 in config

2023-09-15 Thread David Bremner
We should ideally print an informative error message, but at the very least we should not exit with success. --- test/T030-config.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T030-config.sh b/test/T030-config.sh index ea0b4012..6ef759a4 100755 --- a/test/T030-config.sh +++

[PATCH 2/4] CLI: exit with error when load_config returns an error.

2023-09-15 Thread David Bremner
For now print a generic error message and exit with error on any non-success code. Previously we were exiting, but with exit code zero, leading users / scripts to thing the command had succeeded. --- notmuch.c | 2 ++ test/T030-config.sh | 1 - 2 files changed, 2 insertions(+), 1

Report GLib errors

2023-09-15 Thread David Bremner
This series obsoletes the WIP series [0]. I think it's probably worth doing a point release with this fix as it is not too intrusive, and upcoming GLib releases will likely cause more users to experience the problems Eric found [1]. [0]: id:20230913005636.135665-1-da...@tethera.net [1]:

[PATCH 3/3] WIP: print error message from glib ini parser

2023-09-12 Thread David Bremner
--- lib/config.cc | 7 ++- lib/open.cc | 4 notmuch.c | 6 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/config.cc b/lib/config.cc index 2323860d..11afb785 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -435,6 +435,7 @@ _notmuch_config_load_from_file

[PATCH 2/3] CLI: exit with error when load_config returns and error.

2023-09-12 Thread David Bremner
--- notmuch.c | 2 ++ test/T030-config.sh | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/notmuch.c b/notmuch.c index 37286b8f..43554530 100644 --- a/notmuch.c +++ b/notmuch.c @@ -584,6 +584,8 @@ main (int argc, char *argv[]) case NOTMUCH_STATUS_SUCCESS:

  1   2   3   4   5   6   7   8   9   10   >