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 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).
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).
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 seems redundant to have the previous example, since the default
value is always show by describe variable.
Enforce more restrictions on the keys in the alist, since arbitrary
strings don't work as field names.
Document that functions can be used in lieu of field names.
It seems redundant to have the previous example, since the default
value is always show by describe variable.
Enforce more restrictions on the keys in the alist, since arbitrary
strings don't work as field names.
Document that functions can be used in lieu of field names.
Essentially we just need to arrange to pass the right --duplicate
argument to notmuch reply.
As a side-effect, correct the previously unused value of EXPECTED in
T453-emacs-reply.sh.
We want the reply used to match that shown e.g. in the emacs
interface. As a first step provide that functionality on the command
line.
Schema does not need updating as the duplicate key was already
present (with a constant value of 1).
This new command allows the user to interactively choose a different
duplicate (file) to display for a given message in
notmuch-show-mode. Since both tree and unthreaded view use
notmuch-show-mode, this provides the same facility there.
This parameter was originally introduced to hide large attachements
that happened to be text/plain. From a performance point of view,
there is no reason not to also hide large message bodies.
This leverages the machinery already there to insert buttons for
attachments.
A potential use-case is browsing the top layers of the tree to decide
which of the lower subtrees to read.
The only functionality actually used by notmuch is the base function
notmuch-query-get-threads; the other functions in this file have
nothing to do with that (single) use. Move that function into
notmuch-lib.el and rename to reflect use. Deprecate the other
functions in notmuch-query.el.
Having notmuch-show-next-thread return non-nil on success and nil on
failure makes it easier for users to interact with notmuch via elisp.
This commit changes notmuch-search-show-thread too since the return
value of notmuch-show-next-thread depends on notmuch-search-show-thread.
Amended by db: fix whitespace in T450-emacs-show
Move point to the position that makes the most sense instead of always
moving point to the TO. This is useful when TO/SUBJECT are passed as
argument.
Amended by db: move news item to UNRELEASED.
If a string value is assigned to notmuch-show-header-line, it's used
as a format string to be passed passed to format-spec with `%s`
substituted by the message's subject. If a function is given, it's
called with the subject as argument, and its return value used as
header line.
As before, t means displaying the subject and nil not using any header
line.
Signed-off-by: jao <jao@gnu.org>
Amended-by: db, docstring spelling fix
This variable is important for people who want to change the default
behaviour when displaying multipart/alternative messages. Previously
it was undocumented. Add a defcustom to help users and copy some
documentation from the wiki. The usual machinery of re-using
docstrings is a bit tricky to use here because it mangles the example
lisp code, and the link to the info node should not be in e.g. the
html page.
Add a simple test to make sure the switch from defvar to defcustom did
not break something obvious.
The intended use case of this new function is to make reply behaviour
track that of show with respect to attachments.
Also fix the glob (which worked by fluke) into the documented regexp.
This fixes the bug reported by dkg in [1]. The movement of the call to
n-m-setup-message-for-saving is so the cleanup of Fcc headers happens
in the encoded version (otherwise Fcc headers may be saved to disk).
[1]: id:87k1zm225v.fsf@fifthhorseman.net
Customizable names for buffers presenting search results, via two
custom variables (notmuch-search-buffer-name-format and
notmuch-saved-search-buffer-name-format), defaulting to values
currently used for plain searches and including too tree and
unthreaded search buffers.
Amended by db: spelling fix.
Initially only use in notmuch-hello-insert-alltags. This is a more
narrow resolution of [1], which (unlike [2]) does not disable exclude
processing for regular saved searches.
[1]: id:87wox1vovj.fsf@len.workgroup
[2]: id:20220105010606.2034601-2-david@tethera.net
Revert commit 8370e3cfe2, and remark the
corresponding test as broken. Also update the expected output of the
broken test to show excludes active in the user defined saved searches.
In particular tags that only occur on otherwise excluded messages do
not show up in "All tags" without this change. The reported numbers
_do_ take excludes into account, so it is possible that
searches (e.g. the aformentioned tags) will show up with a count of
zero.
emacs-mac that compiled with OS X system API for image display
support cannot correctly render svg without xmlns parameter [1].
[1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com