Jani Nikula [Sat, 17 Aug 2013 12:11:27 +0000 (15:11 +0300)]
test: test notmuch search --duplicate=N
Add test for notmuch search --duplicate=N option.
Jani Nikula [Sat, 17 Aug 2013 12:11:26 +0000 (15:11 +0300)]
cli: add --duplicate=N option to notmuch search
Effective with --output=files, output the Nth filename associated with
each message matching the query (N is 1-based). If N is greater than
the number of files associated with the message, don't print anything.
Blake Jones [Wed, 14 Nov 2012 02:10:03 +0000 (18:10 -0800)]
notmuch-config: use strchr(), not index() (Solaris support)
notmuch-config.c has the only use of the function named "index()" in the
notmuch source. Several other places use the equivalent function
"strchr()"; this patch just fixes notmuch-config.c to use strchr()
instead. (Solaris needs to include <strings.h> to get the prototype for
index(), and notmuch-config.c was failing to include that header, so it
wasn't compiling as-is.)
Mark Walters [Thu, 22 Aug 2013 17:10:26 +0000 (18:10 +0100)]
contrib: pick: use close-message-pane for reply etc
We can save some code duplication by using the new close-message-pane
functionality for reply, forward, and new mail.
Mark Walters [Thu, 22 Aug 2013 17:10:25 +0000 (18:10 +0100)]
contrib: pick: add in binding to view raw message
Note this does rely on the fact that we have over-ridden notmuch-show-get-properties
Mark Walters [Thu, 22 Aug 2013 17:10:24 +0000 (18:10 +0100)]
contrib: pick: make help close the message pane first
Previously pressing "?" for help when the message pane was open meant
the help window was very small. Close the message pane before
displaying help.
Mark Walters [Thu, 22 Aug 2013 17:10:23 +0000 (18:10 +0100)]
contrib: pick: close window function
Mark Walters [Thu, 22 Aug 2013 17:10:22 +0000 (18:10 +0100)]
contrib: pick: pass tab through to the message pane
This makes tab move to next button in the message pane and binds
button activate (in message pane) to "e". This means that is easy to
toggle hidden parts or hidden citations etc in the message pane.
Mark Walters [Thu, 22 Aug 2013 17:10:21 +0000 (18:10 +0100)]
contrib: pick: add button press helper
We will want to be able to activate buttons not in the current
buffer (ie in the message pane) so it is helpful to have a way of
activating a button without signalling error if there is no button.
Mark Walters [Thu, 22 Aug 2013 17:10:20 +0000 (18:10 +0100)]
contrib: pick: add in to-message-window function
Mark Walters [Thu, 22 Aug 2013 17:10:19 +0000 (18:10 +0100)]
contrib: pick: Link in stash map straight from notmuch-show
These functions all now work straight from their notmuch-show
implementation so link them in.
Stash functionality was one of the key missing things in notmuch-pick.
Mark Walters [Thu, 22 Aug 2013 17:10:18 +0000 (18:10 +0100)]
contrib: pick: Link in attachment functions straight from notmuch-show
We can use the attachment functions straight from
notmuch-show. notmuch-show-view-all-mime-parts might be deprecated so
we either want to undeprecate it or not have this binding.
Mark Walters [Thu, 22 Aug 2013 17:10:17 +0000 (18:10 +0100)]
contrib: pick: Link in notmuch-show-pipe-message
Since we can now use show functions directly in pick we can drop pick-pipe-message.
Mark Walters [Thu, 22 Aug 2013 17:10:16 +0000 (18:10 +0100)]
contrib: pick: override notmuch-show-get-prop
We override notmuch-show-get-prop so that many of the show functions
can be used in notmuch-pick without modification. The main use is that
it means notmuch-show-get-message-id `works' in pick. Thus we get all
the stash functions and several other `for free' in pick.
Blake Jones [Wed, 21 Aug 2013 11:09:54 +0000 (13:09 +0200)]
timegm: add portable implementation (Solaris support)
The timegm(3) function is a non-standard extension to libc which is
available in GNU libc and on some BSDs. Although SunOS had this
function in its libc, Solaris (unfortunately) removed it. This patch
implements a very simple version of timegm() which is good enough for
parse-time-string.c.
Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
Blake Jones [Fri, 16 Aug 2013 14:38:16 +0000 (16:38 +0200)]
strsep: check for availability (Solaris support)
Solaris does not ship a version of the strsep() function. This change
adds a check to "configure" to see whether notmuch needs to provide its
own implementation, and if so, it uses the new version in
"compat/strsep.c" (which was copied from Mutt, and apparently before
that from glibc).
Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
Vladimir Marek [Fri, 16 Aug 2013 14:38:15 +0000 (16:38 +0200)]
asctime: check for standards compliance (Solaris support)
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
asctime_r(). Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec. The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.
This change also adds the file "compat/check_asctime.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.
Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
Blake Jones [Fri, 16 Aug 2013 14:38:14 +0000 (16:38 +0200)]
getpwuid: check for standards compliance (Solaris support)
Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
to be defined to get the right number of arguments in the prototypes for
getpwuid_r(). Solaris' default implementation conforms to POSIX.1c
Draft 6, rather than the final POSIX.1c spec. The standards-compliant
version can be used by defining _POSIX_PTHREAD_SEMANTICS.
This change also adds the file "compat/check_getpwuid.c", which
configure uses to perform its check, and modifies compat/compat.h to
define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.
Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
Austin Clements [Mon, 19 Aug 2013 14:40:03 +0000 (10:40 -0400)]
test: Canonicalize RFC 2047 encoding and charset
RFC 2047 states that the encoding and charset in an encoded word are
case-insensitive, so force them to lower case in the reply test. This
fixes an issue caused by GMime versions (somewhere between 2.6.10 and
2.6.16), which changed the capitalization of the encoding.
Austin Clements [Fri, 16 Aug 2013 15:35:43 +0000 (11:35 -0400)]
reply: Use RFC 2822/MIME wholly for text format template
Previously, reply's default text format used an odd mix of RFC 2045
MIME encoding for the reply template's body and some made-up RFC
2822-like UTF-8 format for the headers. The intent was to present the
headers to the user in a nice, un-encoded format, but this assumed
that whatever ultimately sent the email would RFC 2047-encode the
headers, while at the same time the body was already RFC 2045 encoded,
so it assumed that whatever sent the email would *not* re-encode the
body.
This can be fixed by either producing a fully decoded UTF-8 reply
template, or a fully encoded MIME-compliant RFC 2822 message. This
patch does the latter because it is
a) Well-defined by RFC 2822 and MIME (while any UTF-8 format would be
ad hoc).
b) Ready to be piped to sendmail. The point of the text format is to
be minimal, so a user should be able to pop up the template in
whatever editor they want, edit it, and push it to sendmail.
c) Consistent with frontend capabilities. If a frontend has the
smarts to RFC 2047 encode the headers before sending the mail, it
probably has the smarts to RFC 2047 decode them before presenting
the template to a user for editing.
Also, as far as I know, nothing automated consumes the reply text
format, so changing this should not cause serious problems. (And if
anything does still consume this format, it probably gets these
encoding issues wrong anyway.)
Austin Clements [Fri, 16 Aug 2013 15:35:42 +0000 (11:35 -0400)]
reply: Remove extraneous space from generated References
Previously, the References header code seemed to assume
notmuch_message_get_header would return NULL if the header was not
present, but it actually returns "". As a result of this, it was
inserting an unnecessary space when concatenating an empty or missing
original references header with the new reference.
This shows up in only two tests because the text reply format later
passes the whole reply template through g_mime_filter_headers, which
has the side effect of stripping out this extra space.
Austin Clements [Fri, 16 Aug 2013 15:35:41 +0000 (11:35 -0400)]
reply: Test replying to messages with RFC 2047-encoded headers
Austin Clements [Tue, 13 Aug 2013 19:52:17 +0000 (15:52 -0400)]
test: Make symbol-test depend on libnotmuch.so
Without this
$ make -j test
intermittently fails and
$ make clean; make test/symbol-test
always fails (not that anybody would do the latter).
Austin Clements [Mon, 12 Aug 2013 18:40:36 +0000 (14:40 -0400)]
reply: Document the reason for g_mime_filter_headers
Given how long it took me to figure out why we pass the reply headers
through g_mime_filter_headers, it's worth a comment.
Austin Clements [Mon, 12 Aug 2013 18:40:35 +0000 (14:40 -0400)]
lib: Document which strings are returned in UTF-8
Any string that ultimately comes from notmuch_message_file_get_header
is in UTF-8.
Austin Clements [Mon, 12 Aug 2013 18:40:34 +0000 (14:40 -0400)]
lib: Correct out-of-date doc comment
notmuch_message_get_header started returning some headers straight
from the database in
567bcbc, but this comment explicitly claimed all
headers were read from the message file.
David Bremner [Sat, 3 Aug 2013 11:29:40 +0000 (08:29 -0300)]
release: synchronize dates
man pages, NEWS, and debian changelog all hardcode date. Make them
hardcode the same date.
Mark Walters [Wed, 31 Jul 2013 18:39:05 +0000 (19:39 +0100)]
emacs: bugfix attachment content-type as mime-type handling
Notmuch puts attachments in as declared content-type except when the
content-type is application/octet-stream it tries to guess the type
from the filename/extension. This means that viewing a pdf (for
example) which is sent as application/octet-strem invokes the pdf
viewer rather than just offering to save the part.
Recent changes to the attachment handling (commit
1546387d) changed
(broke) this. This patch stores the calculated mime-type with the part
and changes the attachment part handlers can use it instead.
David Bremner [Sun, 28 Jul 2013 17:08:00 +0000 (14:08 -0300)]
debian: rename notmuch-ruby to ruby-notmuch
This seems more in line with
http://wiki.debian.org/Teams/Ruby/Packaging#Guidelines_for_Ruby_packaging
David Bremner [Sun, 28 Jul 2013 16:48:02 +0000 (13:48 -0300)]
debian: build notmuch-vim again
Based on id:
1370220299-14722-1-git-send-email-felipe.contreras@gmail.com
Hacked rather extensively by db. The most important changes:
- bring back notmuch.yaml for the (debian specific?) vim-addons
tool.
- depend on vim-ruby, so we get a version of vim with ruby installed.
David Bremner [Sun, 28 Jul 2013 14:08:50 +0000 (11:08 -0300)]
debian: update symbols for libnotmuch
Adding a new symbol should require an SONAME bump.
David Bremner [Sun, 28 Jul 2013 13:57:45 +0000 (10:57 -0300)]
debian: add alot to recommends
Since this is in a disjunction, this should not force new packages to
be installed, but rather let people with auto-install-recommends (the
default) on install notmuch without emacs.
David Bremner [Sun, 28 Jul 2013 13:54:30 +0000 (10:54 -0300)]
debian: note that we now provide a notmuch-dbg package
This is already in upstream for a bit, but we lacked a changelog entry
closing the bug.
David Bremner [Sun, 28 Jul 2013 13:49:49 +0000 (10:49 -0300)]
debian: close bug requesting packaging of notmuch-deliver
notmuch insert is pretty much equivalent, so no need to support both.
David Bremner [Sun, 28 Jul 2013 13:22:52 +0000 (10:22 -0300)]
debian: start new changelog entry
Since Debian uses the changelog as metadata, we need an empty stanza
to build the new version.
David Bremner [Sun, 28 Jul 2013 14:18:48 +0000 (11:18 -0300)]
version: set new version and release date
These are manually set in version and NEWS, and propagate to the other files via
"make update-versions"
Austin Clements [Sun, 28 Jul 2013 04:16:01 +0000 (00:16 -0400)]
Put 0.16 NEWS in a reasonable order
The 0.16 NEWS grew chronologically during development, and as a result
wound up in a particularly odd order. This rearranges it to put the
most user-visible news first. Roughly: new features, modified
behavior, bug fixes, then deprecation, with related items grouped.
This does not modify the text of any of the news.
Mark Walters [Thu, 4 Jul 2013 22:18:19 +0000 (23:18 +0100)]
emacs: hello: make --batch error gracefully
Recently notmuch-hello was converted to use batch count. However, it
seems that several people run different versions of notmuch-emacs and
notmuch-cli so this batch makes emacs fail with an error message if
--batch is not available in the CLI.
Amended by: db
Austin Clements [Mon, 22 Jul 2013 02:52:00 +0000 (22:52 -0400)]
emacs: News for S-expressions everywhere
Update the news about search using S-expression support to also say
that show is also now faster.
Mark Walters [Thu, 4 Jul 2013 07:09:48 +0000 (08:09 +0100)]
contrib: pick: use notmuch-start-notmuch
This uses the new notmuch-start-notmuch function which should give
better handling of stderr and errors generally.
Jameson Graef Rollins [Fri, 19 Jul 2013 15:36:12 +0000 (08:36 -0700)]
crypto: return NULL cryptoctx if protocol string is empty.
Badly formed messages that don't specify a protocol in
signed/encrypted parts, end up with a protocol of NULL. strcasecmp in
notmuch_crypto_get_context then segfaults when trying to check it
against known protocols. If the protocol is NULL, just return an
empty context immediately (with appropriate message.)
Tomi Ollila [Sat, 13 Jul 2013 08:46:23 +0000 (11:46 +0300)]
NEWS: Python bindings: Fix loading of libnotmuch on OS X (Darwin)
Tomi Ollila [Sat, 6 Jul 2013 12:49:51 +0000 (15:49 +0300)]
emacs: dropped rest of now-unused JSON functionality
Notmuch cli provides all structured data previously provided
in json format now in s-expression format, rendering all current
json functionality obsolete.
Peter Wang [Sat, 6 Jul 2013 02:36:28 +0000 (12:36 +1000)]
NEWS: announce insert command
Daniel Kahn Gillmor [Fri, 19 Jul 2013 20:50:09 +0000 (16:50 -0400)]
debian: Add package for debugging symbols (Closes: #717339)
Tomi Ollila [Tue, 25 Jun 2013 14:36:56 +0000 (17:36 +0300)]
Python bindings: CDLL("libnotmuch.3.dylib") on Darwin
Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib"
instead of "libnotmuch.so.3" if that is the case.
Mark Walters [Mon, 1 Jul 2013 20:05:43 +0000 (21:05 +0100)]
contrib: pick: document several of the tree/forest insertion functions.
Mark Walters [Mon, 1 Jul 2013 20:05:42 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-message-window-kill-hook
Mark Walters [Mon, 1 Jul 2013 20:05:41 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-refresh-result
Mark Walters [Mon, 1 Jul 2013 20:05:40 +0000 (21:05 +0100)]
pick: contrib: document notmuch-pick-show-out
Mark Walters [Mon, 1 Jul 2013 07:54:03 +0000 (08:54 +0100)]
contrib: pick: remove unused function
The function notmuch-pick-show-error was used before Austin's improved
error handling. It is now redundant so remove.
Mark Walters [Mon, 1 Jul 2013 07:54:02 +0000 (08:54 +0100)]
contrib: pick: remove unused variable
This variable was needed at one point for the async parser but is not
needed anymore.
Mark Walters [Mon, 1 Jul 2013 07:54:01 +0000 (08:54 +0100)]
contrib: pick: bugfix: make the right variable buffer-local
The variable notmuch-pick-message-buffer should be buffer local but
instead notmuch-pick-message-buffer-name (a non-existent variable) was
made buffer local.
Mark Walters [Mon, 1 Jul 2013 07:54:00 +0000 (08:54 +0100)]
contrib: pick: add docstrings to all defvars
Mark Walters [Mon, 1 Jul 2013 07:53:59 +0000 (08:53 +0100)]
contrib: pick: add a docstring for the main notmuch-pick function
Mark Walters [Sun, 30 Jun 2013 08:55:12 +0000 (09:55 +0100)]
contrib: pick: fix refresh result
The function notmuch-pick-refresh-result (used to update tag changes)
was not quite correct: sometimes it got the choice between the subject
and " ..." wrong. This was always true but the new code often calls
this (when opening a message in the message pane to remove the unread
tag) while the async pick process is still running and this caused
mistakes which made the tests fail.
Thus we store the previous subject with the message.
Mark Walters [Sun, 30 Jun 2013 08:55:11 +0000 (09:55 +0100)]
contrib: pick: remove hack notmuch-pick-show-match-message-with-wait
This function was a horrible hack (sleeping while waiting for the
correct message). The new target code can just open the message in the
message window when it arrives.
Mark Walters [Sun, 30 Jun 2013 08:55:10 +0000 (09:55 +0100)]
contrib: pick: if no target specified go to first matching message
Peter Wang [Sun, 23 Jun 2013 04:24:05 +0000 (14:24 +1000)]
test: test insert --create-folder option
Add tests for notmuch insert --create-folder option.
Peter Wang [Sun, 23 Jun 2013 04:24:04 +0000 (14:24 +1000)]
man: document insert --create-folder
Add documentation for notmuch insert --create-folder option.
Peter Wang [Sun, 23 Jun 2013 04:24:03 +0000 (14:24 +1000)]
insert: add --create-folder option
Allow the insert command to create the maildir folder
into which the new message should be delivered.
Peter Wang [Sun, 23 Jun 2013 04:24:02 +0000 (14:24 +1000)]
test: test insert --folder option
Add tests for notmuch insert --folder option.
Peter Wang [Sun, 23 Jun 2013 04:24:01 +0000 (14:24 +1000)]
man: document insert --folder option
Add documentation for notmuch insert --folder option.
Peter Wang [Sun, 23 Jun 2013 04:24:00 +0000 (14:24 +1000)]
insert: add --folder option
Allow the new message to be inserted into a folder within the Maildir
hierarchy instead of the top-level folder.
Peter Wang [Sun, 23 Jun 2013 04:23:59 +0000 (14:23 +1000)]
test: add tests for insert
Add tests for new 'insert' command.
Peter Wang [Sun, 23 Jun 2013 04:23:58 +0000 (14:23 +1000)]
man: reference notmuch-insert.1
Add references to notmuch-insert.1 from other man pages.
Peter Wang [Sun, 23 Jun 2013 04:23:57 +0000 (14:23 +1000)]
man: document 'insert' command
Add initial documentation for notmuch insert command.
Peter Wang [Sun, 23 Jun 2013 12:20:45 +0000 (22:20 +1000)]
cli: add insert command
The notmuch insert command reads a message from standard input,
writes it to a Maildir folder, and then incorporates the message into
the notmuch database. Essentially it moves the functionality of
notmuch-deliver into notmuch.
Though it could be used as an alternative to notmuch new, the reason
I want this is to allow my notmuch frontend to add postponed or sent
messages to the mail store and notmuch database, without resorting to
another tool (e.g. notmuch-deliver) nor directly modifying the maildir.
Peter Wang [Sun, 23 Jun 2013 04:23:55 +0000 (14:23 +1000)]
tag-util: do not reset list in parse_tag_command_line
The 'insert' command will be better served if parse_tag_command_line
modifies a pre-populated list (of new.tags) instead of clobbering the
list outright. The sole existing caller, notmuch_tag_command, is
unaffected by this change.
Peter Wang [Sun, 23 Jun 2013 04:23:54 +0000 (14:23 +1000)]
tag-util: move out 'tag' command-line check
Move an error condition specific to the 'tag' command out of
parse_tag_command_line so that parse_tag_command_line can be used for
the forthcoming 'insert' command.
Mark Walters [Mon, 3 Jun 2013 22:06:09 +0000 (23:06 +0100)]
contrib: pick: remove reference to inbox in docstring
Copy the recent changes in show to use just notmuch-archive-tags (as a
link) rather than saying '(defaults to "inbox")'.
Austin Clements [Sun, 23 Jun 2013 23:43:19 +0000 (19:43 -0400)]
emacs: Remove `notmuch-call-notmuch-json'
This function is no longer used.
Austin Clements [Sun, 23 Jun 2013 23:43:18 +0000 (19:43 -0400)]
emacs: Use S-exp format everywhere
This switches `notmuch-mua-reply' and `notmuch-query-get-threads' to
the S-exp format. These were the last two uses of the JSON format in
the Emacs frontend.
Austin Clements [Sun, 23 Jun 2013 23:43:17 +0000 (19:43 -0400)]
emacs: Introduce `notmuch-call-notmuch-sexp'
This is just like `notmuch-call-notmuch-json', but parses S-expression
output. Note that, also like `notmuch-call-notmuch-json', this
doesn't consider trailing data to be an error, which may or may not be
what we want in the long run.
Peter Wang [Sat, 11 May 2013 19:50:09 +0000 (20:50 +0100)]
cli: use notmuch_exclude_t in option parser
Use notmuch_exclude_t constants directly instead of a redundant
enumeration while parsing search --exclude keyword arguments.
Mark Walters [Mon, 13 May 2013 15:10:51 +0000 (16:10 +0100)]
lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t
Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can
cover all four values of search --exclude in the cli.
Previously the way to avoid any message being marked excluded was to
pass in an empty list of excluded tags: since we now have an explicit
option we might as well honour it.
The enum is in a slightly strange order as the existing FALSE/TRUE
options correspond to the new
NOTMUCH_EXCLUDE_FLAG/NOTMUCH_EXCLUDE_TRUE options so this means we do
not need to bump the version number.
Indeed, an example of this is that the cli count and show still use
FALSE/TRUE and still work.
Tomi Ollila [Fri, 31 May 2013 19:10:31 +0000 (22:10 +0300)]
revert: Removed top level --stderr= option
While looked good on paper, its attempted use caused confusion, complexity,
and potential for information leak when passed through wrapper scripts.
For slimmer code and to lessen demand for maintenance/support the set of
commits which added top level --stderr= option is now reverted.
Austin Clements [Mon, 3 Jun 2013 15:54:55 +0000 (11:54 -0400)]
emacs: Remove v command
This removes the v command, since we now have much nicer part commands,
and deprecates the underlying notmuch-show-view-all-mime-parts. This
also means that people who try using the old unprefixed 'v' command on
a part button will no longer be greeted by ALL of their parts popping
up.
Jani Nikula [Mon, 3 Jun 2013 17:56:31 +0000 (20:56 +0300)]
emacs: update search sort order help to match code
Tomi Ollila [Fri, 7 Jun 2013 21:37:29 +0000 (00:37 +0300)]
test/basic: replaced find -perm +111 with portable alternative
The find option syntax `-perm +111` is deprecated gnu find feature.
The replacement `( -perm -100 -o -perm -10 -o -perm 1 )` should also
work outside of the GNU domain.
Mark Walters [Sun, 9 Jun 2013 08:41:48 +0000 (09:41 +0100)]
emacs: show: change emacs interactive pipe message.
Previously the query string for piping a message to a command was
"Pipe message to command: " regardless of whether the function was
called with a prefix argument (which pipes all open messages to the
command). This patch modifies the `interactive' command to reflect
this.
Mark Walters [Mon, 10 Jun 2013 04:57:13 +0000 (05:57 +0100)]
emacs: show: implement lazy hidden part handling
This adds the actual code to do the lazy insertion of hidden parts.
We use a memory inefficient but simple method: when we come to insert
the part if it is hidden we just store all of the arguments to the
part insertion function as a button property. This means when we want
to show the part we can just resume where we left off.
One thing is that we can't tell if a lazy part will produce text until
we try to render it so when unhiding a part we check to see if it
rendered; if not we invoke the default part handler (e.g. an external
viewer).
Also, we would like to insert the lazy part at the start of the line
after the part button. But if this line has some text properties
(e.g. the colours for a following message header) then the lazy part
gets these properties. Thus we start at the end of the part button
line, insert a newline, insert the lazy part, and then delete the
extra newline at the end of the part.
Mark Walters [Mon, 10 Jun 2013 04:57:12 +0000 (05:57 +0100)]
emacs: show move addition of :notmuch-part to separate function
This separates out the adding of the :notmuch-part text property to a
separate function to simplify calling from the lazy part insertion
code.
Mark Walters [Mon, 10 Jun 2013 04:57:11 +0000 (05:57 +0100)]
emacs: show: modify the way hidden state is recorded.
Previously, whether a part was hidden or shown was recorded in the
invisibility/visibility of the part overlay. Since we are going to
have lazily rendered parts with no overlay store the hidden/shown
state in the part button itself.
Additionally, in preparation for the invisible part handling move the
actual hiding of the hidden parts to insert-bodypart from
create-part-overlays.
Finally, we will need to know whether a part-insertion has done
anything (it won't if the invisible part cannot be displayed by emacs)
so we slightly rejig the code order in
notmuch-show-toggle-part-invisibility to make it easier for the
function to set an appropriate return value.
Mark Walters [Mon, 10 Jun 2013 04:57:10 +0000 (05:57 +0100)]
emacs: show: pass button to create-overlays
Now that the bodypart code has the button we can pass that to
create-overlays and simplify that.
Mark Walters [Mon, 10 Jun 2013 04:57:09 +0000 (05:57 +0100)]
emacs: show: move the insertion of the header button to the top level
Previously each of the part insertion handlers inserted the part
button themselves. Move this up into
notmuch-show-insert-bodypart. Since a small number of the handlers
modify the button (the encryption/signature ones) we need to pass the
header button as an argument into the individual part insertion
handlers. However, the declared-type argument was only used for the
text for the part buttons we can now omit it.
The patch is large but mostly simple. The only things of note are that
we let the text/plain handler applies notmuch-wash to the whole part
including the part button. In particular, notmuch-wash removes leading
blank lines from a text/plain part, but since the button is counted as
part of the part this does not happen with text/plain buttons that
have a button. This is probably a bug in notmuch-wash but changing it
does make several tests fail (that rely on this blank line) so, for
the moment, keep the old behaviour.
Mark Walters [Mon, 10 Jun 2013 04:57:08 +0000 (05:57 +0100)]
emacs: show: fake wash parts are handled at insert-bodypart level
Earlier patches have moved the handling of wash fake inline patch
parts to insert-bodypart so we can drop the function
notmuch-show-insert-part-inline-patch-fake-part
Austin Clements [Sun, 9 Jun 2013 04:45:38 +0000 (00:45 -0400)]
emacs: Fix "no such file or directory" error
Occasionally, when the user killed the search buffer when the CLI
process was still running, Emacs would run the
notmuch-start-notmuch-sentinel sentinel twice. The first call would
process and delete the error output file and the second would fail
with an "Opening input file: no such file or directory, ..." error
when attempting to access the error file.
Emacs isn't supposed to run the sentinel twice. The reason it does is
rather subtle (and probably a bug in Emacs):
1) When the user kills the search buffer, Emacs invokes
kill_buffer_processes, which sends a SIGHUP to notmuch, but doesn't do
anything else. Meanwhile, suppose the notmuch search process has
printed some more output, but Emacs hasn't consumed it yet (this is
critical and is why this error only happens sometimes).
2) Emacs gets a SIGCHLD from the dying notmuch process, which invokes
handle_child_signal, which sets the new process status, but can't do
anything else because it's a signal handler.
3) Emacs returns to its idle loop, which calls status_notify, which
sees that the notmuch process has a new status. This is where things
get interesting.
3.1) Emacs guarantees that it will run process filters on any
unconsumed output before running the process sentinel, so
status_notify calls read_process_output, which consumes the final
output and calls notmuch-search-process-filter.
3.1.1) notmuch-search-process-filter checks if the search buffer is
still alive and, since it's not, it calls delete-process.
3.1.1.1) delete-process correctly sees that the process is already
dead and doesn't try to send another signal, *but* it still modifies
the status to "killed". To deal with the new status, it calls
status_notify. Dun dun dun. We've seen this function before.
3.1.1.1.1) The *recursive* status_notify invocation sees that the
process has a new status and doesn't have any more output to consume,
so it invokes our sentinel and returns.
3.2) The outer status_notify call (which we're still in) is now done
flushing pending process output, so it *also* invokes our sentinel.
This patch addresses this problem at step 3.1.1, where the filter
calls delete-process, since this is a strange and redundant thing to
do anyway.
Austin Clements [Sun, 9 Jun 2013 04:45:37 +0000 (00:45 -0400)]
emacs: Don't report CLI signals sent by Emacs as errors
Previously, when the user killed the search buffer before the CLI
search process had completed, we would report the signal sent by Emacs
to kill the CLI to the user as an error. Fix this by only reporting
error exits if the process buffer is still live. We still report
stderr output regardless in case stderr output was relevant to why the
user killed the search buffer (such as a wrapper script being stuck).
Tomi Ollila [Fri, 7 Jun 2013 18:41:13 +0000 (21:41 +0300)]
cli: Guard deprecated g_type_init calls
g_type_init was deprecated in GLib 2.35.1. In order to compile
cleanly, guard these with a suitable #if.
(commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )
Servilio Afre Puentes [Fri, 7 Jun 2013 20:57:46 +0000 (16:57 -0400)]
emacs: hello: allow deleting individual searches in the history
This commit adds an extra button at the end of the search entries that
allows deleting that individual search from the history. A short
confirmation («y» or «n») is made before taking action.
Servilio Afre Puentes [Fri, 7 Jun 2013 20:55:57 +0000 (16:55 -0400)]
emacs: hello: ask confirmation for clearing recent searches
The button to clear the recent searches in notmuch-hello is easy to
press accidentally while moving around the, clearing potentially
useful searches with no way of recovering them.
Jameson Graef Rollins [Sat, 1 Jun 2013 16:27:23 +0000 (09:27 -0700)]
debian: update build dependency to require ruby-dev 1:1.9.3
ruby1.8-dev provides ruby-dev, but ruby1.9.1-dev is currently
required (which is pulled by ruby-dev 1:1.9.3).
Mark Walters [Mon, 3 Jun 2013 22:05:45 +0000 (23:05 +0100)]
contrib: pick: remove unnecessary funcall
Remove unnecessary funcall. This keeps the pick function inline with
the recently tweaked show function.
Austin Clements [Mon, 3 Jun 2013 16:39:55 +0000 (12:39 -0400)]
news: Be louder about s/v/o/| on part buttons going away
This change is likely to affect most people, so put this information
right in the news header and be more explicit about it in the news
detail.
Austin Clements [Mon, 3 Jun 2013 15:17:59 +0000 (11:17 -0400)]
emacs: Fix applying stickiness to the :notmuch-part property
Previously, we simply called pushnew to add :notmuch-part to the
front-sticky and rear-nonsticky text property lists. This works if
these are nil or lists, but they can also have the value t, meaning
that all properties are front-sticky/rear-nonsticky. In this case,
pushnew will signal an error because t is not a list. We never set
these properties to t ourselves, but since we apply these property
changes over arbitrary renderer output, we have to deal with this
possibility.
David Bremner [Sun, 2 Jun 2013 13:39:46 +0000 (10:39 -0300)]
bindings/go: Start a .gitignore for go bindings.
In particular ignore downloaded source from github.com
David Bremner [Sun, 2 Jun 2013 13:39:44 +0000 (10:39 -0300)]
bindings/python: ignore build subdirectory.
Update .gitignore to make git status less noisy
Felipe Contreras [Mon, 3 Jun 2013 00:49:49 +0000 (19:49 -0500)]
vim: use the old vim plugin function name
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Felipe Contreras [Mon, 3 Jun 2013 00:39:27 +0000 (19:39 -0500)]
NEWS: update news about the vim interface
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>