Commit graph

827 commits

Author SHA1 Message Date
Carl Worth
ba12bf1f26 lib: Abstract the extraction of a relative path from set_filename
We'll soon be having multiple entry points that accept a filename
path, so we want common code for getting a relative path from a
potentially absolute path.
2010-01-06 10:32:05 -08:00
Carl Worth
3a9c3ec9e7 notmuch new: Remove hack to ignore read-only directories in mail store.
This was really the last thing keeping the initial run of "notmuch
new" being different from all other runs. And I'm taking a fresh
look at the performance of "notmuch new" anyway, so I think we can
safely drop this optimization.
2010-01-06 10:32:05 -08:00
Carl Worth
8c6b7d311c lib: Add missing value to notmuch_private_status_t enum.
And fix the initialization such that the private enum will always have
distinct values from the public enum even if we similarly miss the
addition of a new public value in the future.
2010-01-06 10:32:05 -08:00
Carl Worth
e1669b155c notmuch new: Restrict the "not much" pun to the first run.
Several people complained that the humor wore thin very quickly.  The
most significant case of "not much mail" is when counting the user's
initial mail collection. We've promised on the web page that no matter
how much mail the user has, notmuch will consider it to be "not much"
so let's say so. (This message was in place very early on, but was
inadvertently dropped at some point.)
2010-01-06 10:32:05 -08:00
Carl Worth
3f406fdefc configure: Look for both Xapian 1.1 and 1.0 and allow user override.
The in-development version of Xapian provides a config program named
xapian-config-1.1 while the released version provides a program named
xapian-config instead. By default, we now try each of these in turn,
and we also allow the user to set a XAPIAN_CONFIG environment variable
to explicitly specify a particular program.
2010-01-06 10:31:09 -08:00
Carl Worth
dac01ec520 emacs: Add instructions to the hidden citations/signatures.
We've received a user report that the hidden citations were annoying
since the user couldn't tell what was being referred to by subsequent
text. Apparently it wasn't obvious enough that the hidden citation
could be revealed by clicking or by pressing Enter. So make the button
text say as much.
2009-12-11 15:54:53 -08:00
Carl Worth
19e8ad6393 emacs: Don't insert extra line after citations.
This extra line had been annoying me for a while, so I'm glad to see
it go away.
2009-12-11 15:54:53 -08:00
Carl Worth
2e3d07b8d5 emacs: Don't regard a manually indented '>' as introducing a citation.
In the message mentioned in the previous commit, an ASCII diagram was
included in which '>' was used as the first non-whitespace character
in a line. Notmuch previously (and mistakenly) regarded this as a
citation.

We fix this by only regarding a '>' in the first column of an email as
introducing a citation.
2009-12-11 15:54:53 -08:00
Carl Worth
8d2f19b896 emacs: Avoid infinite loop when marking up citations.
Thanks to Dirk Hohndel for reporting the bug. The infinite loop was first
noticed in the following message (available from the Linux kernel mailing list):

	alpine.LFD.2.00.0912081304070.3560@localhost.localdomain

Note that the bug does not show up when viewing the message in
isolation---the bug was triggered only when viewing this file indented
to a depth of at least 13.

The fix is simply to use a marker rather than an integer position when
recording a point we plan to move back to later, (since inserting the
indented button causes the buffer position of the desired marker to
change).
2009-12-11 15:54:45 -08:00
Keith Amidon
0d340415c9 Expand scope of items considered when saving attachments
Previously only mime parts that indicated specified a "disposition" of
"attachment" were saved.  However there are time when it is important
to be able to save inline content as well.  After this commit any mime
part that specifies a filename will be considered when saving
attachments.
2009-12-10 16:26:24 -08:00
Carl Worth
4aff2ca55b emacs: Fix '+' and '-' in case of thread no longer matching current search.
Similar to the way thread-viewing was broken after a thread was
archived, (and recently fixed), tag manipulation has also been broken
when the thread no longer matches the current search.

This also means that the behavior of '+' and '-' are now different
than that of '*'. The '+' and '-' bindings now return to the previous
behavior old affecting all messages in the thread, (and not simply
those matching the search).

I actually prefer this behavior, since otherwise a '-' operation on a
thread might not actually remove the tag from the thread, (since it
could operate on a subset of the thread and not hit all messages with
the given tag).

So I'd now like to fix '*' to be consistent with '+' and '-', for
which we add an item to TODO.
2009-12-10 10:35:18 -08:00
David Bremner
0a53a1d1d7 notmuch.el: patch notmuch-show to call notmuch show without query-context (i.e. without tag:inbox) if the first query returns nothing.
This fixes the annoying bug of archiving a thread, and then going back
to open it and getting an error.  It needs the notmuch-show API
changing patch of 1259979997-31544-3-git-send-email-david@tethera.net.
2009-12-10 10:29:36 -08:00
David Bremner
5e8ce15bfb notmuch-show: add optional argument for query context instead of using global binding notmuch-search-query-string
Also modify the one call to notmuch-show in notmuch.el.  This makes
the call (notmuch-show thread-id) will work when there is no binding
for notmuch-search-query-string; e.g. when called from user code
outside notmuch.
2009-12-10 10:29:27 -08:00
David Bremner
764e686f8f notmuch-search-process-filter: add text properties for authors and subject to each line
Add functions notmuch-search-find-authors and notmuch-find-subject to
match notmuch-find-thread-id.  These functions are just a wrapper
around get-text-property, but in principle that could change.
2009-12-10 10:28:20 -08:00
Carl Worth
6f1173c0e4 TODO: Add idea for an --exclude-threads options to "notmuch search".
This would provide support for "muted" threads, as well as allowing for negative
filtering based on messages not matched by the original search, (but present in
threads that do have at least one matched message).
2009-12-09 14:03:03 -08:00
Fernando Carrijo
db68eea013 Nuke the remainings of _notmuch_message_add_thread_id.
The function _notmuch_message_add_thread_id has been removed
from the private interface of notmuch. There's no reason for
one to keep a declaration of its prototype in the code base.
Also, lets update a commentary that referenced that function
and escaped from previous scrutiny.

Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
2009-12-09 12:09:55 -08:00
Carl Worth
cface5fda7 TODO: Note that we should report when two "copies" of a message differ.
Marten Veldthuis pointed out on the mailing list that intentional
spoofing is something that the user should be told about.
2009-12-08 22:12:43 -08:00
Carl Worth
ed10054829 Revert "Add some very rudimentary support for handling html parts"
This reverts commit ed16edc94d.

The performance hit is just far too severe, (threads with many HTML
messages make emacs stop and pause for seconds before displaying the
thread even if most of the HTML messages are entirely hidden).
2009-12-07 09:35:46 -08:00
Jameson Graef Rollins
263aeb82f0 fix Makefile.local to install bash completion definitions as not executable 2009-12-04 16:14:39 -08:00
Carl Worth
59265c0233 Makefile: Mention "./configure --help" now that it exists.
Since we're directing the user to ./confgiure for more options,
actually tell the user how to discover what those options are.
2009-12-04 16:09:40 -08:00
Carl Worth
e50461eb84 configure: Implement a --help option to document --prefix.
Also document that values for CC, CFLAGS, etc. can be specified
via environment variables.
2009-12-04 16:05:12 -08:00
Carl Worth
40e584ecfc Makefile: Silence compiler errors during dependency generation.
We have a bootstrapping issue with our dependency generation. When the
Makefile.config doesn't exist yet, the complete compilation flags are
not yet available for passing to the compiler to generate the
dependencies.

But we don't have explicit rules to create these dependency files,
(just the implicit rule that is created by the -include), so we can't
control when make will attempt to create them.

We do have a dependency of the dependency files on Makefile.config, so
make should eventually call the compiler with the correct flags and
everything should be good. So in the meantime, silence any complaints.
2009-12-04 15:40:54 -08:00
Carl Worth
4b0327004a Makefile: Inform user that they might want to call ./configure explicitly.
If the Makefile does this for the user, then no arguments are passed. So
it's only polite to let the user know that it's possible to get pass those
arguments.
2009-12-04 15:32:05 -08:00
Carl Worth
943f415f81 configure: Support the capturing of CFLAGS and CXXFLAGS at configure time.
These variables can now be set via configure time via environment
variables like so:

	CFLAGS=-g ./configure

and subsequent builds will remember these values. The values can
still be overridden at compile time by passing make variables:

      make CFLAGS=-O2

The CXXFLAGS variable is optional. If unset at either configure
time or at compile time, it will inherit its value from the
CFLAGS variable. (Though if explicitly set at configure time
it must be explicitly overriden at compile time---just overriding
CFLAGS will not override CXXFLAGS as well.)
2009-12-04 15:20:12 -08:00
Carl Worth
c7f971e8c0 Fix quiet compilation to print the user's CFLAGS, CXXFLAGS, LDFLAGS.
The only reason I ever call "make V=1" myself, (other than when
debugging the compiler command-line for some reason), is to ensure
whether my CFLAGS, (like "-g -O0" or "-O2"), are actually making it to
the command-line.

But these are hard to find in the V=1 output, and really, we should
just print these even in the quiet case. So do that.
2009-12-04 15:08:37 -08:00
Carl Worth
9ea8bb11d4 TODO: Note about adding "notmuch search --matching"
This bug was recently discussed on the mailing list:

	id:878wdifu13.fsf@yoom.home.cworth.org

so note one idea for fixing it.
2009-12-04 14:52:32 -08:00
Carl Worth
5022424cf3 Fix option parsing for the case of a value with '='.
To support this we need to match the longest-possible suffix and then
strip the shortest-possible prefix.
2009-12-04 14:52:10 -08:00
Jameson Graef Rollins
2c2b31d536 Fix configure script to handle --prefix=
Reviewed-by: Carl Worth <cworth@cworth.org>:

This is really the fundamental thing that people expect a configure
script to do, so it's important to support it.
2009-12-04 14:48:38 -08:00
Dirk-Jan C. Binnema
926c71e6b9 * notmuch-config: fix small leak from 'g_key_file_to_data'
Signed-off-by: Dirk-Jan C. Binnema <djcb.bulk@gmail.com>
2009-12-04 11:16:26 -08:00
Jed Brown
ea4cb3cbdc Make search filters handle disjunctive queries.
notmuch-search-filter now accepts an arbitrary query and will group if
necessary so that we get

  tag:inbox AND (gravy OR biscuits)

instead of the former

  tag:inbox AND gravy OR biscuits

Signed-off-by: Jed Brown <jed@59A2.org>
2009-12-04 11:11:59 -08:00
Jeffrey C. Ollie
95f97540a0 Remove unused notmuch_parse_date function prototype.
notmuch_parse_date is not implemented, so remove the unused function
prototype.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-12-03 17:07:22 -08:00
Carl Worth
b86e30be06 configure: Tweak the working of the example commands slightly.
Basically just getting better parallelism between the descriptions of
the Defora and Debian commands. (And fixing a nearby typo.)
2009-12-03 16:53:55 -08:00
Jeffrey C. Ollie
8696882443 Add some text to configure on how to install dependencies with yum.
Add some text on how to install dependencies with yum for Fedora or
other systems that use yum for package management.  Since the named of
the required packages on Fedora are slightly different from Debian
this will help get new users of notmuch that use Fedora going quicker.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2009-12-03 16:48:42 -08:00
Kan-Ru Chen
c8b50eee28 notmuch-reply: Display reply message part using UTF-8.
Pass the message through the charset filter so that we can view
messages wrote in different charset encoding.

Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
2009-12-03 16:47:47 -08:00
Bart Trojanowski
0ca1611416 vim: preserve the 'show everything' flag when finding next/prev buffer
When show mode is invoked it could be displaying just the matched messages
or everything.  This flag is passed to NM_search_show_thread().  It is then
stored in a buffer variable, b:nm_show_everything, and used for subsequent
calls to NM_search_show_thread() triggered by <Space>, <C-n> and <C-p>.

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-12-03 13:30:21 -08:00
Carl Worth
0ed126fe19 emacs: Open only matched (and unread) messages when displaying a thread.
This is the long-awaited feature that when viewing a thread resulting
from a search, only the messages that actually match the search will
be opened initially (in addition to unread messages).

So now, it's finally useful to tag a single message in a giant thread,
and then do a search later and easily find just the single tagged
message.
2009-12-03 11:38:05 -08:00
Carl Worth
11490cfebe emacs: Make message-summary button extend to very beginning of message.
There's no visible change here---we're just making the button extend
through the invisible portions of the message before the
message-summary line. The reason this is important is that it's easy
for the user to position point at the (invisible) `point-min', so we
want to ensure that there's a valid button there.
2009-12-03 11:34:01 -08:00
Alexander Botero-Lowry
8e126fe1fb Since we know what these buttons do it seems like the underlines are
unnecessary.
2009-12-03 11:29:35 -08:00
Carl Worth
a0439ded70 emacs: notmuch-fontify-headers: Remove unneeded progn and indent correctly.
The defun special form doesn't require a progn. And the remainder
of the function was previously indented in a misleading way, (as
if each "if" was always evaluated, rather than each only being
evaluated if all the previous evaluated to nil).
2009-12-03 11:29:35 -08:00
Carl Worth
fcc36df1fa emacs: Make message-summary button begin at beginning of line.
Otherwise, RET is unreliable for opening/closing messages when
navigating through messages with 'n' and 'p'.
2009-12-03 11:29:35 -08:00
Carl Worth
6945e7e103 emacs: Highlight message-summary with background-color instead of inverse video.
Also, do this with a notmuch-message-summary-face variable so that
the user can easily customize the desried effect.
2009-12-03 11:29:35 -08:00
Carl Worth
682102c2df emacs: Make the message-summary highlighting extend to end of visible line.
This will look much nicer than the highlighting terminating at the
end of the summary text.
2009-12-03 11:29:35 -08:00
Carl Worth
e1f05f1c20 emacs: Fix notmuch-show-next-open-message.
This function was still implemented in terms of the old, global toggle
for visibility of unread messages, (which no longer exists). Fix it to
use the local 'invisibility-spec property on the button controlling
message visibility.
2009-12-03 11:29:32 -08:00
Carl Worth
48a1b8b006 TODO, emacs: Correct a few typos.
Sometime I'll stop misspelling things so much, honets.
2009-12-03 07:30:26 -08:00
Carl Worth
656709b5ed TODO: Add some tasks, delete some tasks.
A new item from IRC discussion, (speeding up "notmuch restore"), as
well as a bug I just hit myself, (content from citations is not being
indexed).

While here, notce that several items have recently been completed ('?'
now displays documentation, not function names; we have a search
binding from notmush-show-mode; and "notmuch new" responds to SIGINT
by flushing). Finally, the item regarding optimizing chunky searching
is irrelevant since we dropped chunky searching in favor of the much
better streamed searching.
2009-12-02 17:19:27 -08:00
Carl Worth
115b7c15b8 notmuch show: Preserve thread-ordering and nesting without --entire-thread
When "notmuch show" was recently modified to not show an entire thread
by default, it also lost all capability to properly order the messages
in a thread and to print their proper depth. For example, the command:

	notmuch show thread:6d5e3e276461188c5778c9f219f63782

had dramatically different output than:

	notmuch show --entire-thread thread:6d5e3e276461188c5778c9f219f63782

even though both commands were selecting and displaying the same set
of messages. The first command would diplay them "flat", (all with
depth:0), and in strict date order; while the second command would
display them "nested" (with depth based on threading), and in thread
order.

We now fix "notmuch show" without the --entire-thread option to also
display nested and thread-ordered messages.

If some messages in the thread are not included in the displayed
results, then they are not counted when computing depth values.
2009-12-02 16:14:41 -08:00
Carl Worth
63c503a5ac notmuch.1: Document the new --entire-thread option to "notmuch show".
This was added to "notmuch help" earlier, but not to the man page.
Add it there, and use consistent wording in both places.
2009-12-02 16:14:41 -08:00
Carl Worth
4d19b89d29 emacs: Add --entire-thread option to "notmuch show" command line.
We (plan to) do any hiding of messages from within emacs, so don't
let notmuch hide messages from us.
2009-12-02 16:14:31 -08:00
Bart Trojanowski
8a3352e619 vim: use notmuch show --entire-thread 2009-12-02 14:37:15 -08:00
Bart Trojanowski
d50c67d53b notmuch show: limit display to only matching messages
This patch changes the default behaviour of notmuch show to display only
messages that match the search expression.  However, --entire-thread
option is provided to display all messages in threads that matched the
search expression.

It is deemed that will be more useful for human users on the command line.
Scripts can be modified to include the --entire-thread option so that they
can display all messages once more.

Example:

$ notmuch search subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b
thread:23d99d0f364f93e90e15df8b42eddb5b      July 31 [4/12] Johan Herland; [RFCv2 00/12] Foreign VCS helper program for CVS repositories (inbox unread)

Note that in this thread 4 out of 12 messages matched.  The default show
behaviour is to show only those messages that match:

$ notmuch show subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l
4

With the --entire-thread option the output will contain all dozen
messages:

$ notmuch show --entire-thread subject:git AND thread:23d99d0f364f93e90e15df8b42eddb5b | grep 'message{' | wc -l
12

Signed-off-by: Bart Trojanowski <bart@jukie.net>
2009-12-02 14:32:14 -08:00