Re: how to make return follow hyperlink?
authorSuvayu Ali <fatkasuvayu+linux@gmail.com>
Thu, 27 Aug 2015 10:53:29 +0000 (12:53 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:25 +0000 (14:49 -0700)
d4/85e7859c0dd3f9cca256a8338cf17dbc32798c [new file with mode: 0644]

diff --git a/d4/85e7859c0dd3f9cca256a8338cf17dbc32798c b/d4/85e7859c0dd3f9cca256a8338cf17dbc32798c
new file mode 100644 (file)
index 0000000..e91a57a
--- /dev/null
@@ -0,0 +1,121 @@
+Return-Path: <fatkasuvayu+linux@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 7F6816DE0275\r
+ for <notmuch@notmuchmail.org>; Thu, 27 Aug 2015 03:53:36 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.82\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.82 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id zY2RoCol4hcE for <notmuch@notmuchmail.org>;\r
+ Thu, 27 Aug 2015 03:53:34 -0700 (PDT)\r
+Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
+ [209.85.212.172])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 796CC6DE0140\r
+ for <notmuch@notmuchmail.org>; Thu, 27 Aug 2015 03:53:34 -0700 (PDT)\r
+Received: by wicne3 with SMTP id ne3so70860103wic.0\r
+ for <notmuch@notmuchmail.org>; Thu, 27 Aug 2015 03:53:32 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=sender:date:from:to:subject:message-id:mail-followup-to:references\r
+ :mime-version:content-type:content-disposition:in-reply-to\r
+ :user-agent; bh=nhVyFsrS1FEXTxmNnhLCOT3HT+wXBA3vpOmODW25TKc=;\r
+ b=eIQvfOzTCmcAmE9x+VS0P8eUJYKeBKvrLSZ/OJ/bp1g08QkrS4tPCSDf10wE6GIUkP\r
+ bx8izmVC9OiB3P8/JldRHZQk/vx2SM2f/TSZwA2dO/rkj3+YNy5bMZeuOVxIQVPg0jJP\r
+ sD+/QbUkgd8S9K2HcL9sMOoJi46a00GAq+yxAMjj31gzCY8jLxBhmw27NWXu52SyHLPz\r
+ xs4HOnK3FnQWbV27G2M1iCh8yGjL544bH7rYlpC9z3umKewwVSiCbL1MaMw9XrlvCd3/\r
+ YJ8rqIcP+5n49BGAInS43kaDbS3yy5vxrIXC5Z4Iv/DXcnr3vKRW/YyzgaJgGntm7Lgt\r
+ WiRg==\r
+X-Received: by 10.194.221.4 with SMTP id qa4mr4109426wjc.145.1440672812588;\r
+ Thu, 27 Aug 2015 03:53:32 -0700 (PDT)\r
+Received: from chitra.no-ip.org (5072840E.static.ziggozakelijk.nl.\r
+ [80.114.132.14])\r
+ by smtp.gmail.com with ESMTPSA id cw8sm2465523wjb.49.2015.08.27.03.53.31\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Thu, 27 Aug 2015 03:53:31 -0700 (PDT)\r
+Sender: Suvayu Ali <fatkasuvayu@gmail.com>\r
+Date: Thu, 27 Aug 2015 12:53:29 +0200\r
+From: Suvayu Ali <fatkasuvayu+linux@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: how to make return follow hyperlink?\r
+Message-ID: <20150827105329.GT31789@chitra.no-ip.org>\r
+Mail-Followup-To: notmuch@notmuchmail.org\r
+References:\r
+ <CAE+_6TxgZVAt1Y2E2=fRPo96krQ=W6cv9WV2pR8wLE3NSJaNAQ@mail.gmail.com>\r
+ <m28u8xcenl.fsf@heart-of-gold.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <m28u8xcenl.fsf@heart-of-gold.hh.sledj.net>\r
+User-Agent: Mutt/1.5.23.1 (2014-03-12)\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 27 Aug 2015 10:53:36 -0000\r
+\r
+On Thu, Aug 27, 2015 at 09:35:26AM +0100, David Edmondson wrote:\r
+> On Wed, Aug 26 2015, Peter Salazar <cycleofsong@gmail.com> wrote:\r
+> > How do I make it so that hitting RET on a hyperlink follows it? Is there a\r
+> > setting analogous to org-return-follows-link? I often have links in\r
+> > incoming emails, and I'd like to be able to open them in my browser with\r
+> > one keystroke.\r
+> \r
+> Having that binding would conflict badly with the existing binding for\r
+> `notmuch-show-toggle-message' (which has been in place for a long\r
+> time!).\r
+> \r
+> Perhaps not what you want, but for me, clicking on the link with the\r
+> mouse opens the link.\r
+\r
+I think you can hack around by advicing notmuch-show-toggle-message and\r
+making it context sensitive.  I don't really know the best way to\r
+determine the context, but a quick hack would be to look at the\r
+face-at-point.  Of course this requires font-lock-mode be active.\r
+\r
+I once did something like this to expand abbreviations (below).  Of\r
+course you will have to use a defadvice instead of a defun.\r
+\r
+Hope this helps,\r
+\r
+\r
+(defun sa-expand-abbrev-in-context (expand)\r
+  "Expands abbreviations according to the context. Determines\r
+whether within comments or source by looking at the face name. If\r
+within comments the `basic-text-mode-abbrev-table' is used, the\r
+major mode abbrev-table is used otherwise.\r
+\r
+Expansion is done by the function passed as the argument. This is\r
+controlled by the \"abnormal\" hook `abbrev-expand-functions'."\r
+;; backward-char checks if end-of-buffer as when point at e-o-b face is `nil'\r
+;; the function call expand does the expansion, usually `expand-abbrev'\r
+  (if (save-excursion\r
+       (string-match "comment\\|string"\r
+                     (symbol-name (if (< (point) (point-max))\r
+                                      (face-at-point)\r
+                                    (backward-char)\r
+                                    (face-at-point)))))\r
+      (let ((local-abbrev-table basic-text-mode-abbrev-table))\r
+       (funcall expand))\r
+    (funcall expand)))\r
+\r
+\r
+-- \r
+Suvayu\r
+\r
+Open source is the future. It sets us free.\r