aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-wash.el
Commit message (Collapse)AuthorAge
* emacs: create patch filename from subject for inline patch fake partsGravatar Jani Nikula2011-12-28
| | | | | | | | | | | | | | | | | | | | | Use the mail subject line for creating a descriptive filename for the wash generated inline patch fake parts. The names are similar to the ones created by 'git format-patch'. If the user has notmuch-wash-convert-inline-patch-to-part hook enabled in notmuch-show-insert-text/plain-hook, this will change the old default filename of "inline patch" in fake parts: [ inline patch: inline patch (as text/x-diff) ] into, for example: [ 0002-emacs-create-patch-filename-from-subject-for-inline.patch: inline patch (as text/x-diff) ] which is typically the same filename the sender had if he was using 'git format-patch' and 'git send-email'. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: add inline patch fake parts through a special handlerGravatar Jani Nikula2011-12-28
| | | | | | | | Add wash generated inline patch fake parts through a special "inline-patch-fake-part" handler to distinguish them from real MIME parts. The fake parts are described as "inline patch (as text/x-diff)". Signed-off-by: Jani Nikula <jani@nikula.org>
* fix sum moar typos [user-visible documentation in code]Gravatar Pieter Praet2011-06-23
| | | | | | | | | | | | Various typo fixes in documentation within the code that can be made available to the user, (emacs function help strings, "notmuch help" output, notmuch man page, etc.). Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just documentation and fixed fix of "comman" to "common" rather than "command".
* Set higher priority for headers and hidden citation overlays.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | Before the patch, message, headers and hidden citation overlays had zero priority. All these overlay have `invisible' property. Emacs documentation says that we should not make assumptions about which overlay will prevail when they have the same priority [1]. It happens to work as we need, but we should not rely on undocumented behavior. [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Overlay-Properties.html
* Fix hiding a message while some citations are shown in notmuch-show view.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | | | | | | | | | Before the change, message and citation invisibility overlays conflicted: if some citation is made visible and then the whole message is hidden, that citation remained visible. This happened because the citation's overlay has an invisible property which takes priority over the message overlay. The message invisibility spec does not affect citation visibility, it is determined solely by the citation overlay invisibility spec. Hence, if citation is made visible, it is not hidden by message invisibility spec. The patch changes citation overlay invisibility property to be a list which contains both the citation and the message invisibility specs. This makes the citation invisible if either of them is added to the `buffer-invisibility-spec'. Note that all citation visibility states are "restored" when the message hidden and shown again.
* Pass message to the `notmuch-show-insert-text/plain-hook' hook.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | Before the change, the `notmuch-show-insert-text/plain-hook' was given only the `depth' argument. The patch adds another one - the message. Currently, the new message argument is not used by any on the hooks. But it will be used later to get access to message invisibility specs when wash buttons are inserted.
* Workaround for Emacs bug #8721.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | The emacs bug is that isearch cannot search through invisible text when the 'invisible' property is a list. The patch adds `notmuch-isearch-range-invisible' function which is the same as `isearch-range-invisible' but with fixed Emacs bug #8721. Advice added for `isearch-range-invisible' which calls `notmuch-isearch-range-invisible' instead of the original `isearch-range-invisible' when in `notmuch-show-mode'.
* notmuch.el: hide original message in top posted replies.Gravatar David Bremner2011-06-10
| | | | | | | | | | | | | This code treats top posted copies essentially like signatures, except that it doesn't sanity check their length, since neither do their senders. New user-visible variables: notmuch-wash-button-original-hidden-format notmuch-wash-button-original-visible-format Rebased-by: Carl Worth <cworth@cworth.org>
* emacs: Use "message-cited-text" instead of "message-cited-text-face"Gravatar Pieter Praet2011-06-01
| | | | | | | | | (describe-face 'message-cited-text-face) > message-cited-text-face is an alias for the face `message-cited-text'. > This face is obsolete since 22.1; use `message-cited-text' instead. Signed-off-by: Pieter Praet <pieter@praet.org> Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* Carefully manage save/restore of point in ↵Gravatar Dmitry Kurochkin2011-05-24
| | | | | | | | | | | | `notmuch-wash-toggle-invisible-action'. Before the change, save-excursion was used to save the point. But the marker saved by save-excursion was inside a region that was deleted, so that approach is unreliable, (leading to point jumping to a new position past the button). This patch instead saves point in an integer variable, and when restoring, carefully avoids moving point past the button, (in case the new button label is shorter than the old button label).
* Use different labels for wash buttons when text is visible or hidden.Gravatar Dmitry Kurochkin2011-05-24
| | | | | | | | | Before the change, citation and signature wash buttons used the same label in both visible and hidden states. Sometimes it is very convenient when you can determine if the text is hidden or shown without reading the context and/or clicking the button. The patch makes it easy to see if the text is shown or hidden by explicitly saying what the button does (shows or hides the text).
* emacs: Remove over-eager regular expressions from notmuch-wash-tidy-citations.Gravatar David Edmondson2010-12-07
| | | | | | | The removed expressions, which were used to ensure that citations were both preceded and followed by a blank line, were poorly implemented and caused a regexp stack overflow on messages more than a few thousand lines long.
* emacs: Correctly count the number of lines in a signature.Gravatar David Edmondson2010-11-11
|
* emacs: More functionality for `notmuch-wash-tidy-citations'.Gravatar David Edmondson2010-06-03
| | | | | | Add: - Insert a blank line before a citation if there isn't one, - Insert a blank line after a citation if there isn't one.
* emacs: Add missing parenthesis that was breaking the build.Gravatar Carl Worth2010-04-27
| | | | | Someday I'll stop pushing patches without at least compile-testing them. *sigh*
* emacs/notmuch-wash.el: Add `notmuch-wash-convert-inline-patch-to-part'.Gravatar David Edmondson2010-04-27
| | | | | | Detect inline patches and convert them to fake attachments, in order that `diff-mode' highlighting can be applied to the patch. This can be enabled by customising `notmuch-show-insert-text/plain-hook'.
* emacs: Add more functions to clean up text/plain partsGravatar David Edmondson2010-04-26
| | | | | | | | | | | | | | | | | | Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation, - notmuch-wash-elide-blank-lines: Compress repeated blank lines and remove leading and trailing blank lines. None of these is enabled by default - add them to `notmuch-show-insert-text/plain-hook' to use. Reviewed-by: Carl Worth <cworth@cworth.org>: I previously committed a stale version of this patch.
* Revert "emacs: Add more functions to clean up text/plain parts"Gravatar Carl Worth2010-04-26
| | | | This reverts commit 97570954cb583cacac35b0235cbe449a07630ae3.
* emacs: Add more functions to clean up text/plain partsGravatar David Edmondson2010-04-24
| | | | | | | | | | | | | | | | | | | | | | | Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation and remove blank lines between attribution statements and the citation, - notmuch-wash-compress-blanks: Compress repeated blank lines and remove leading and trailing blank lines. Enable `notmuch-wash-tidy-citations' and `notmuch-wash-compress-blanks' by default by adding them to `notmuch-show-insert-text/plain-hook'. `notmuch-wash-wrap-long-lines' is not enabled by default. If `notmuch-wash-wrap-long-lines' is enabled, word wrapping of the buffer leads to an unappealing display of text, so provide a function to disable it and add it to the list of `notmuch-show-mode' hook functions.
* emacs: Fix i-search to open up invisible citations as necessaryGravatar David Edmondson2010-04-24
| | | | | | Add an `isearch-open-invisible' property to the overlays used to hide citations and signatures, together with an appropriate function to leave the invisible text visible should that be required.
* emacs: Move body markup to a separate fileGravatar David Edmondson2010-04-21
Move the citation and signature markup for text/plain parts to a new file (notmuch-wash.el) and call it using a hook mechanism rather than directly.