| Age | Commit message (Collapse) | Author |
|
When showing an email using notmuch-show-mode, set the mode
"notmuch-show-mode" before using "pop-to-buffer-same-window", to be
able to match on the major-mode with an entry in "display-buffer-alist".
Using the major mode is the the only mean to set display rules,
because the buffer title is set to the title of the email and is not fixed.
Signed-off-by: Aurelien Rouene <aurelien@rouene.fr>
|
|
Use `when-let*' instead of `when-let'. Use quoted
`font-lock-warning-face' instead of obsolete variable.
|
|
Previously, when composing email replies with `notmuch-mua-new-mail',
the email signature would always be placed below the email citation.
However, there are two message.el user options that affect the
position of the signature and email body:
`message-cite-reply-position` and `message-cite-style-gmail'.
Previously, neither of these user options were respected.
Respect these user options. If `message-cite-reply-position' is
'traditional or 'below, place the email signature below the citation
(the previous behavior is retained). If `message-cite-reply-position'
is 'above, place the email signature above the citation (like in
Gmail-style email replies).
`message-cite-style-gmail' may specify a value for
`message-cite-reply-position'. If it does, that value takes precedence
over `message-cite-reply-position'.
|
|
`notmuch-tree-filter-by-tag' and `notmuch-search-filter-by-tag' are
described, in their docstrings, as matching all the messages in the
current view that are ALSO tagged by a given tag. However, since the
current view's search query was not logically grouped together (with
parentheses), the actual behavior was different for sufficiently
complex search queries.
Fix this by grouping the current view's search query in parentheses
first.
|
|
In the search box (and recent searches), notmuch-search-hide-excluded
was not being passed to notmuch-search. This means that excluded
messages were always shown in the results. Fix this by passing the
extra argument.
|
|
Previously when installed with 'make install', autoloads in sources
were not scraped. So users still had to load the full library
beforehand in order to use Notmuch.
Now we generate and install such a file for 'make install-emacs'. With
this change, users can replace in their Emacs configuration:
(require 'notmuch)
with a much cheaper:
(require 'notmuch-autoloads)
but are still able to use 'M-x notmuch'.
Note that this new file is not included in the 'make elpa' package, so
it does not break for those users, who have already been enjoying
autoloads generated by 'package.el'.
Besides, this should not break packaging for most distros. Even if
they have generated and maintained such a file using their package
managers, Emacs does not choke on an existing output file when
scraping autoloads.
Re: thread starting at id:87o75yl4u5.fsf@pengjiz.com
Amended-By: db; add comment about autoload-excludes
|
|
This makes derived-mode matching in display-buffer-alist work.
|
|
The defcustom had a typo that prevented it from working as intended.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Currently the presence of hl-line highlighting is controlled
implicitely by hooks. In future commits it will be migrated to use
this variable.
|
|
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.
|
|
This is a follow-up to [1: 8d06dfce]. Per Info node '(elisp)Autoload',
autoload cookies should start with ';;;###'.
1: 2024-04-04 8d06dfce175593aebae9a759c9167df4988a3444
emacs: Autoload notmuch-user-agent related functions
|
|
This reverts commit bc989209171d406b3671024542e59b86b0ecb23d.
This was applied unintentionally to master while still under discussion.
|
|
This fixes the bug reported in
id:6F2EF901-8B4B-44FF-83C5-22F732BA95A6@gmail.com
Unfortunately it turns out our test data has several tabs in the
subject lines. The expected output was updated to reflect their
removal and the ripple effect of several more subjects matching the
previous ones.
|
|
REPRODUCTION STEPS:
(let ((notmuch-saved-searches
(list (list :name "Emacs List"
:query "query:lists-emacs")
(list :name "All Lists"
:query "query:lists"))))
(notmuch-search-buffer-title "query:lists-emacs" ))
ACTUAL:
"*notmuch-saved-search-[ All Lists ]-emacs*"
EXPECTED:
"*notmuch-saved-search-Emacs List*"
|
|
This works much like notmuch-mua-attachment-regexp, but for the
subject instead. By default, check for empty subjects, as that seems a
reasonable thing to safeguard against.
|
|
According to the now deleted commentary, the hack of using run-at-time
was needed for Emacs 24. It seems to be no longer needed for Emacs
28.2, and removing it makes further changes to the code simpler.
|
|
37c022ae ("Use `without-restriction` in `with-temporary-notmuch-message-buffer`", 2024-03-14)
introduced a fix for draft saving in a way which is supported on Emacs
29 and above only. Replace this with a construct which we have used
before, so that we keep the same compatibility level.
|
|
This ensures that the temporary copy of the current message-mode
buffer is whole and not limited by a current restriction.
An example of such restriction is the default one established by
message-mode when composing a reply, that hides the References,
In-Reply-To and similar headers.
|
|
In certain scenarios involving symlinks and setting
find-file-visit-truename, text/calendar parts were not displayed
properly.
Following a suggestion of Al Haji-Ali [1], replace the use of
get-file-buffer with find-buffer-visiting.
[1]: id:m2wmneguh8.fsf@gmail.com
|
|
Provide customize support for the new feature introduced in
cd89065d.
Commit message expanded by: db
|
|
The new notmuch-search-hide-excluded option allows users to configure whether
to show or hide excluded messages (as determined by search.exclude_tags
in the local notmuch config file). It defaults to true for now to maintain
backwards-compatibility with how notmuch-{search,tree} already worked.
New commands notmuch-search-toggle-hide-excluded and
notmuch-tree-toggle-exclude have also been added. They toggle the value
of notmuch-search-hide-excluded for the search in the current search or
tree buffer. It's bound to "i" in the respective keymaps for these
modes.
Lastly I've amended some calls to notmuch-tree and notmuch-unthreaded
which didn't pass through the buffer local value of
notmuch-search-oldest-first (and now notmuch-search-exclude).
Examples of where I've done this include:
+ notmuch-jump-search
+ notmuch-tree-from-search-current-query
+ notmuch-unthreaded-from-search-current-query
+ notmuch-tree-from-search-thread
A new test file for Emacs has been added which covers the usage of the
new `notmuch-search-hide-excluded' option and interactively hiding or
showing mail with excluded tags. These test cover the basic usage of
the `notmuch-search-toggle-hide-excluded' command in notmuch-search,
notmuch-tree and notmuch-unthreaded searches. These tests also cover
the persistence of the current value of the hide-excluded mail option
as a user switches from between these different search commands.
[1]: id:87ilxlxsng.fsf@kisara.moe
Amended-by: db, fix indentation in T461-emacs-search-exclude.sh
|
|
With this change, users with mail-user-agent set to
'notmuch-user-agent can start composing emails without having to
require 'notmuch-mua first.
|
|
Some people (e.g: me) prefer to read their email with threaded
representation by default.
Without this commit, I have to run "notmuch-search" (autoloaded)
first to get "notmuch-tree" loaded.
|
|
|
|
Currently the --to/--cc/--bcc options add "user@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 the
email with the trailing commas leads to prompt:
Email address looks invalid; send anyway? (y or n)
Fix this by only adding the commas between addresses, avoiding the
trailing commas.
|
|
Suppress compiler warning.
|
|
The previous version essentially repeated the source code, and
generated a compiler warning.
|
|
Suppress byte-compiler warnings about >80 character docstrings.
|
|
The complicated looking escapes are needed to avoid compile time
warnings. (info "(elisp) Text Quoting Style") for details.
|
|
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 stashed redisplay data.
[1]: https://lists.gnu.org/archive/html/emacs-devel/2023-08/msg00593.html
|
|
This data will eventually be used to redisplay hidden images. A
certain amount of refactoring is done here to avoid code
duplication.
|
|
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.
|
|
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 complicated for anything that simple, so we stash it in
the part plist and rely on that being preserved (unlike the mm handle,
which is transient).
|
|
Apparently the macro setq-local only takes two arguments in Emacs 26.1
|
|
With this mode, one can fold trees in the notmuch-tree buffer as if
they were outlines, using all the commands provided by
outline-minor-mode. We also define a couple of movement commands
that, optional, will ensure that only the thread around point is
unfolded.
The implementation is based on registering a :level property in the
messages p-list, that is then used by outline-minor-mode to to
recognise headers.
Amended by db: Copy docstring to manual and edit for presentation. Add
two tests. Fix typo "wether".
|
|
Although this has more steps than the previous regular expression
search and replace, it should be more robust against changes in the
headerline format, such as the inclusion of duplicate numbers (which
broke the previous version).
|
|
This will support use of this function in notmuch-show-update-tags.
|
|
This should allow calling notmuch-show-insert-headerline from other
places without duplicating the set of plist accesses.
|
|
OTHER-HEADERS are expected to be passed as strings, to match the
implementation of `compose-mail'. But the "From" header is currently
expected to be passed as a symbol. Instead the "From" header can be
safely added after converting all the headers to symbols.
|
|
notmuch-search-insert-authors now sets the evaporate property on the
ellipsis overlays. Emacs will delete them when the buffer contents
are zeroed out, which happens with `notmuch-refresh-buffer`. This
prevents them from being collapsed to zero-width overlays in position
1. See Emacs bug#58479. An upcoming change in Emacs will make these
dangling overlays visible to the user.
|
|
...and bind these to "E" in their respective keymaps.
Expected to be called interactively, then using read-from-minibuffer
with current search string as initial contents for editing.
(Noninteractive use makes little sense, but is supported.)
With this one can expand (as an opposite to limit) their
query and have e.g. (some of their) saved searches as search
"templates".
While at it, removed `(defvar notmuch-search-query-string)` from
notmuch-tree.el; it is unused (`notmuch-tree-basic-query` is used
instead).
Thanks to Jose Antonio Ortega Ruiz for his example for notmuch-tree
code, and better interactive use.
|
|
This enables auto-completion of commands, something which plain
read-string does not do. It's otherwise a drop-in
replacement. According to `C-h f`, read-shell-command was introduced
in Emacs 23.1 or earlier.
|
|
Hook run when the tree insertion process finishes its job.
--
This patch supersedes <id:20220816214023.1523322-1-jao@gnu.org>, but
changing the new variable name.
Right now, it can be used for silly things like removing or changing
the the "End of search." hardcoded message in the tree buffer. But
also for more sophisticated things like folding all threads in add-ons
like my outline mode for tree buffers (to be submitted).
Signed-off-by: jao <jao@gnu.org>
|
|
It should have one in any case, but in particular it is needed for the
manual.
|
|
This fixes the bug reported by Al [1]. Essentially apply the same fix
as [2] in a different place.
[1]: id:877d41nmr1.fsf@gmail.com
[2]: 90a7c1af368a527700dcde9b0dcbd760afc7bd92
|