As reported in
id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com"
sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open()
tries to access iconv_cache that is NULL if g_mime_init() is not called.
This causes notmuch to segfault when calling gmime functions.
Calling g_mime_init() initializes iconv_cache and others variables needed
by gmime, making sure they are initialized when notmuch calls gmime
functions.
Test marked fix by db.
One is quoted printable, the other users 8 bit encoding. The latter
triggers a bug in the python bindings due to missing call to
g_mime_init. The corresponding test is marked broken in this commit.
"notmuch help" now relies on a working man installation, and a correct
setting of MANPATH, for users that install in "unusual" places. This
should probably noted in NEWS before shipping.
There is still some small duplication of docs as the one line
summaries are hard coded in the binary. This seems preferable to
complicated script games, at least as long was we are using a
presentation level markup like nroff.
These functions are enough different in their behavior that it's not
really worth it to combine them. They overlap in the format of the
dump file, but we can have a separate page that describes the dump
format, and either reference it or include it. This also keeps things
nice and clean with one page per command.
- We have to remove the installation of notmuch.1.gz from the top
level Makefile.local.
- Man pages with multiple names are handled by making relative
symlinks in the install-man target.
- update version tests and convenience rules for split man pages
The man page version test still only checks notmuch.1, but the
location is updated.
update-man-versions is longer than the one-line previously in
update-versions mainly because I decided to take the high road and
stick to POSIX sed (thus, no sed -i). The sed regex itself is more
complicated to cope with variations in the headers.
- Replace references to section X below with page refences.
- Add SEE ALSO to each page. This is a bit error prone, because each
SEE ALSO section is different, i.e. a page does not refer to itself.
Fix some problems with indentation (controlled by markup) and
whitespace.
- notmuch.1: reformat
Use .SS macro to make "notmuch setup" a subsection. Introduce another
subsection for the remaining commands.
- notmuch-config.1: reformat
Put all the syntax in the synopsis. Supposedly this is the the UNIX way.
- notmuch-reply.1: fix formatting issues.
Give nicer formatting for synopsis.
Insert missing SEE ALSO header.
- notmuch-dump.1: reformat using subsections
These seems more natural, although, as mentioned, it does require
referring back to the synopsis. Or maybe copying parts of the
synopsis
These are just for the convenience of testers using $src/man as an
element of MANPATH. They are intentionally omitted from MAN1, so that
they do not interfere with the install.
We mostly just cut and paste the command descriptions into individual
files, with a short header added to each one.
The splitting into subdirectories is to support the use of ./man as an
element in MANPATH, e.g. for testing.
Tester may have set LD_LIBRARY_PATH to find libraries required
by notmuch. Therefore add $TEST_DIRECTORY/../lib to the beginning
of current list of library paths in $LD_LIBRARY_PATH before running
symbol-test.
It makes no sense to run test-lib.sh, so it makes no sense to give it
an interpreter. This is particularly annoying for Emacs users who
have executable-insert set, since the presence of the #! line will
cause Emacs to mark test-lib.sh executable when saving it, which will
in turn case the 'basic' test to fail.
January 5, 2001 was a Tuesday, not a Friday. Jameson fixed this exact
problem for the multipart test in ec2b0a98cc, but not for
generate_message itself.
As Jameson pointed out in ec2b0a98cc, if we want to test date parsing,
we should do it separately.
It appears to be an oversight that encrypted parts were indexed
previously. The terms generated from encrypted parts are meaningless
and do nothing but add bloat to the database. It is not worth
indexing the encrypted content, just as it's not worth indexing the
signatures in signed parts.
As we start to pay more attention to emacs24, it helps to be able to
select a different version of emacs to run the tests with to verify
version specific bugs.
A separate variable TEST_EMACS is needed to avoid being overwritten by the
make variable EMACS in Makefile.config
For what it's worth, the value of emacs is chosen at the time
tmp.emacs/run_emacs is created, so is fixed for all subtests.
Users are missing out on various functions which usefully improve the
display of text/plain message parts because they are not enabled by
default. Enable a useful set.
`notmuch-wash-convert-inline-patch-to-part' is _not_ enabled by
default as it is based on a heuristic.
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>
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>
This removes all of the MIME traversal logic from show_message_body
and leaves only its interaction with the format callbacks.
Besides isolating concerns, since traversal happens behind a trivial
interface, there is now much less code duplication in
show_message_part. Also, this uses mime_node_seek_dfs to start at the
requested part, eliminating all of the logic about parts being
selected or being in_zone (and reducing the "show state" to only a
part counter). notmuch_show_params_t no longer needs to be passed
through the recursion because the only two fields that mattered
(related to crypto) are now handled by the MIME tree.
The few remaining complexities in show_message_part highlight
irregularities in the format callbacks with respect to top-level
messages and embedded message parts.
Since this is a rewrite, the diff is not very enlightening. It's
easier to look at the old code and the new code side-by-side.
This function matches how we number parts for the --part argument to
show. It will allow us to jump directly to the desired part, rather
than traversing the entire tree and carefully tracking whether or not
we're "in the zone".
This wraps all of the complex MIME part handling in a single, simple
function that gets part N from *any* MIME object, so traversing a MIME
part tree becomes a two-line for loop. Furthermore, the MIME node
structure provides easy access to envelopes for message parts as well
as cryptographic information.
This code is directly derived from the current show_message_body code
(much of it is identical), but the control relation is inverted:
instead of show_message_body controlling the traversal of the MIME
structure and invoking callbacks, the caller controls the traversal of
the MIME structure.
Examples in documentation for `notmuch-search-line-faces' had an extra
quote, e.g.:
'(\"unread\" . '(:foreground \"green\"))
Which resulted in values like:
(\"unread\" quote (:foreground \"green\"))
And tons of "Invalid face reference: quote" errors in the messages
buffer.
Since message-ids necessarily match just a single message, there's no
reason to do a search for the id before viewing the actual message;
the search just becomes an extra screen to click through. Clicking on
an id: links now just jumps straight to the message itself.
Commit 567bcbc2 introduced two new values for each message (content of the
"From" and "Subject" headers), but the comments about the database schema had
not been updated accordingly.
Text properties change between characters; prev-s-c-property-change
returns the position after the change. Thus, it is still inside the
invisible region.
Notmuch-hello stores a list of recent searches. Before the change, if
a search from this list is repeated, the recent search list is not
changed. The patch makes repeated recent searches move to the head of
the list. I.e. the last search is always on top of the recent search
list, which is what one would expect from a history list.
Test that `notmuch-hello-refresh-hook' is called once when
`notmuch-hello' is called and twice when calling
`notmuch-hello-update' after that.
The tests are very similar to tests for `notmuch-hello-mode-hook'.
This had been discussed and decided on IRC.
Rationale:
Therefore the space is recommended in the SI/ISO 31-0 standard, and the
International Bureau of Weights and Measures states that "for numbers with
many digits the digits may be divided into groups of three by a thin space, in
order to facilitate reading. Neither dots nor commas are inserted in the
spaces between groups of three".
(http://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping)
If the address matching function generates no matches, don't prompt
the user to choose between them (!). Instead, generate a message to
report that there were no matches.
The :options keyword is not meaningful for function type. Also, it was not
possible to enter nil value, contrary to the notmuch-mua-user-agent
defcustom documentation. Specify the alternatives using choice type, taking
nil into account.
Signed-off-by: Jani Nikula <jani@nikula.org>
It was not possible to define custom filters or filter functions because
the types were const. Remove const to allow editing.
Signed-off-by: Jani Nikula <jani@nikula.org>