Inserting spaces to pad out columns is good, except when the padding
makes the line wider than the window. This looks particularly bad on a
tty where there is no fringe.
Hence, avoid padding the last column on each row.
lib/messages.c: In function ‘notmuch_messages_move_to_next’:
lib/messages.c:131:2: warning: ISO C forbids ‘return’ with expression, in function returning void [-pedantic]
Signed-off-by: Jani Nikula <jani@nikula.org>
`notmuch-hello-mode' inherits the keymap for widgets, which confused
`notmuch-substitute-command-keys'. Fix the confusion.
Simplify `notmuch-substitute-command-keys' a little to make it easier
to read.
notmuch_show_params_t params is only initialized partially in
notmuch_reply_command(). The only field that is used uninitialized is
params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted
messages work by coincidence.
Initialize params properly, and set params.decrypt as needed.
Signed-off-by: Jani Nikula <jani@nikula.org>
Use the new notmuch argument parser to handle arguments in "notmuch
reply". There should be no functional changes.
Signed-off-by: Jani Nikula <jani@nikula.org>
notmuch_show_params_t params is only initialized partially in
notmuch_reply_command(). The only field that is used uninitialized is
params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted
messages work by coincidence.
Initialize params properly, and set params.decrypt as needed.
Signed-off-by: Jani Nikula <jani@nikula.org>
With the default configuration ('space' moves through the messages
matching the search and back to the results index at the end) it's
unnecessary to signal an error when the last message has been read, as
this is the common case.
Moreover, it's very annoying when `debug-on-error' is t.
Recent changes introduced lots of unicodification of strings, mostly in
the form of .decode('utf-8', errors='ignore'). However, python 2.5 does
not like the errors keyword argument and complains. It does work when
used as a simple arg though, so that's what this patch does.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Formerly Message.get_replies() returned an iterator or None forcing
users to check the result before iterating over it leading to strange
looking code at the call site.
Fix this flaw by adding an EmptyMessagesResult class that behaves like
the Messages class but immediatly raises StopIteration if used as an
iterator and returning objects of this type from Message.get_replies()
to indicate that there are no replies.
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.
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.