Re: Washing GitHub emails to include inline patch?

2017-10-12 Thread William Casarin
Kyle Meyer writes: > Looking at what I wrote again, I'd change DONT-FETCH to FORCE-FETCH and > then do something like > > (when (or force-fetch > (not (magit-ref-exists-p local-ref))) > (magit-call-git "fetch" "origin")) > > where local-ref is bound to "refs/pull/origin/".

Re: Washing GitHub emails to include inline patch?

2017-10-12 Thread William Casarin
Kyle Meyer writes: > --8<---cut here---start->8--- > > (defun km/notmuch-github-pr-number () > "Return the PR number for this message." > (let (pr) > (with-current-notmuch-show-message > (goto-char (point-min)) > (if (re-search-forward "https:

Re: Washing GitHub emails to include inline patch?

2017-10-10 Thread William Casarin
Kyle Meyer writes: > Call M-x km/notmuch-visit-pr-in-magit in a notmuch-show buffer for a > GitHub PR, modifying km/notmuch-repo-from-message so that it returns > the full path to the local repository. Are you a wizard? That worked like magit. I changed km/notmuch-visit-pr-in-magit to parse the

Re: Washing GitHub emails to include inline patch?

2017-10-10 Thread William Casarin
Kyle Meyer writes: > However, I personally haven't felt the need for such a command. I > pretty frequently use the command I posted earlier in this thread to > take a quick look at PRs, but, for anything aside from the simplest > changes, I want to apply the commits locally to review/test. If I

Re: Washing GitHub emails to include inline patch?

2017-10-10 Thread William Casarin
Hey Kyle, Kyle Meyer writes: >> I wonder if it would be be possible to wash this email by downloading >> the patch and present it inline like git-send-email. This would allow me >> to review patches without having to click around the GitHub interface. >> Has anyone done this? > > I have a comman

[bug] [emacs] notmuch-show: names not shown on some mailing lists

2017-10-10 Thread William Casarin
Hey there, Here's something I've noticed in some mailing list threads in notmuch-show: https://jb55.com/s/81d7c740ef60984d.png It doesn't look like it is showing the correct name. Looking at the raw message, the From line looks like this: From: Some Person via Some-mailinglist Reply

Re: [PATCH v2 13/15] cli: add support for --no- prefixed boolean and keyword flag arguments

2017-10-01 Thread William Casarin
Jani Nikula writes: > @@ -171,11 +186,22 @@ parse_option (int argc, char **argv, const > notmuch_opt_desc_t *options, int opt_ > if (! try->name) > continue; > > - if (strncmp (arg, try->name, strlen (try->name)) != 0) > + char next; > + const char *value; > + n

Re: [PATCH 0/6] Sort by from and subject

2017-09-30 Thread William Casarin
Hey Jani, Jani Nikula writes: > I think there are two considerations here: > > First, is this something we want to have? Is this generally useful? Sorting by from and subject are in most mail clients (mutt, gnus, outlook...) > There's still the issue of From: and Subject: needing more heuristi

[PATCH 0/6] Sort by from and subject

2017-09-25 Thread William Casarin
Sorting through your subscribed github repos is now easier than ever! before: https://jb55.com/s/7889d50bc848b089.png after: https://jb55.com/s/c8b5055939d0482f.png * from sorting: rss feeds https://jb55.com/s/68a5aa6ecdebbbfe.png Cheers, William [1] id:20170904160040.23642-1-j...@jb55.com

[PATCH 3/6] sorting: update man page

2017-09-25 Thread William Casarin
--- doc/man1/notmuch-address.rst | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index cc31cc5a..38ae9a25 100644 --- a/doc/man1/notmuch-address.rst +++ b/doc/man1/notmuch-address.rst @@ -77,7 +77,11 @@ Supported o

[PATCH 4/6] emacs: replace oldest-first with sort-order

2017-09-25 Thread William Casarin
This generalizes notmuch-search-oldest-first to notmuch-search-sort-order. notmuch-search-sort-order can now be one of: * oldest-first * newest-first * subject-ascending * subject-descending * from-ascending * from-descending Order toggling now simply inverts the corresponding option.

[PATCH 5/6] emacs: notmuch-search-orders

2017-09-25 Thread William Casarin
Create a notmuch-sort-orders alist to be shared between notmuch-search-sort-orders and notmuch-change-search-order --- emacs/notmuch-lib.el | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index ee7b67d3..16725863

[PATCH 6/6] emacs: add notmuch-search-change-order

2017-09-25 Thread William Casarin
notmuch-search-change-order pops up a completing-read minibuffer completion window for choosing sort-orders. --- emacs/notmuch.el | 14 ++ 1 file changed, 14 insertions(+) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 334458b7..93b4e582 100644 --- a/emacs/notmuch.el +++ b/ema

[PATCH 1/6] sorting: add the ability to sort by from and subject

2017-09-25 Thread William Casarin
* add {from,subject}-{ascending,descending} sort options --- lib/notmuch.h| 16 lib/query.cc | 12 notmuch-search.c | 4 3 files changed, 32 insertions(+) diff --git a/lib/notmuch.h b/lib/notmuch.h index f26565f3..071bfe4d 100644 --- a/lib/notmuch.h +++

[PATCH 2/6] sorting: update ruby bindings for from and subject

2017-09-25 Thread William Casarin
--- bindings/ruby/init.c | 24 1 file changed, 24 insertions(+) diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c index 5556b43e..ace8f666 100644 --- a/bindings/ruby/init.c +++ b/bindings/ruby/init.c @@ -104,6 +104,30 @@ Init_notmuch (void) */ rb_define_

Re: Washing GitHub emails to include inline patch?

2017-09-22 Thread William Casarin
Kyle Meyer writes: > I have a command in my Emacs configuration that I think gets close to > what you want. This is great! Now if there was only a way to make it work for private repositories... hmm... -- https://jb55.com ___ notmuch mailing list not

Washing GitHub emails to include inline patch?

2017-09-21 Thread William Casarin
Hey team, Most of the patches I review these days comes in as GitHub emails that look like this: --- Begin Message --- You can view, comment on, or merge this pull request online at: MIME-Version: 1.0 Content-Type: text/plain https://github.com/monstercat/iris/pull/52 -- Commit Summary --

Re: [PATCH v2] emacs: replace oldest-first with sort-order

2017-09-09 Thread William Casarin
Here's the before and after with from-ascending sorting on my rss tag: before: https://jb55.com/s/e51db7073ccfc36d.png after: https://jb55.com/s/6a01cd3a0227ddfa.png Last thing I need to add is a completing-read menu for selecting the sort-order, since you can only set it in saved searches or wi

[PATCH v2] emacs: replace oldest-first with sort-order

2017-09-09 Thread William Casarin
This generalizes notmuch-search-oldest-first to notmuch-search-sort-order. notmuch-search-sort-order can now be one of: * oldest-first * newest-first * subject-ascending * subject-descending * from-ascending * from-descending Order toggling now simply inverts the corresponding option.

[PATCH] emacs: replace oldest-first with sort-order

2017-09-09 Thread William Casarin
This generalizes notmuch-search-oldest-first to notmuch-search-sort-order. notmuch-search-sort-order can now be one of: * oldest-first * newest-first * subject-ascending * subject-descending * from-ascending * from-descending Order toggling now simply inverts the corresponding option.

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-07 Thread William Casarin
David Bremner writes: > It seems worth mentioning that it's possible to preprocess values into > keys (see Xapian::Enquire::set_sort_by_key). So things like Re: > etc... could be stripped. Hmm looks like I need to create a KeyMaker class which appears to be a glorified (Xapian::Document -> Strin

Re: [PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread William Casarin
William Casarin writes: > Jani Nikula writes: > >> The implementation seems simple enough, but what's the use case, really? > > I get all of my rss feeds sent to my inbox, I wanted to be able to group > similar feeds (mainly by from, sometimes subject). Alternative

[PATCH 2/3] sorting: update ruby bindings for from and subject

2017-09-04 Thread William Casarin
--- bindings/ruby/init.c | 24 1 file changed, 24 insertions(+) diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c index 5556b43e..ace8f666 100644 --- a/bindings/ruby/init.c +++ b/bindings/ruby/init.c @@ -104,6 +104,30 @@ Init_notmuch (void) */ rb_define_

[PATCH 1/3] sorting: add the ability to sort by from and subject

2017-09-04 Thread William Casarin
* add {from,subject}-{ascending,descending} sort options --- I'm not sure if we want to eventually refactor ascending and descending into a separate option, but I decided to keep it this way for now. lib/notmuch.h| 16 lib/query.cc | 12 notmuch-search.c | 4

[PATCH 3/3] sorting: update man page

2017-09-04 Thread William Casarin
--- doc/man1/notmuch-address.rst | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index cc31cc5a..38ae9a25 100644 --- a/doc/man1/notmuch-address.rst +++ b/doc/man1/notmuch-address.rst @@ -77,7 +77,11 @@ Supported o

Re: notmuch-search: sort by subject or author?

2017-09-04 Thread William Casarin
David Bremner writes: > I think it's not really possible at the moment. If you want this to work > with large searches then it probably needs to be done at the CLI level > (see [1] for work in progress adding sorting by file size). > > Luckily 'From' and 'Subject' are already value slots in the d

notmuch-search: sort by subject or author?

2017-09-04 Thread William Casarin
Hey there, Is there a way to sort by subject or author in emacs/notmuch-search? I find myself wanting to do this a lot. My particular use case is rss feeds, where I have many different feeds in my rss tag that I would like to group together. If not, I am interested in adding this feature. Thank

Colorized git-format-patches in notmuch-show?

2017-08-29 Thread William Casarin
I'm not sure if this is an option somewhere, but is there a way to colorize git-format-patch emails in the notmuch-show buffer? I noticed it works fine if it's an attachment, but not if it's a git-submitted patch. Thanks, William ___ notmuch mailing lis

Re: Custom notmuch-show for html?

2017-07-25 Thread William Casarin
Tomi Ollila writes: > So, you set mm-text-html-renderer as 'w3m > > ? Yeah, but I had to install w3m and install the w3m package before it worked. The w3m-standalone one worked but was a bit slower and didn't seem to work as well. Cheers, William ___ n

Re: Custom notmuch-show for html?

2017-07-25 Thread William Casarin
Tomi Ollila writes: > If you try to work something on this (or anything), please report your > progress :D I didn't really get far after I discovered how awesome emacs-w3m was. pandoc plaintext output is pretty bad in comparison. Thanks again! ___ notm

Re: Custom notmuch-show for html?

2017-07-24 Thread William Casarin
Tomi Ollila writes: > Writing one's own renderer function and pointing mm-text-html-renderer > to that (or something...) This is what I was looking for, thanks. > If you try to work something on this (or anything), please report your > progress :D Will do! Cheers, William _

Custom notmuch-show for html?

2017-07-23 Thread William Casarin
Hey there, I would like to never use emacs' slow html renderer when viewing html-only email. What I want to do is pipe the html through: pandoc -f html -t plain and then show the output of that. Right now I can do this with `. |` but I can only do this after I open the email, which is not ide

RFC on default notmuch-show mime part buttons

2017-05-13 Thread William Casarin
I recently had to do this in my notmuch config to remove a lot of button noise in the notmuch-show buffer: (defun jb55/notmuch-show-insert-header-p (part hide) ;; Show all part buttons except for text/plain and multipart (let ((mime-type (notmuch-show-mime-type part))) (not (membe

<    1   2