From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84251 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: How to get message-id from message? Date: Thu, 27 Feb 2014 14:23:36 +0100 Message-ID: <87txbkhep3.fsf@thinkpad-t61.fritz.box> References: <87fvn4j45h.fsf@thinkpad-t61.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1393507464 26637 80.91.229.3 (27 Feb 2014 13:24:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Feb 2014 13:24:24 +0000 (UTC) Cc: ding@gnus.org To: Rainer M Krug Original-X-From: ding-owner+M32499@lists.math.uh.edu Thu Feb 27 14:24:33 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WJ0wy-0002IZ-1a for ding-account@gmane.org; Thu, 27 Feb 2014 14:24:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1WJ0wS-0001hm-6N; Thu, 27 Feb 2014 07:24:00 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1WJ0wQ-0001hS-3x for ding@lists.math.uh.edu; Thu, 27 Feb 2014 07:23:58 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1WJ0wF-0003gW-Hx for ding@lists.math.uh.edu; Thu, 27 Feb 2014 07:23:57 -0600 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ0wD-0000mM-Tt for ding@gnus.org; Thu, 27 Feb 2014 14:23:46 +0100 Original-Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id B9439210DF for ; Thu, 27 Feb 2014 08:23:44 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 27 Feb 2014 08:23:44 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=3kR6pVZ9x9n2i/Yr87OtPvAtIUc=; b=mcrvPDJOxUDxzA2mRZQ2CvHtBcis 3QBeQD4sYCxj5yWnGrL9JAFED91AuzNuuIazUbFfAz/iGJEV31a0IHMRe5qk/AOZ Fa9kLzYR2NWlMRWP0kEBf/4DhL35I7cJRE5jxNwZ/11zQnQLwx5lDEzcz9oWjmBY fgZ86ppSI75ewbQ= X-Sasl-enc: RQNh8jygADt4YsUx7JypmvqR+Fy64/vRa7h3Umu5jpVi 1393507424 Original-Received: from thinkpad-t61.fritz.box (unknown [95.88.165.230]) by mail.messagingengine.com (Postfix) with ESMTPA id 32AEFC007AD; Thu, 27 Feb 2014 08:23:44 -0500 (EST) Mail-Followup-To: Rainer M Krug , ding@gnus.org In-Reply-To: (Rainer M. Krug's message of "Thu, 27 Feb 2014 12:21:25 +0100") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux) X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84251 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Rainer M Krug writes: > The following now works perfectly: Great! > --8<---------------cut here---------------start------------->8--- > (defun rmk/gnus-goto-message-in-notmuch () > (interactive) > (unless (buffer-live-p gnus-summary-buffer) > (user-error "No open Gnus summary buffer!")) > (let ((message-id (substring (with-current-buffer gnus-summary-buffer > (mail-header-id (gnus-summary-article-he= ader))) 1 -1) > )) >=20=20=20=20=20 > (message message-id) > (notmuch-search (concatenate 'string "id:" message-id)) ;; Now do the= notmuch stuff > )) > --8<---------------cut here---------------end--------------->8--- > > I am sure the indentations and line breaks are completely un-lisp. ANy > tips in this regard? Closing parens are usually not on their own line. And the correct indentation is the one emacs chooses when you hit tab. Many people hacking lisp regularly (me included) swear by paredit.el which allows for real structural editing which frees you from manual indenting and paren placement. Bye, Tassilo --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlMPPFgACgkQ795mVA/1wV1VXgD/d4CXD+TJNqZVYunGQgpEKFaR qde7GjBJjD3sJDyKt/YBAIZruLLqfpCZLLA1MU3h1IyauSVsQzMugAKapAs73M1i =gFGf -----END PGP SIGNATURE----- --=-=-=--