emacs: wrap docstrings Suppress byte-compiler warnings about >80 character docstrings.
emacs/show: special case toggling display of images 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
emacs: save image redisplay data during non-lazy display This data will eventually be used to redisplay hidden images. A certain amount of refactoring is done here to avoid code duplication.
emacs/show: save redisplay redisplay data when showing lazy part. 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/show: use n-s-i-headerline to update tags 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).
emacs/show: add optional orig-tags argument to n-s-i-headerline This will support use of this function in notmuch-show-update-tags.
emacs/show: use plist to pass message info to n-s-insert-headerline This should allow calling notmuch-show-insert-headerline from other places without duplicating the set of plist accesses.
emacs/show: use read-shell-command instead of read-string 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.
emacs: add docstring for notmuch-show-choose-duplicate It should have one in any case, but in particular it is needed for the manual.
emacs/show: restrict inlined mimetypes on refresh. 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
emacs: add duplicate support to notmuch-show-view-raw-message This fixes one of the bugs reported by Gregor in [1] [1]: id:87edxw8jp4.fsf@no.workgroup
emacs/show: provide a more friendly function to get duplicate num There is not much code here, but at least we can fix the indexing as 1 based.
emacs: update notmuch-show-get-filename to handle duplicates This fixes one of the bugs reported by Gregor in [1]. [1]: id:87edxw8jp4.fsf@no.workgroup
emacs/reply: reply to correct duplicate 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.
CLI/reply: support --duplicate argument 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).
emacs/show: display count of duplicates in headerline There is no real cost here, except screen real estate. Some people might prefer hiding the duplicate count, but we leave that for a future commit.
emacs/show: provide notmuch-show-choose-duplicate 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.
emacs/show: introduce notmuch-show-height-limit Analogous to notmuch-show-depth-limit, it requires a bit more calculation, but that cost seems dominated by the rendering cost.
emacs/show: obey notmuch-show-max-text-part-size for part 0 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.
emacs/show: optionally insert bodies of "deep messages" lazily 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.