aboutsummaryrefslogtreecommitdiff
path: root/emacs
AgeCommit message (Collapse)Author
2022-08-07emacs: add duplicate support to notmuch-show-view-raw-messageDavid Bremner
This fixes one of the bugs reported by Gregor in [1] [1]: id:87edxw8jp4.fsf@no.workgroup
2022-08-07emacs/show: provide a more friendly function to get duplicate numDavid Bremner
There is not much code here, but at least we can fix the indexing as 1 based.
2022-08-07emacs: update notmuch-show-get-filename to handle duplicatesDavid Bremner
This fixes one of the bugs reported by Gregor in [1]. [1]: id:87edxw8jp4.fsf@no.workgroup
2022-07-30emacs: update defcustom for notmuch-unthreaded-result-formatDavid Bremner
This is essentially a copy of that for notmuch-tree-result-format, aside from the default value.
2022-07-30emacs: update defcustom for notmuch-search-result-format.David Bremner
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.
2022-07-30emacs: update defcustom for notmuch-search-result-format.David Bremner
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.
2022-07-30emacs/reply: reply to correct duplicateDavid Bremner
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.
2022-07-30CLI/reply: support --duplicate argumentDavid Bremner
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).
2022-07-30emacs/show: display count of duplicates in headerlineDavid Bremner
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.
2022-07-30emacs/show: provide notmuch-show-choose-duplicateDavid Bremner
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.
2022-07-14emacs/show: introduce notmuch-show-height-limitDavid Bremner
Analogous to notmuch-show-depth-limit, it requires a bit more calculation, but that cost seems dominated by the rendering cost.
2022-07-14emacs/show: obey notmuch-show-max-text-part-size for part 0David Bremner
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.
2022-07-14emacs/show: optionally insert bodies of "deep messages" lazilyDavid Bremner
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.
2022-07-03emacs: mark notmuch-query.el as obsoleteDavid Bremner
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.
2022-06-16emacs: use message-dont-reply-to-names when composing repliesjao
notmuch-mua functions for replies now use the built-in customizable variable message-dont-reply-to-names with the same semantics as message-mode.
2022-06-13emacs: Make notmuch-show-next-thread return nil on failureLeo Okawa Ericson
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
2022-06-02emacs: change where notmuch-mua-mail moves pointDamien Cassou
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.
2022-06-01emacs: notmuch-show-header-line: allow format strings and functionsjao
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
2022-05-20emacs: document/defcustom notmuch-multipart/alternative-discouragedDavid Bremner
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.
2022-05-16emacs/reply: restrict what mime types are inlined by defaultDavid Bremner
Apply the previously factored-out function used by notmuch-show.
2022-05-16emacs: factor out calculation of mm-inline-override-typesDavid Bremner
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.
2022-02-26emacs: redirect undo to notmuch-tag-undoDavid Bremner
The double remap is a bit ugly, but it seems better than adding another layer of keymaps for those modes where notmuch-tag-undo makes sense.
2022-02-26emacs: add notmuch-tag-undoDavid Bremner
Keybindings are deferred to a future commit.
2022-02-26emacs/tag: keep tag historyDavid Bremner
This buffer local list will be used to provide an undo facility for tagging operations. Keeping history can be disabled with the new OMIT-HIST option.
2022-02-25emacs: remove non-batch code path from function notmuch-tagDavid Bremner
It is no slower (according to T06-emacs) to use batch for everything, and it simplifies the code.
2022-02-16emacs: escape quote in notmuch-search-result-format docstringDavid Bremner
Prevent Emacs' mangling of quotes, which breaks the code sample.
2022-02-12emacs: remove png logoDavid Bremner
Reduce chance of downstream packagers packing the wrong file.
2022-01-26emacs: use cached encoded copy for fccDavid Bremner
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
2022-01-23emacs: customizable names for search buffersjao
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.
2022-01-23emacs: define, use option :disable-excludes for n-h-query-countsDavid Bremner
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
2022-01-23Revert "emacs: use --exclude=false when checking for empty searches"David Bremner
Revert commit 8370e3cfe2dd8a79323613c2bbf2f11db6134dac, 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.
2022-01-20emacs: use --exclude=false when counting total messagesDavid Bremner
Even if a user excludes a large fraction of their messages, they still nonetheless exist and are searchable.
2022-01-20emacs: use --exclude=false when checking for empty searchesDavid Bremner
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.
2022-01-14emacs/notmuch-tag.el: add xmlns attribute to svg iconsLdBeth
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
2022-01-10emacs: make header line in notmuch-show buffers optionaljao
New notmuch-show-header-line customizable boolean to allow inhibiting a header line in notmuch-show-mode buffers (for instance, because one prefers to just include Subject in notmuch-message-headers).
2021-12-29emacs: update coolj-line-prefix-regexp to make space optionalDavid Bremner
Jani reported that lines prefixed with '>' (as opposed to '> ') are not highlighted properly [1]. David E responded with a updated regex [2]. This change implements David E's suggestion. [1]: id:87a8b5pcky.fsf@nikula.org [2]: id:m2pok1e3gv.fsf@dme.org
2021-12-23emacs: add notmuch-logo.svg and use it in emacs mua on graphic displaysTomi Ollila
emacs/notmuch-logo.svg is handcrafted scalable vector graphics version of the notmuch logo. Emacs on graphic displays render this image four times in size compared to the emacs/notmuch-logo.png, and the image is much sharper. The rendered image size, 100x100 pixels, fits reasonably well with text shown in various font sizes. Scaling the image -- if desired -- may come in the future. For now this is improvement on how the logo looked in notmuch-hello window.
2021-12-12emacs/tree: fix docstrings for author facesKyle Meyer
The docstrings for notmuch-tree-match-author-face and notmuch-tree-no-match-author-face incorrectly match the docstring of notmuch-tree-match-date-face.
2021-12-04emacs: don't add space to tag completion candidates.David Bremner
Apparently this messes up various third party completion frameworks. This change does mean that users will have to hit space after completing a tag change in order to enter another change. As a bonus, remove the call to #'delete, since completing-read-multiple already promises to remove empty strings.
2021-12-04emacs: run notmuch-search-hook lazilyDavid Bremner
In message id:YT3ueuZHKW931NW3@localhost, Fabio Natali isolated a visual glitch caused by running notmuch-search-hook too early. This change moves the running of that hook to notmuch-search-process-filter, which ensures there is some output in the buffer before running the hook. Since n-s-p-f can be called many times for a given buffer, add a buffer local flag to make sure it is only run once per buffer.
2021-12-03emacs: drop C-tab binding in hello mode, document <backtab>.David Bremner
The <backtab> binding has always been there, but the docs were apparently mistakenly changed to say <backspace> [1] Revert to <backtab> in the documentation. The commit also drops the C-<tab> binding, since it seems redundant and it interferes with tab-bar-mode. [1]: 703dec7754da477b5683867c88cb940b8553be91.
2021-10-30emacs: improve notmuch-*-from-current-query docstringsDavid Bremner
Err on the side of providing better user documentation, rather than documentation for developers.
2021-10-30emacs: add minimal docstring for notmuch-unthreadedDavid Bremner
The missing docstring causes a blank in the notmuch-help display [1]. Since the function is a simple wrapper for notmuch-tree, it seems fair to forward the reader there for more detailed information. [1]: id:878sape5a9.fsf@disroot.org
2021-10-19emacs: fix call to nonexistent notmuch--call-process-shell-commandDoug Woos
Looks like a find/replace error in e722b4f4
2021-09-20emacs: notmuch-tree: customizable strings for drawing treesjao
New customizable variable, notmuch-tree-thread-symbols, that allows tweaking of how trees in a forest are represented. For instance, one can now choose to use an hyphen rather than a white space as a prefix, or replace the character(s) used to draw arrows. Amended-By: db; delete errant '3'
2021-09-11emacs: wrap call-processDavid Bremner
Provide safe working directory
2021-09-11emacs: wrap make-processDavid Bremner
Provide a safe working directory.
2021-09-11emacs: wrap call-process-regionDavid Bremner
As with notmuch--process-lines, initial purpose is to provide a safe binding for default-directory. This is enough to make notmuch-hello robust against non-existent or corrupt values default-directory, but probably not other views.
2021-09-11emacs: wrap process-linesDavid Bremner
Initially just set the working directory, to avoid (the implicit) call-process crashing when the default-directory points to a non-existent location. Use of a macro here is over-engineering for this change, but the same change needs to be applied to several other process creation primitives.
2021-09-08emacs: Allow functions in notmuch-{tree,unthreaded}-result-formatDavid Edmondson
If the car of an element in notmuch-tree-result-format or notmuch-unthreaded-result-format is a function, insert the result of calling the function into the buffer.