Emacs message-mode uses certain text strings to indicate how to attach
files to outgoing mail. If these are present in the text of an email,
and a user is tricked into replying to the message, the user’s files
could be exposed.
Edited-by: Pieter Praet <pieter@praet.org>: Rebased to release branch.
The test is broken at this time; the next commit will introduce a fix.
Edited-by: Pieter Praet <pieter@praet.org>:
Rebased to release branch, moved expected output into the actual test,
and fixed "Fcc:" line.
This changes the default key bindings for the 'a' key in notmuch-show
mode. Instead of archiving the entire thread, it now just archives
the current message, and then advance to the next open message
(archive-message-then-next). 'A' is now bound to the previous
archive-thread-then-next function.
This will allow for keybindings that achieve a smoother message
processing flow by reducing the number of key presses needed for most
common operations.
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}. The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
This function is now just for archiving the current thread. A new
function is created to archive-then-next. The 'a' key binding is
updated accordingly.
This will allow people to bind to the simple thread archiving function
without the extra navigation. The archive-thread function now also
takes a prefix to unarchive the current thread (ie. put the whole
thread back in the inbox).
Break up notmuch-show-archive-thread-internal into two new functions:
notmuch-show-tag-thread-internal: applies a tag to all messages in
thread. If option remove flag is t, tags will be removed instead of
added.
notmuch-show-next-thread: moves to the next thread in the search
result. If given a prefix, will show the next result, otherwise will
just move to it in the search view.
Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
are also added. Together, these provide a better suit of thread
tagging and navigation tools.
The higher level thread archiving functions are modified to use these
new function.
Moved static functions _config_get_list () and _config_set_list ()
closer to the beginning of file so that their definition is known
(without adding forward declarations) in upcoming changes.
`mail-header-parse-address' expects un-decoded mailbox parts, which is
not what we have at this point. Replace it with simple string
deconstruction.
Mark the corresponding test as no longer broken.
Minor whitespace cleanup.
The `mm-inlinable-p' function works better if it has access to the
data of the relevant part, so load that content before calling it.
Don't load the content for parts that the user has indicated no desire
to inline.
This fixes the display of attached image/jpeg parts, for example.
There are two ways to do search in Emacs UI: search widget in
notmuch-hello buffer and `notmuch-search' function bound to "s".
Before the change, these search mechanisms used different history
lists. The patch makes notmuch-hello search use the same history list
as `notmuch-search' function.
Before the change, "s" in notmuch-hello buffer would jump to the
search box. The patch changes the binding to `notmuch-search' which
is consistent with all other notmuch buffers.
Adjusted some uncrustify variables to get closer to prevailing style:
* Label indent (for goto) relative to current indentation.
* Registered GMimeObject and mime_node_t being as types.
* Space after ! (not) operator.
* No space after 'stringify' (#) preprosessor token.
* No spacing change around ## (option not versatile enough).
There are at least 3 cases where attention needs to be paid:
* If there is newline between function name and open paren in function
call, the paren (and args) are indented too far right.
* #define HOUR (60 *MINUTE) -- i.e. no space after star (*).
* void (*foo)(args) -- i.e no space between (name) and (args).
Add a new test function to allow simpler testing of emacs
functionality.
`test_emacs_expect_t' takes one argument - a lisp expression to
evaluate. The test passes if the expression returns `t', otherwise it
fails and the output is reported to the tester.
When checking for a running emacs, test_emacs evaluates the empty list
'()'. This returns 'nil' when emacs is running, which is then
prepended to the actual test result. Given that it is not part of the
actual test output the test harness can incorrectly report test
failure (or success).
This callback is the gateway to the new mime_node_t-based formatters.
This maintains backwards compatibility so the formatters can be
transitioned one at a time. Once all formatters are converted, the
formatter structure can be reduced to only message_set_{start,sep,end}
and part, most of show_message can be deleted, and all of
show-message.c can be deleted.
This makes the part numbers readily accessible to formatters.
Hierarchical part numbering would be a more natural and efficient fit
for MIME and may be the way to go in the future, but depth-first
numbering maintains compatibility with what we currently do.
Currently, the 'search.exclude_tags' option is automatically
set to "deleted;spam;" if it's missing from the config file.
This violates the Principle of Least Surprise, so *only* set
'search.exclude_tags' to "deleted;spam;" if we didn't find a
configuration file at all.
This patch is actually Austin Clements' work:
id:"20120117203211.GQ16740@mit.edu"
Currently, the 'search.exclude_tags' option is automatically set to
"deleted;spam;" if it's missing from the config file.
This violates the Principle of Least Surprise, so update the tests to
*only* expect the exclusion of messages which are tagged "deleted" if the
'search.exclude_tags' option is explicitly set *and* contains that tag.
All other config-related functions and args include the section
title in their name, so for the sake of consistency, mirror that.
Also, the "auto"matic part is a given, so that was dropped.
Before 3434d1940 the return values of libnotmuch functions were
declared as c_void_p and the code checking for errors compared the
returned value to None, which is the ctypes equivalent of a NULL
pointer.
But said commit wrapped all the data types in python classes and the
semantic changed in a subtle way. If a function returns NULL, the
wrapped python value is falsish, but no longer equal to None.
Backported from master to 0.11.
Previously, top-level message headers were printed as Subject, From,
To, Date, while embedded message headers were printed From, To,
Subject, Date. This makes both cases use the former order and updates
the tests accordingly.
Strangely, the raw format also uses this function, so this also fixes
the two raw format tests affected by this change.
emacsclient --eval '(kill-emacs)' makes emacs versions 23.1
and 23.2 ask user input from running emacs. Redefining
yes-or-no-p function when kill-emacs is executed for these
emacs versions in test-lib.el avoids this test problem.
Used emacs (whitespace-cleanup) function to "cleanup blank problems"
in test files where that could be done without breaking tests;
test/emacs was partially, and test/multipart was fully reverted.