From: David Edmondson <dme@dme.org>
To: Pieter Praet <pieter@praet.org>, notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH] v2 [RFC] emacs: merge overhauled `notmuch-cycle-notmuch-buffers' into `notmuch'
Date: Mon, 16 Jan 2012 17:03:44 +0000 [thread overview]
Message-ID: <cun39bftw9b.fsf@hotblack-desiato.hh.sledj.net> (raw)
In-Reply-To: <1326732415-21894-1-git-send-email-pieter@praet.org>
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
On Mon, 16 Jan 2012 17:46:55 +0100, Pieter Praet <pieter@praet.org> wrote:
> Make `notmuch-cycle-notmuch-buffers' more Lispy and merge into `notmuch',
> eliminating the need to hog yet another keybind.
...
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index ef4dcc7..539b3a0 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -1067,7 +1067,20 @@ current search results AND that are tagged with the given tag."
> (defun notmuch ()
> "Run notmuch and display saved searches, known tags, etc."
> (interactive)
> - (notmuch-hello))
> + (let* ((old-buffer (current-buffer))
> + (interesting-buffers
> + (delq nil (mapcar (lambda (b)
> + (if (notmuch-interesting-buffer b) b))
> + (buffer-list))))
> + (next-buffer (first
> + (delq nil (mapcar (lambda (b)
> + (unless (eq old-buffer b) b))
> + interesting-buffers)))))
This feels _less_ lispy. Any occurrences of '(delq nil ...)' strike me
as odd. What's wrong with '(loop ... collect ...)'?
> + (if next-buffer
> + (progn
> + (switch-to-buffer next-buffer)
> + (bury-buffer old-buffer))
> + (notmuch-hello))))
Integrating with `notmuch' is fine with me.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2012-01-16 17:03 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-27 10:50 [PATCH] emacs: Cycle through notmuch buffers rather than jumping to the last David Edmondson
2011-12-27 11:02 ` David Edmondson
2011-12-27 19:23 ` Jani Nikula
2011-12-28 8:20 ` David Edmondson
2011-12-28 8:29 ` [PATCH v2] " David Edmondson
2012-01-10 16:55 ` David Edmondson
2012-01-10 20:15 ` Jani Nikula
2012-01-14 9:32 ` Pieter Praet
2012-01-14 9:29 ` Pieter Praet
2012-01-15 11:55 ` David Edmondson
2012-01-16 3:01 ` Austin Clements
2012-01-16 8:43 ` David Edmondson
2012-01-16 10:42 ` [PATCH] [RFC] emacs: merge overhauled `notmuch-cycle-notmuch-buffers' into `notmuch' Pieter Praet
2012-01-16 11:06 ` David Edmondson
2012-01-16 11:28 ` Pieter Praet
2012-01-16 11:32 ` Pieter Praet
2012-01-16 11:47 ` David Edmondson
2012-01-16 16:45 ` Pieter Praet
2012-01-16 16:46 ` [PATCH] v2 " Pieter Praet
2012-01-16 17:03 ` David Edmondson [this message]
2012-01-18 10:03 ` Pieter Praet
2012-01-18 10:04 ` [RFC] [PATCH v3] emacs: rewrite `notmuch-cycle-notmuch-buffers' Pieter Praet
2012-01-18 10:13 ` [PATCH] v2 [RFC] emacs: merge overhauled `notmuch-cycle-notmuch-buffers' into `notmuch' David Edmondson
2012-01-18 12:15 ` Pieter Praet
2012-01-18 12:57 ` David Edmondson
[not found] ` <cunboq1mad1.fsf@hotblack-desiato.hh.sledj.net>
2012-01-18 13:48 ` Pieter Praet
2012-01-18 22:18 ` Aaron Ecay
2012-01-19 0:48 ` Austin Clements
2012-01-19 8:19 ` David Edmondson
2012-01-19 19:13 ` Pieter Praet
2012-01-16 21:10 ` Jani Nikula
2012-01-18 10:07 ` Pieter Praet
2012-01-16 2:45 ` [PATCH v2] emacs: Cycle through notmuch buffers rather than jumping to the last David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cun39bftw9b.fsf@hotblack-desiato.hh.sledj.net \
--to=dme@dme.org \
--cc=notmuch@notmuchmail.org \
--cc=pieter@praet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).