From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eNYGN95QpF6IbgAA0tVLHw (envelope-from ) for ; Sat, 25 Apr 2020 15:01:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IDzeGuZQpF7pMwAAbx9fmQ (envelope-from ) for ; Sat, 25 Apr 2020 15:01:58 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 745F29426F0 for ; Sat, 25 Apr 2020 15:01:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 9FE186DE13FB; Sat, 25 Apr 2020 08:01:50 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dfnfHoGJRJT2; Sat, 25 Apr 2020 08:01:50 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 61A036DE1417; Sat, 25 Apr 2020 08:01:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 753E06DE1417 for ; Sat, 25 Apr 2020 08:01:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6rVSMNxQSo6H for ; Sat, 25 Apr 2020 08:01:46 -0700 (PDT) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by arlo.cworth.org (Postfix) with ESMTPS id 0545C6DE13FB for ; Sat, 25 Apr 2020 08:01:46 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id u16so15079911wmc.5 for ; Sat, 25 Apr 2020 08:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:subject:in-reply-to:references:from:date:message-id:mime-version; bh=eUjZ9chN1N0Q3ZwWC8tez8wjFnEziymdU3J7zRpnMAg=; b=yKPGOyaIh8oKABDA9kTapB2bG4nK9TLBDQA4bRdtEi48DkSVX9yai4jpZA5h40vicZ 8i1fa2OUBlXnQDYkoE0k9b/SLaUgvhyOVW6e/1zf5xKV1NjHKfR9KTfoFJJBAOWDnsY6 C6cWP9iZbL3eNAsY8uEQE/8eJrrtFlgvjZzHJoWIVJptclRXeO6/dyeM341fiQ8j3CDE deBf5uo9b2gLmloGHodyRvFlIcO+oz0rIQXrZl9Z926TlCfv7JlzcJKzStuZsPRqJduB snsABebUAkMB+GOhgdtdYPuk6BJzWjhIV2KZlRq/+K9KDcQxCmwdvxXkVfHHXsW5Dg4Z JKMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:in-reply-to:references:from:date :message-id:mime-version; bh=eUjZ9chN1N0Q3ZwWC8tez8wjFnEziymdU3J7zRpnMAg=; b=Nmht83uUdV1Yyv/AfwkyY3L5kINBJvpOgQmwR++TPpXMB7sYadVFuuWIIjFu5Ov8jF H9s1Od6UemyVhmV4b08uEd85Z43E9tEsG41r+R15HWhp3d+M/7LHgaxpkGgTmdfEK4BI ZmJoKNU29iTPE4fvzLXeqqANqoi30G0LGUNyRsWXuPZQZVah33Ttlc7sPZ3VWLJyTeqh /6UHHlDzwyNN9iiD+dfbqL45KoeYi8ssPZw6Rq/zx0PU4MvyNI0XMRaus0+HJty2wZHM W4+PaqCcKw82Z2HIz9zRYyJ8OIbI4mRnjs5gctvoX/7sgPhR+ljr/otl7Fv1RQJlEdOo 6PuQ== X-Gm-Message-State: AGi0PuYv2TLM55DunpTDusImx7/KW4d/FWCGpntc8BTm6XebfFpSpBLZ 2LVF67DOhN1XMTXBpnr1dKNDHIjtUTo= X-Google-Smtp-Source: APiQypK1KQUCq5hHd4wm+g9X6avLHh5kpFRgIi6pcrU/z39rwn5J236i8kirRya1CAHz4JWg9iticg== X-Received: by 2002:a05:600c:2284:: with SMTP id 4mr15536717wmf.97.1587826904542; Sat, 25 Apr 2020 08:01:44 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [2001:8b0:bb71:7140:64::1]) by smtp.gmail.com with ESMTPSA id r3sm13898357wrx.72.2020.04.25.08.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2020 08:01:43 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 8100e3d7; Sat, 25 Apr 2020 15:01:42 +0000 (UTC) To: Ori , notmuch@notmuchmail.org Subject: Re: Emacs: make browsing URLs friendlier with Helm In-Reply-To: References: X-HGTTG: heart-of-gold From: David Edmondson Date: Sat, 25 Apr 2020 16:01:42 +0100 Message-ID: MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: 1.49 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=dme-org.20150623.gappssmtp.com header.s=20150623 header.b=yKPGOyaI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [1.49 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.45968397014542]; MX_INVALID(1.00)[cached]; TO_DN_SOME(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; R_DKIM_REJECT(1.00)[dme-org.20150623.gappssmtp.com:s=20150623]; DWL_DNSWL_BLOCKED(0.00)[50.126.95.6:from]; R_SPF_ALLOW(-0.20)[+a]; DKIM_TRACE(0.00)[dme-org.20150623.gappssmtp.com:-]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; RCVD_IN_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[dme@dme.org,notmuch-bounces@notmuchmail.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[notmuchmail.org:email]; FROM_HAS_DN(0.00)[]; SPF_REPUTATION_HAM(0.00)[-0.44472131203986]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; DMARC_NA(0.00)[dme.org]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: G1xqEz/I3kyL On Friday, 2020-04-24 at 15:46:20 -04, Ori wrote: > Hi, > > This is a fairly small point and was easy for me to locally address, and > that in itself may be valuable in sharing, but I wondered if it would be > worth putting a change behind a defcustom option, or depending on how this > works with other completion frameworks, changing it altogether? > > The "B" shortcut calls notmuch-show-browse-urls, which calls completing-read > with an INITIAL-INPUT of the first URL in the message. On Helm, this shows > a near-blank list (blank unless other URLs have the first one as a > substring). It's a nicer behavior for Helm to start off with no initial > input, as that first URL is highlighted automatically anyway. Keegan Carruthers-Smith posted a patch with a suggested change for this in id:m2r1wrxin8.fsf@gmail.com. Could you try that and see if it addresses your concerns? That patch is now in HEAD, but I presume not yet in a release. > Locally I simply redefine the function with a minor change (highlighted) > after loading notmuch: > > (defun notmuch-show-browse-urls (&optional kill) > "Offer to browse any URLs in the current message. > With a prefix argument, copy the URL to the kill ring rather than > browsing." > (interactive "P") > (let ((urls (notmuch-show--gather-urls)) > (prompt (if kill "Copy URL to kill ring: " "Browse URL: ")) > (fn (if kill #'kill-new #'browse-url))) > (if urls > (funcall fn (completing-read prompt urls)) > (message "No URLs found.")))) > > For reference, in notmuch-show.el that highlighted part is: > (completing-read prompt (cdr urls) nil nil (car urls)) > > As I said, I'm not sure how this works with other popular completion > alternatives like ivy and if the redefined function is better or worse with > those. Perhaps this post is only here to be useful for other Helm users! > > Ori > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch dme. -- Right across from where I'm standing, on the dance floor she was landing.