Commit graph

7600 commits

Author SHA1 Message Date
len@realtimegenomics.com
d5ab2f0c02 emacs: fix disabling notmuch-show-header-line via custom
The defcustom had a typo that prevented it from working as intended.
2025-03-20 07:08:42 -03:00
David Bremner
eaf3cd10db doc/python: correct wording around container complexity.
Based on a suggestion from Jakub Wilk.
2025-03-18 09:15:16 -03:00
David Bremner
14f7a8929a debian: drop patches
Those changes are now directly in git.
2025-03-15 19:45:14 -03:00
David Bremner
6593271272 Merge branch 'debian/unstable' into release
merge bugfix uploads from other branch
2025-03-15 19:44:37 -03:00
David Bremner
a5214eabb6 NEWS: set release date 2025-03-15 19:04:35 -03:00
David Bremner
8fdb713d2f debian: changelog stanza for 0.39-1 2025-03-15 14:21:28 -03:00
David Bremner
dea40c9dd6 version: bump to 0.39
Identical to 0.39~rc3, except for release related
documentation (e.g. NEWS).
2025-03-15 14:21:28 -03:00
David Bremner
e916fbd846 NEWS: news for 0.39
This is based on my reading of git shortlog. Some more development
specific changes have been omitted.
2025-03-15 14:21:12 -03:00
David Bremner
fd32351ce0 debian: changelog for 0.39~rc3-1 2025-03-14 19:07:38 -03:00
David Bremner
9762b4cc6e version: bump to 0.39~rc3 2025-03-14 19:06:12 -03:00
Stefan Kangas
df4c1b5be7 Set 'untrusted-content' to t in all modes
Instead of trying to guess in which modes this is safe not to set in,
let's just set it in all of them.

Background (added by db):

untrusted-content was added in Emacs 29.3 and is currently set by Gnus
and used by org-mode to prevent certain unsafe operations. I think the
intent is to use it for blocking more unsafe operations in the future.
2025-03-14 08:51:02 -03:00
Michael J Gruber
5802f5d626 bindings/python-cffi: fix docstring for message.header()
The cffi bindings raise a LookupError in case a header is not present.
Adjust the docstring to say so.

The legacy bindings behaved differently, and this is one of the things
to be aware of when migrating to the cffi bindings.
2025-03-13 21:18:15 -03:00
Daniel Kahn Gillmor
537d225e2f Debian build-deps: include emacs-pgtk in conjunction
Debian developers with the pure GTK+ variant of emacs (which does not
support X11 at all, as it builds entirely against the GTK Wayland
backend) should also be able to treat the build-dependencies as
satisfied.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-03-13 21:05:18 -03:00
David Bremner
d4e36a2df6 emacs/tree: add call to notmuch-hl-line-mode from process-filter
This removes the visual gap/stutter between when the screen fills and
when the hl-line "cursor" is drawn.  It is not obviously how to
robustly test this, since it the observable effect is purely a matter
of timing.
2025-03-13 07:56:05 -03:00
David Bremner
41d5e5956e emacs/tree: call notmuch-hl-line-mode from tree-sentinel
There is a a perceptible gap between when the tree shows up and when
the hl-line is visible, but this is better than the previous state
where the line did not show up at all until the user moved the cursor.
2025-03-13 07:56:05 -03:00
David Bremner
43e90e7caa emacs/tree: condition hl-line-mode on notmuch-hl-line
It isn't clear that this call to hl-line-mode will survive the coming
re-organization to stop relying on hooks, but incrementally this at
least makes the disabling behaviour consistent.
2025-03-13 07:55:21 -03:00
David Bremner
5cb06b1893 emacs: replace use of hook to draw hl-line in search mode
In the thread at id:87fsfuuxwn.fsf@thinkbox, a bug is discussed where
the point and hl-line overlay get out of sync, leading the user to
open the wrong message. As far as I can tell this is caused by
notmuch-hl-mode being invoked too early.

This change bypasses the logic preventing notmuch-search-hook being
called only once, so that the overlay is updated later after the
buffer is full(er).

This change may lead to the overlay being updated multiple times; if
this is annoying we can add a similar buffer local variable to ensure
it is only called once.

The extra logic to check notmuch-search-target-line reduces the
flicker somewhat by not highlighting the first line every time.
2025-03-13 07:48:53 -03:00
David Bremner
eb48d78758 test/emacs: add tests for hl-line-mode integration
Most of the known broken tests replicate (my intepretation of) the bug
reported at id:87fsfuuxwn.fsf@thinkbox (or some unreported, but
probably related bugs in tree/unthreaded view). The last 3 broken
tests are just unimplimented planned functionality.
2025-03-13 07:18:07 -03:00
David Bremner
b5ba3ff5ef emacs: add defcustom to control hl-line mode
Currently the presence of hl-line highlighting is controlled
implicitely by hooks. In future commits it will be migrated to use
this variable.
2025-03-13 07:18:07 -03:00
David Bremner
e056e17270 debian: increase test timeout to 10m
Workaround for slow riscv64 autobuilders.
2025-03-11 19:40:12 -03:00
David Bremner
8075eff3f6 debian: changelog for 0.39~rc2-1 2025-03-11 06:12:45 -03:00
David Bremner
b21098237a version: bump to 0.39~rc2 2025-03-11 06:12:45 -03:00
Johannes Larsen
e8261872dc ruby: fix "undefining the allocator of T_DATA" warnings
Ruby 3.2 introduced a warning when C-extensions use structs without
redefining the allocation default allocation routine meant for objects.
See https://bugs.ruby-lang.org/issues/18007 for details.

In the Ruby bindings this happens at `Data_Wrap_Notmuch_Object` call
sites, so the object types used there needed to update their allocation.

This ruby code (given a database at the hardcoded path with messages
matching `tag:tmp`) exercise all the ruby objects:

    require 'notmuch'
    Notmuch::Database.open File.expand_path("~/mail") do |db|
      db.get_directory("/tmp")
      db.query("tag:tmp").search_threads.each do |t|
        t.messages.each do |m|
          puts m.header("Subject")
        end
      end
    end

Before these changes with ruby 3.2.5 and notmuch 0.38.3 it outputs:

    notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Query
    notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Threads
    notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Thread
    notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Messages
    notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Message
    notmuch release 0.38.3 now available

(the last line is the message I tagged with tmp), and after the changes:

    notmuch release 0.38.3 now available
2025-03-08 10:39:22 -04:00
Michael J Gruber
53cbb6d0cb docs: avoid nmbug in notmuch-git.1
These days, `nmbug` is `notmuch-git` with special defaults, so avoid the
term `nmbug` in the doc when we talk about `notmuch-git` in general.

Also, spell git in lower case (as we do for notmuch) except for the one
case where we name the beast.
2025-03-01 07:42:57 -05:00
David Bremner
9c76731118 changelog for 0.38.3-5 2025-02-28 16:25:10 -05:00
David Bremner
e1b27f57c8 Commit Debian 3.0 (quilt) metadata
[dgit (12.6) quilt-fixup]
2025-02-28 16:18:48 -05:00
Daniel Kahn Gillmor
c8fe080925 Accept "key-missing" from a signature from a revoked key
We have traditionally expected a signature to show up as "revoked"
when the signing key is revoked.  However, GnuPG's recent fix to avoid
a denial of service against legitimate signatures appears to have
changed the status of signature verification from keys which happen to
have been revoked.

See https://bugs.debian.org/1098995 and https://dev.gnupg.org/T7547

This change makes the test suite a little bit less brittle while we
look for a resolution from upstream.  It should probably also be
backported to debian unstable unless a notmuch release to unstable is
imminent.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
(cherry picked from commit d330971b8b)
2025-02-28 16:18:28 -05:00
Daniel Kahn Gillmor
d330971b8b Accept "key-missing" from a signature from a revoked key
We have traditionally expected a signature to show up as "revoked"
when the signing key is revoked.  However, GnuPG's recent fix to avoid
a denial of service against legitimate signatures appears to have
changed the status of signature verification from keys which happen to
have been revoked.

See https://bugs.debian.org/1098995 and https://dev.gnupg.org/T7547

This change makes the test suite a little bit less brittle while we
look for a resolution from upstream.  It should probably also be
backported to debian unstable unless a notmuch release to unstable is
imminent.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-28 15:32:36 -05:00
Floris Bruynooghe
ed29a9c37e python: Fix message ID docstring
The messageidb attribute does not exist.  The returned BinString type
already allows use as both strings and binary.  Presumably this was
written before that type was adopted.
2025-02-28 11:31:55 -04:00
David Bremner
9e79f5562e Commit Debian 3.0 (quilt) metadata
[dgit (12.6) quilt-fixup]
2025-02-25 16:53:26 -04:00
David Bremner
9cac62d22b debian: changelog for 0.38.3-4 2025-02-25 16:52:45 -04:00
David Bremner
0c8dc3922f test/emacs: add workaround for Emacs 30 pp changes
This relies on the fact that setting pp-default-function has no effect
for Emacs <30.

(cherry picked from commit e3d4721b1b)
2025-02-25 16:51:00 -04:00
David Bremner
4540090443 debian: upload to experimental instead of unstable 2025-02-25 16:35:44 -04:00
David Bremner
d156c253f3 version: bump to 0.39~rc1 2025-02-25 16:15:24 -04:00
David Bremner
ecff105e86 debian: changelog stanza for 0.39~rc1-1 2025-02-25 16:11:07 -04:00
David Bremner
e3d4721b1b test/emacs: add workaround for Emacs 30 pp changes
This relies on the fact that setting pp-default-function has no effect
for Emacs <30.
2025-02-25 07:25:59 -04:00
Xiyue Deng
e9da6780e3 Consolidate duplicated dpkg-dev requirements
* Keep dpkg-dev (>= 1.22.5) which is added for t64 transition.
2025-02-22 09:06:03 -04:00
David Bremner
412c365149 debian: changelog for 0.39~rc0-1
Close a few Debian bugs.
2025-02-22 08:13:03 -04:00
David Bremner
cd0269695d version: bump to 0.39~rc0
Normally this would be done as part of the release process, rather
than committed intially to master, but in this case I want to test the
change to python bindings version handling in the previous commit.
2025-02-22 07:21:12 -04:00
David Bremner
8bc1fccbf9 bindings/python: strip ~ from python version
Inspired by a suggestion of Xiyue Deng, this change ensures that
the python bindings have a version that recent setuptools is happy
with.

This will have the unfortunate side effect of the python view of the
version number differing from the rest of notmuch for the
pre-releases. The alternative would be to transform the version
numbers for the Debian packages for the pre-releases, as there is now
no version scheme that works for both, since setuptools started
rejecting versions with "~" in them.  If we decide to go the latter
way in the future, this change is easy to revert.
2025-02-22 07:10:13 -04:00
David Bremner
84e53f7022 build: remove handling for legacy python bindings version
The legacy python bindings are no longer built.
2025-02-22 07:07:46 -04:00
David Bremner
d526797ad1 python: move legacy python bindings to contrib.
This forces us to verify the build and test suite completes without
the legacy python bindings.

As of this commit the legacy python bindings are unsupported by
notmuch. They are provided in contrib/ for now, but will most likely
eventually be removed from there as well. We recommend that
downstream/distro packagers phase out their packages for the legacy
python bindings.
2025-02-22 07:01:47 -04:00
David Bremner
9782c86511 python: fix documentation typo
The method is actually called 'getall'.
2025-02-22 06:59:48 -04:00
David Bremner
58ea60c2e4 test/message-property: convert python tests from legacy bindings
One test is deleted since that method is not provided by the new
bindings. Similar things can be done by accessing the PropertiesMap
returned by properties.

This change is a prelude to removing the legacy bindings from the build.
2025-02-22 06:59:48 -04:00
David Bremner
145be20b0d test/count: convert library test from python to C
The new python bindings do not support modifying query objects, so
convert to C. There is a bit more boilerplate to handle errors but
otherwise it is essentially a line by line translation.
2025-02-22 06:59:48 -04:00
David Bremner
a0418f1b53 test: drop tests for legacy python bindings
This is a prelude to removing the legacy bindings from the build.
2025-02-22 06:59:48 -04:00
David Bremner
10f522d371 debian: stop packaging legacy python bindings.
This is in preparation for moving them to contrib and dropping them
from the test suite upstream.
2025-02-22 06:59:48 -04:00
Damien Cassou
0e10ca3a62 notmuch-show-imenu-prev-index-position-function: Don't recenter
The previous version of
notmuch-show-imenu-prev-index-position-function was calling
notmuch-show-previous-message which was recentering the window. This
is a problem when which-func-mode is active because which-func-mode is
called each time the user moves point around.

Because this function is only meant to be executed by imenu, there is
no reason to recenter the window. For the same reason, the new
implementation doesn't have to follow strictly how
notmuch-show-previous-message is implemented because imenu only places
point at very specific locations before calling
notmuch-show-imenu-prev-index-position-function.
2025-02-18 08:54:36 -04:00
Lars Kotthoff
9c1f6cf746 fix segfaults in Python cFFI API and add tests
Several iterators in the Python cFFI API destroyed the objects they iterated
over too early (when the iterator was exhausted), causing subsequent segfaults
in common cases like creating a list from the iterator. This patch fixes the
segfaults and add tests to ensure that they don't happen again.
2025-02-07 12:13:16 -04:00
David Bremner
409ad6b2a8 Revert "bump versions to 0.39~rc0"
This reverts commit deea909993.
2025-01-26 11:30:28 -04:00