Giter Site home page Giter Site logo

karelzak / mutt-kz Goto Github PK

View Code? Open in Web Editor NEW
298.0 298.0 51.0 20.73 MB

mutt-kz is DEPRECATED in favor of neomutt project.

Home Page: https://neomutt.org

License: Other

C 93.47% Shell 0.99% Groff 0.07% Perl 1.07% C++ 0.86% Yacc 0.26% Makefile 0.59% M4 2.69%

mutt-kz's People

Contributors

agriffis avatar aradici avatar aschrab avatar bcully avatar dato-uni avatar df7cb avatar dfandrich avatar dmshaw avatar erack avatar flatcap avatar grobian avatar hhorak avatar insanum avatar ivilata avatar karelzak avatar kdave avatar kees avatar kevin8t8 avatar kiryl avatar mandree avatar microe avatar mlichvar avatar olafhering avatar phloxic avatar piarres avatar reneclerc avatar rfc1036 avatar rolandrosenfeld avatar vinc17fr avatar xdgc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mutt-kz's Issues

The <next-new> command is missing

This is more like a feature request. I have the following macro in my muttrc:

macro index <tab> <change-folder><enter><next-new>

What this does is that mutt changes to the next folder which have unread mail. This works nicely using plain old folders, but the next-new command is not supported using vfolders.

Issue with certain characters not being printed correctly

For some reason it appears certain characters don't want to draw correctly for me. So I end up with subjects that wrap around and messed up display of threads, like this:

What I should see...
correct

What I get instead...
messed up

It does the same thing to dashes and apparently some other characters in subject lines as well, which doesn't get calculated into their length so then they wrap around.

All non-address headers has trailing ^M

Pager shows all header lines with trailing ^M for me. Exception is headers with addresses: mutt reformat them before showing.

It happens because mail file has "\r\n" as new line and mutt doesn't strip "\r". I tried to find right place in code to fix this, but failed.

Any ideas?

Configurable query-type

I'd love to see the notmuch-query-type being configurable (like nm_db_limit)!

Currently when querying I always have to append "&type=threads" to the search-term, which is quite cumbersome.

Other than that I'm really delighted to finally see a usable hybrid MUA! Thank you, Karel!

Error when trying to modify-labels

  • Notmuch Version: 0.11
  • OS: Mac OS X Lion
  • Mutt Debug Level: 4

Here is what I get from the mutt debug when I try the "A" command as documented. I can't actually modify any tags in mutt.

[2012-02-03 10:47:09] nm: db filename '/Volumes/notmuch/Mail'
[2012-02-03 10:47:09] nm: db open '/Volumes/notmuch/Mail'
[2012-02-03 10:47:09] nm: find message (1813492290.41510.1328135314969.JavaMail.<user>@example.com)
[2012-02-03 10:47:09] nm: db close
[2012-02-03 10:47:09] nm: tags modify done [rc=-1]
[2012-02-03 10:47:09] Faild to modify labels, aborting.
[2012-02-03 10:47:09] nm: db filename '/Volumes/notmuch/Mail'
[2012-02-03 10:47:09] nm: checking '/Volumes/notmuch/Mail/.notmuch/xapian' mtime
[2012-02-03 10:47:09] nm: check unnecessary (db=1328290324 ctx=1328291197)
[2012-02-03 10:47:09] mutt_index_menu[666]: Got op 127
[2012-02-03 10:47:09] Mailbox is unchanged.
[2012-02-03 10:47:09] nm: db filename '/Volumes/notmuch/Mail'
[2012-02-03 10:47:09] nm: checking '/Volumes/notmuch/Mail/.notmuch/xapian' mtime
[2012-02-03 10:47:09] nm: check unnecessary (db=1328290324 ctx=1328291197)
[2012-02-03 10:53:09] mutt_index_menu[666]: Got op 147
[2012-02-03 10:53:09] Mailbox is unchanged.

Mark as read when viewed

Usually, pressing "enter" to view an email means flagging it as "seen".
This is not the case on mutt-kz until I toggle the "unread" tag.

It should do this automatically.

PS: awesome job!

the indicator does not behave like mutt's when highlighting NEW email.

In Mutt, when a NEW email is highlighted in the index by the indicator, the indicator usually does not change the "boldness" of the text. This is quite important because otherwise, you don't know if the email being highlighted is new or not. Is my mutt-kz buggy?

(I'm using the version from the AUR)

Using maildir mailboxes, finding messages can cause them disappear from notmuch

I've just started looking at the mutt/notmuch fork, and I keep getting bitten
by this: the act of finding messages with e.g. vfolder-from-query can cause
them to disappear. This happens because mutt will move a message from new/
to cur/ when it is first accessed.

To see this in action, create a maildir with a single message in new/:

$ mkdir -p folder/{cur,new}
$ cat > folder/new/1:2, <<EOF
> To: [email protected]
> From: [email protected]
> Subject: this is a test
> 
> This is a test.
> EOF
$ find folder -type 1
folder/new/1:2,
$ mutt -f folder
...
$ find folder -type 1
folder/cur/1:2,

This is scary when a search first returns hundreds of results and when run just
seconds later returns only 2 results (the immediate reaction is, "what happened
to all my mail!").

I don't know if there's a non-invasive fix for this, but it would make the
behavior of mutt and notmuch much more predictable.

Warnings when building

I'm trying to package mutt-kz for Gentoo and stumbled across 2 warnings, to one I found a fix/workaround.

Warning A: mh.c

mh.c:1415:2: warning: implicit declaration of function ‘nm_update_filename’

Fix: #include "mutt_notmuch.h" in mh.c

Warning B. hcache.c

hcache.c:1153:5: warning: dereferencing type-punned pointer will break strict-aliasing rules

line 1153 is:
hcachever = *((unsigned int *)digest);

conversion from unsigned char[16] to unsigned int.
Just thought I'd let you know about this.

string limit to virtual-mailboxes is too small

this config is cut off half way through, so it misses the last half NOT tag:foo's ..

notmuch search doesn't have this problem.

"action" "notmuch://?query=tag:inbox AND ( tag:unread OR tag:flagged OR tag:todo ) NOT ( tag:deleted OR tag:KSN OR tag:syscorp OR tag:engineering-social OR tag:ops OR tag:bird- users OR tag:engineering-social OR tag:backup OR tag:archive OR tag:commits OR tag:goats OR tag:toor OR tag:nagios OR tag:caskforce OR tag:push)"

is there a fixed size buf array somewhere?

rename: No such file or directory (errno = 2)

I'm regularlly getting this error from mutt-kz:

rename: No such file or directory (errno = 2)

I was able to trigger it just now by:

  • Opening a mailbox
  • Selected a (N)ew message and deleting it (so the status was now ND)
  • Select '$' to synchronize the mailbox.

At this point mutt prints the rename error, and becomes unusable -- any attempt to change to another folder will report the error and fail. Exiting mutt is only possible via the exit command.

I'm having trouble pinning down the exact sequence of events that leads to this error, but I suspect it has to do with mutt renaming files when the status changes and notmuch not being aware of the change.

Some characters don't show up in the status & pager bars

All kinds of characters don't show up in the pager bar or in the status bar, for instance when a vfolder has an accent or when the subject has an accent. This is quite annoying for non-English email where you easily end up with such characters in the subject line.

Here's a screenshot at the bottom of the screen:
capture d cran de 2014-04-23 10 06 08

The blue rectangle is supposed to be an "é"

Cannot cancel a large notmuch query

If I by accident do a query that returns a large result (i.e. tag:inbox gives me 160.000+ hits) mutt-kz is locked for the whole period where it is reading the notmuch result printing out the progress/% done.

Would be great if I could Ctrl+C this instead of waiting and having time to open a feature request like this :)

Mac build error

==> Build Environment
CPU: quad-core 64-bit sandybridge
MacOS: 10.7.3-x86_64
Xcode: 4.3.1
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j4

I'm getting this error:

/usr/bin/clang -Wall -pedantic -Wno-long-long -Os -w -pipe -march=native -Qunused-arguments -o pgpewrap pgpewrap.o ./intl/libintl.a -liconv -lnotmuch Undefined symbols for architecture x86_64: "_strdupa", referenced from: _draw_sidebar in sidebar.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [mutt] Error 1

I'm building from d4abb43

Any suggestions ?

mutt-kz responds poorly if the notmuch database is not writeable

I have at least three things accessing the notmuch database at various times:

  • mutt-kz
  • notmuch-deliver
  • some python code using inotify to handle file renames

With only a modest amount of email I am already seeing frequent database contention problems as two programs attempt to write to the notmuch database at the same time. Mutt-kz responds poorly if the notmuch database is not writable when it attempts to make a modification. This can cause operations to fail and appears to trigger crashes on some occasions.

I'm not all that familiar with the notmuch API, but it doesn't appear to offer any sort of blocking mechanism to wait for the database to become available. This suggests that the appropriate behavior in the event of an error is to wait and retry as necessary until the operation succeeds (or until some set threshold).

any way to "reset" virtual-mailboxes?

I'd like to create a macro to reload my auto-generated virtual-mailboxes, but I'd like that macro to also be able to remove existing mailboxes that no longer need displaying. If there was a way to indicate to the virtual-mailboxes command that it should clear existing entires, that would be awesome.

mutt-kz fails with recent versions of notmuch

Using mutt-kz from HEAD (12a7ab4) and a recent version of notmuch (39beeb2a7e0e61fe2a5983e7eef9efec78e1279e), starting mutt-kz results in the following error printed continuously:

Error: Notmuch database /home/lars/Mail opened twice in same process

notmuch mailbox doesn't work when attaching messages

Hi, notmuch mailbox URL is not accepted when attaching messages to a composed message:

  1. Start composing a message
  2. Try to attach-message (default key A)
  3. Enter notmuch mailbox when mutt asks for a mailbox, e.g.: notmuch://?query=inbox
  4. Mutt fails and reports "notmuch://?query=inbox: No such file or directory (errno = 2)"

XLabel patch for mutt-kz

Hi,

I'm trying to use mutt-kz and I was wondering if the X-Label patch was available for mutt-kz ? I tried a version I add for mutt but it doesn't work on mutt-kz source code.

Thanks

mutt-kz crashes when modifying viewed virtual folder

When viewing a virtual folder (like INBOX) and changing messages in it (notmuch tag -unread -inbox ...) then the following happens:

terminate called after throwing an instance of 'Xapian::DatabaseModifiedError'
zsh: abort (core dumped) mutt
%

Garbled lines in inbox

Certain messages get a garbled line in the mailbox if the terminal window is small enough.

"entire-thread" does not always show entire thread.

If I use the entire-thread command on a message, mutt-kz will
sometimes report "no more messages in the thread" even when that is
obviously not the case. For example, I have a vfolder defined like
this:

        "Other" "notmuch://?query=tag:unread AND NOT tag:work AND tag:list &limit=500"

The first message in a thread is excluded by the tag:unread
restriction. With the second message in the thread selected,
entire-thread reports "No more messages in the thread." If I look
up the In-Reply-To header of the message and explicitly search for
that using an id: search, then of course it finds the correct
message.

I have implemented my own version of entire-thread via a script:

#!/usr/bin/python

import sys
from email.parser import Parser
from email.utils import parseaddr

parser = Parser()
msg = parser.parse(sys.stdin)
msgid = msg['message-id'][1:-1]

print 'push "<vfolder-from-query>id:%s &type=threads<return>"' % (msgid)

Which I run like this:

macro index,pager \\r "<pipe-message>~/bin/query-msgid-thread > ~/tmp/vfolderquery<enter><enter-command>source ~/tmp/vfolderquery<enter>"

This works, and delivers the entire thread to me, but it's less
convenient than the built-in entire-thread command.

Build failes with automake 1.12

Hi there,

Since upgrading automake from 1.11 to 1.12, the build fails with

configure.ac:33: error: automatic de-ANSI-fication support has been removed
/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
configure.ac:33: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

-- Koen

Abort trap 6 on OSX

Hi,

I'm getting this pretty often :-)

Process: mutt [21498]
Path: /usr/local/bin/mutt
Identifier: mutt
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [4775]

Date/Time: 2012-04-24 11:37:22.431 +0200
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Interval Since Last Report: 661479 sec
Crashes Since Last Report: 130
Per-App Crashes Since Last Report: 22
Anonymous UUID: C5345145-102F-49FD-A463-D743BA1572C9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called
objc[21498]: garbage collection is OFF
terminate called throwing an exception

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8df0082a __kill + 10
1 libsystem_c.dylib 0x00007fff8f99da9c abort + 177
2 libc++abi.dylib 0x00007fff8827c7bc abort_message + 214
3 libc++abi.dylib 0x00007fff88279fcf default_terminate() + 28
4 libobjc.A.dylib 0x00007fff8a6ca1cd objc_terminate + 114
5 libc++abi.dylib 0x00007fff8827a001 safe_handler_caller(void (
)()) + 11
6 libc++abi.dylib 0x00007fff8827a05c std::terminate() + 16
7 libc++abi.dylib 0x00007fff8827b152 _cxa_throw + 114
8 libxapian.22.dylib 0x0000000102077566 ChertTable::set_overwritten() const + 280
9 libxapian.22.dylib 0x000000010207984f ChertTable::block_to_cursor(Cursor
, int, unsigned int) const + 693
10 libxapian.22.dylib 0x000000010207b7ef ChertTable::find(Cursor*) const + 143
11 libxapian.22.dylib 0x000000010206241f ChertCursor::find_entry(std::string const&) + 155
12 libxapian.22.dylib 0x00000001020725c1 ChertPostList::move_to_chunk_containing(unsigned int) + 55
13 libxapian.22.dylib 0x0000000102072793 ChertPostList::jump_to(unsigned int) + 69
14 libxapian.22.dylib 0x0000000102072ea5 ChertPostListTable::get_doclength(unsigned int, Xapian::Internal::RefCntPtr) const + 157
15 libxapian.22.dylib 0x0000000102064b6b ChertDatabase::get_doclength(unsigned int) const + 51
16 libxapian.22.dylib 0x0000000102062fd1 ChertDatabase::open_document(unsigned int, bool) const + 35
17 libxapian.22.dylib 0x0000000102011a46 Xapian::Database::get_document(unsigned int) const + 62
18 libnotmuch.2.0.0.dylib 0x0000000101deebf6 _notmuch_database_get_directory_path + 45
19 libnotmuch.2.0.0.dylib 0x0000000101df42aa _ZL37_notmuch_message_ensure_filename_listP16_notmuch_message + 271
20 libnotmuch.2.0.0.dylib 0x0000000101df4946 notmuch_message_get_filename + 20
21 mutt 0x0000000101c35463 nm_check_database + 643 (mutt_notmuch.c:283)
22 mutt 0x0000000101bd9a80 mutt_index_menu + 720 (curs_main.c:546)
23 mutt 0x0000000101bf7786 main + 4790 (main.c:1020)
24 mutt 0x0000000101bc2e24 start + 52

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff617bf3e0 rcx: 0x00007fff617bf3c8 rdx: 0x0000000000000000
rdi: 0x00000000000053fa rsi: 0x0000000000000006 rbp: 0x00007fff617bf3f0 rsp: 0x00007fff617bf3c8
r8: 0x0000000000000012 r9: 0x0000000000000854 r10: 0x00007fff8df01e62 r11: 0xffffff80002d8220
r12: 0x00007fb412154600 r13: 0x00007fb4128fa8dc r14: 0x00007fff617bf400 r15: 0x00007fff617bf510
rip: 0x00007fff8df0082a rfl: 0x0000000000000206 cr2: 0x00007fff8a6ca15b
Logical CPU: 0

doesn't always mark -unread

I can replicate this:

  1. new email comes into new/
  2. notmuch new moves the mail to cur/
  3. press Enter to read message and unmark N
  4. if you with $ then mutt adds a S to the filename but doesn't -unread

the result is then that mutt-kz does not remove -unread

if you change to a new mailbox with X or quit mutt, then all is ok and S is added to the filename and -unread is removed.

relevant config:

 set tmpdir="/tmp"
 set mbox_type=Maildir
 set folder="~/Maildir"
 set mask="!^\\.[^.]"

 set record="~/Maildir/sent"
 set nm_record = yes
 set nm_record_tags = "-inbox sent archive"
 set nm_hidden_tags = "draft,passed"
 set nm_unread_tag = unread

 set postponed="~/Maildir/postponed"

 set nm_default_uri="notmuch:///Users/charlie/Maildir"
 set virtual_spoolfile=yes
 set sidebar_width = 22
 set sidebar_visible = yes
 color sidebar_new blue default
 color progress default magenta
 color sidebar default default
 bind index <left> sidebar-prev
 bind index <right> sidebar-next
 bind index <Esc><space> sidebar-open
 macro index B '<enter-command>toggle sidebar_visible<enter><refresh>'
 macro pager B '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
 tag-transforms "inbox"    "♠" \
                "flagged"  "⌘" \
                "unread"  "✉"   \
                "replied" "↻ "  \
                "sent"    "➥ "  \
                "todo"    "☑"   \
                "deleted" "✗" \
                "expenses" "£" \
                "invites" "CAL"

 tag-formats     "inbox"   "GI" \
                 "unread"  "GU" \
                 "replied" "GR" \
                 "sent"    "GS" \
                 "todo"    "Gt" \
                 "deleted" "GD" \
                 "invites" "Gi"

macro index A "<modify-labels-then-hide>+archive -inbox\n<sync-mailbox>"
 macro index I "<modify-labels-then-hide>-inbox\n<sync-mailbox>"
 # notmuch bindings
 macro index S "<modify-labels-then-hide>-inbox -unread +junk\n" # tag as Junk mail
 macro index - "<modify-labels>-unread\n<sync-mailbox>"               # tag as unread
 macro index \\\\ "<vfolder-from-query>"              # looks up a hand made query
 set crypt_verify_sig  = no
 set autoedit
 set charset   = "utf-8"
 set locale    = "en_US.UTF-8"
 set beep_new    = yes
 set copy    = yes
 set move    = no
 set pager_stop    = yes
 set fcc_attach
 set help                = no
 set quote_regexp  = "^([ \t]*[|>:])+"
 set check_mbox_size = yes
unset suspend
set index_format  = "%4C %Z %?GU?%GU& ? %<[1y?%<[1w?%<[1d?%[    %H:%M]&%[   %a %d]>&%[   %b %d]>&%[\'%y %b %d]>  %-16.15F %?M?(%3M)&     ? %s %* [%?g?%g?]"

 set pager_format  = "-%Z- %C/%m: %-20.20n   %s%*  -- %?g?%g? - (%P)"

 set date_format   = "!%a, %b %d, %Y at %I:%M:%S%p %Z"

 bind index <up> previous-entry
 bind index <down> next-entry

 bind pager <down> next-line
 bind pager <up> previous-line

 bind index <insert> tag-thread

change-vfolder and the order of vfolders

When I do and I press ? (or tab) then a list of all vfolders is given. But the list is sorted by the vfolder URI. It would make more sense to sort them by vfolder label or better yet, present them in the order specified in the virtual-mailboxes command.

Choosing GPG key for sender ends in a loop.

It seems that I can not encrypt messages with mutt-kz.

Once I choose sign + encrypt, it seems I'm stuck in a loop:

  1. Create an e-mail. Once written up you're at the compose screen.

  2. mutt-kz prompts me for a key to choose.

  3. I choose a key, but now warns me:

    ID has undefined validity. Do you really want to use the key? ([no]/yes)

  4. I press [y], which brings me back to the compose screen. If I press [y] again to send the mail, it starts at 2.

I've checked with mutt which worked fine: choosing the key and sending the e-mail.

toggle-label command

It would be nice to have a toggle-label command. For instance I could bind a macro to toggle a "readitlater" label. Currently I would need to bind two macros, one for +readitlater and one for -readitlater.

Xapian database lock error

If the xapian database is locked when mutt starts I get the error: "A Xapian exception occurred opening database: Unable to get write lock on /home/user/mail/.notmuch/xapian: already locked". I think the correct behaviour would be to wait on the lock for at least a few seconds, and if it fails again then exit with the error. Please note that I'm running a periodic check for new mail using "notmuch count" (about 50ms apart), and I get this very rarely.

Sidebar corrupts status line when in pager

Hi,

I have been noticing that having the sidebar turned on seems to corrupt
the status line and the screen in general. This happens only in the pager.
The following 3 images illustrates the issue.

In the index view, the status line is shown properly.
mutt-status-line-index-small

In the pager view the sidebar draws over the status line.
mutt-status-line-pager-small

With the sidebar toggled, the status line is drawn properly again in pager view.
mutt-status-line-pager-no-sidebar-small

I also notice the sidebar gets corrupted whenever some kind of message is put in by mutt in pager view. For example, I have autoview set for certain binary files like pdf. The display corruption happens when I view a message with a pdf file in pager view and scroll.
mutt-screen-corruption-small

Hopefully I have given enough information. :)

Suvayu

Add nm_exclude_tags to exclude messages with specified tags

Sometimes there is a need to exclude tags from all the searches unless search specifies them specifically. This makes use of notmuch_query_add_tag_exclude present in notmuch library.

        From c72d09ebbdf13c89539be3c7d2d28145be58a366 Mon Sep 17 00:00:00 2001
        Message-Id: <c72d09ebbdf13c89539be3c7d2d28145be58a366.1356199693.git.rprabhu@wnohang.net>
        From: Raghavendra D Prabhu <[email protected]>
        Date: Sat, 22 Dec 2012 23:35:20 +0530
        Subject: [PATCH] Add nm_exclude_tags to exclude from search messages tagged from it.

        This makes use of notmuch_query_add_tag_exclude in notmuch API, to exclude
        messages tagged with tags from nm_exclude_tags from  query results by default
        unless specified explicitly. 

        Default value: "junk"

        Signed-off-by: Raghavendra D Prabhu <[email protected]>
        ---
        globals.h      |  1 +
        init.h         |  5 +++++
        mutt_notmuch.c | 12 ++++++++++++
        3 files changed, 18 insertions(+)

        diff --git a/globals.h b/globals.h
        index 0577e6d..90f1445 100644
        --- a/globals.h
        +++ b/globals.h
        @@ -271,6 +271,7 @@ WHERE char *SmimeGetCertEmailCommand;
        #ifdef USE_NOTMUCH
        WHERE int NotmuchOpenTimeout;
        WHERE char *NotmuchDefaultUri;
        +WHERE char *NotmuchExcludeTags;
        WHERE char *NotmuchUnreadTag;
        WHERE char *NotmuchHiddenTags;
        WHERE char *VirtFolderFormat;
        diff --git a/init.h b/init.h
        index 478ea5b..fbf31a1 100644
        --- a/init.h
        +++ b/init.h
        @@ -1600,6 +1600,11 @@ struct option_t MuttVars[] = {
            ** This variable specifies the timeout for database open in seconds.
            */

        +  { "nm_exclude_tags", DT_STR,  R_NONE, UL &NotmuchExcludeTags, UL "junk" },
        +  /*
        +   ** .pp
        +   ** This variable specifies the timeout for database open in seconds.
        +   */
        { "nm_default_uri", DT_STR, R_NONE, UL &NotmuchDefaultUri, 0 },
        /*
            ** .pp
        diff --git a/mutt_notmuch.c b/mutt_notmuch.c
        index c84157a..1b0219b 100644
        --- a/mutt_notmuch.c
        +++ b/mutt_notmuch.c
        @@ -517,6 +517,8 @@ static notmuch_query_t *get_query(struct nm_ctxdata *data, int writable)
                notmuch_database_t *db = NULL;
                notmuch_query_t *q = NULL;
                const char *str;
        +   char *t, *t1;
        +   char *tag;

                if (!data)
                        return NULL;
        @@ -531,6 +533,16 @@ static notmuch_query_t *get_query(struct nm_ctxdata *data, int writable)
                if (!q)
                        goto err;

        +   if (NotmuchExcludeTags) {
        +       for (t = NotmuchExcludeTags; t; t = t1 ? t1 + 1 : 0) {
        +           if ((t1 = strchr (t, ':')) == t)
        +               continue;
        +           tag = mutt_substrdup (t, t1);
        +           notmuch_query_add_tag_exclude(q, tag);
        +           FREE (&tag);
        +       }
        +   }
        +
                notmuch_query_set_sort(q, NOTMUCH_SORT_NEWEST_FIRST);
                dprint(2, (debugfile, "nm: query succesfully initialized\n"));
                return q;
        -- 
        1.8.0.2

modify-labels should work with tagged messages

I was not able to figure out how to make it work. Maybe this does work already and I don't know? Essentially I'd like to use the ~T pattern in conjunction with modify-labels and modify-labels-then-hide to apply notmuch tag updates to multiple messages at once.

For Gmail users, this is the mutt-kz equivalent to selecting several threads in Gmail and then applying a Gmail label to them.

Sidebar displays virtual mailbox queries rather than labels

I have the following in my muttrc:

virtual-mailboxes \
  "INBOX"   "notmuch://?query=tag:inbox and not tag:archive" \
  "Important" "notmuch://?query=tag:important or tag:flagged" \
  "Alerts"  "notmuch://?query=tag:alert and not tag:archive" \

Rather than showing the mailbox titles (INBOX, Important, Alerts), the sidebar
displays the queries, which isn't particularly useful. If it helps, my sidebar
configuration comes straight from the examples:

set sidebar_width=35
set sidebar_visible=yes

bind index <left> sidebar-prev
bind index <right> sidebar-next
bind index <space> sidebar-open
bind index <Esc>S sidebar-toggle

Possible two way sync failure

Mutt is locking from time to time and the ** glibc detected *** mutt: realloc(): invalid next size: 0x00000000048fc6d0 ***y option makes sync one-way only message is displaying on the terminal. It forces me to kill the xterm window and launch a new one. I do have a not-much.sh tagging script that runs via cron to properly tag messages sync'd using offlineimap if that makes a difference. I'm happy to provide any additional information that is needed to troubleshoot the issue.

use-after-free in sidebar.c

==14975==ERROR: AddressSanitizer: heap-use-after-free on address ...
READ of size 12 at 0x6040003611a9 thread T0
    #0 0x42cc15 in strlen ??:?
    #1 0x8763b5 in draw_sidebar /home/user/repos/mutt-kz/sidebar.c:340
    #2 0x50a9b8 in mutt_index_menu /scratch/repos/mutt-kz/curs_main.c:607
    #3 0x631d1d in main /scratch/repos/mutt-kz/main.c:1056
    #4 0x3193c21a04 in ?? ??:0
    #5 0x43cd2c in _start ??:?
0x6040003611a9 is located 25 bytes inside of 37-byte region ...
freed by thread T0 here:
    #0 0x42ebe4 in free ??:?
    #1 0x87510e in draw_sidebar /home/user/repos/mutt-kz/sidebar.c:304
    #2 0x50a9b8 in mutt_index_menu /scratch/repos/mutt-kz/curs_main.c:607
    #3 0x631d1d in main /scratch/repos/mutt-kz/main.c:1056
    #4 0x3193c21a04 in ?? ??:0
previously allocated by thread T0 here:
    #0 0x42ecc4 in __interceptor_malloc ??:?
    #1 0x3193c85d71 in ?? ??:0

Problematic code from sidebar.c

https://github.com/karelzak/mutt-kz/blob/master/sidebar.c#L302
https://github.com/karelzak/mutt-kz/blob/master/sidebar.c#L339

               base_name = basename(safe_path);
               free(safe_path);
               ...
                       if (sidebar_folder_depth + strlen(base_name) ...

"man 3 basename" says


char *basename(char *path);

DESCRIPTION
       ...
       These  functions may return pointers to statically allocated memory which may
       be overwritten by subsequent calls.  Alternatively, they may return a pointer
       to  some  part  of path, so that the string referred to by path should not be
       modified or freed until the pointer returned by the  function  is  no  longer
       required.

Commenting out "free(safe_path);" line is a temporary workaround which works.

I am running Fedora 18 64-bit.

Unable to compile with libnotmuch 0.6.1-1 on Ubuntu 11.10

I'm using the Ubuntu 11.10 (oneiric) version of libnotmuch-dev (0.6.1-1) and I get this error:

gcc -DPKGDATADIR=\"/usr/local/share/mutt\" -DSYSCONFDIR=\"/usr/local/etc\" -DBINDIR=\"/usr/local/bin\" -DMUTTLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H=1 -I.  -I. -I. -I./imap  -Iintl -I./intl  -Wall -pedantic -Wno-long-long -g -O2 -MT mutt_notmuch.o -MD -MP -MF .deps/mutt_notmuch.Tpo -c -o mutt_notmuch.o mutt_notmuch.c
mutt_notmuch.c: In function ‘get_nm_message’:
mutt_notmuch.c:644:3: error: too many arguments to function ‘notmuch_database_find_message’
/usr/include/notmuch.h:316:1: note: declared here
make[2]: *** [mutt_notmuch.o] Error 1
make[2]: Leaving directory `/home/alewis/sandbox/mutt-kz'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alewis/sandbox/mutt-kz'
make: *** [all] Error 2

Is there a minimum version of notmuch required? I didn't see one in the docs, but I could have missed it.

Thanks!

Sampe threading muttrc?

Hello, Wondering around on the internet for conversation-threading-mailclients using notmuch I bounced on this initiative.

I compiled mutt-kz with enable notmuch and copied and pasted some of the .muttrc, imported an INBOX in the notmuch-database, entered the nb_*-pointers and 'threading' type, pressed 'X', but I still don't get the threading shown in one of the screen-prints for mails with the same subject. Threading doesn't seem to be on in the sample .muttrc. Could you post a sample .muttrc to reach this as well?

Ordering of `virtual-mailboxes` is unpredictable.

The list of virtual-mailboxes presented by the change-vfolder command does not seem to bear any relation to the order in which the mailboxes were listed in the configuration file, nor does it appear to be alphabetical.

Having someway to present these in an explicit order would be helpful, especially for users who have a more than one or two virtual mailboxes and would like to group them for easier navigation.

Corrupt viewing of messages sometime after revision a50f8a0| and current master

I've started having issues with corrupt viewing of mail bodies in mutt-kz.
I thought at first it was offlineimap messing things up but it turned out when I used plain mutt the same messages had no problems viewing.

Also if I restarted and went back to the same message in most cases the viewing would be just fine.

I've reverted back to revision a50f8a0| which does not seem to have this issue.

Behavior of nm_exclude_tags is unclear

The documentation for nm_exclude_tags says:

 The messages tagged with these tags are excluded and not loaded
from notmuch DB to mutt unless specified explicitly.

I thought this meant that if I had:

set nm_exclude_tags = "ignore"

That I could see messages tagged ignore with a search like:

tag:ignore

But in fact this returns an empty list. This differs from how the notmuch command line tools operate, which will not exclude messages containing a tag in search.exclude_tags if that tag is included explicitly in the query.

Mutt crash with uncaught exception

I'm running the latest mutt-kz on OSX 10.9. Yesterday I upgraded Xapian from 1.2.15 to 1.2.17. Now, if I try to open mutt while another process (such as procmail) is running "notmuch insert", I get:

Reading messages... 190/3010 (6%)libc++abi.dylib: terminating with uncaught exception of type Xapian::DatabaseModifiedError
Abort trap: 6

Why does <modify-labels> close the open message or advance?

In the index, the modify-labels command causes the subsequent message to be selected after modifying the labels.

In the pager view, modify-labels closes the message and returns to the index.

Is this intentional? The behavior, particularly in the second case, seems confusing.

prepare/configure not finding libnotmuch

I have libnotmuch installed in /opt/local/lib/libnotmuch.2.0.0.dylib (via MacPorts) but prepare/configure doesn't see it. It sees gpgme along the same path, so it's not ignoring /opt/local. Is there a way to point configure to the proper library, e.g. "--with-notmuch=/path/to" instead of just "--enable-notmuch"?

Sides of Sidebar are White

This is what the sidebar looks like for me with mutt-kz:
Alt text

It looks pretty ugly to me.

This is what it looks like with the lunar-linux sidebar patch:
Alt text

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.