From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6GAPL2zElF45PQAA0tVLHw (envelope-from ) for ; Mon, 13 Apr 2020 19:58:36 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eC9KGG/ElF4/XwAA1q6Kng (envelope-from ) for ; Mon, 13 Apr 2020 19:58:39 +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 aspmx2.migadu.com (Postfix) with ESMTPS id 8AF266823AE for ; Mon, 13 Apr 2020 19:58:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id B3B856DE0F5A; Mon, 13 Apr 2020 12:58:32 -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 dWxP1-gvCXnw; Mon, 13 Apr 2020 12:58:32 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 8AABF6DE0EB0; Mon, 13 Apr 2020 12:58:31 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6623E6DE0EB0 for ; Mon, 13 Apr 2020 12:58:30 -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 pAwsBEOe7S_B for ; Mon, 13 Apr 2020 12:58:29 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by arlo.cworth.org (Postfix) with ESMTPS id 438F16DE0BF6 for ; Mon, 13 Apr 2020 12:58:29 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id y4so3851379ljn.7 for ; Mon, 13 Apr 2020 12:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=lh+C/LVcodInVk7YRJb7WdBr/u70ifUqsSvFKWQCaU4=; b=jOMBQ8bBbTgQMjhvhzWPRX6H7HfaXWW4Gi5ipleRqAKKryhSgQjnmWV/bRAerhSdzC FqcjpBnaoGli5Q3C79b4NkI2Y/t75jKH0wQNFprEba6qoHRnzpkeMVUHscfPDfCBtYdD yy7BYnxsBtifORbgHm9CrRqVFr+LyEcgLjz7lRkEVIa9YiZ9VAD8cvidpWYoal/r/wtr oCoOLh+MZIxqbF/OIHQ18kUZIC1hYrLlNcYijuDDl5S+0RFt6S/KYnlYODPfqKJ9ECm+ AIG/Ct7zjx7kfqhnb76eKcIzYLLhkkQlGgT76a7QP+2+bFdatIZe19BpnNy2/i9Z0nIf HGLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=lh+C/LVcodInVk7YRJb7WdBr/u70ifUqsSvFKWQCaU4=; b=FE5mqlVjRSRGXpAwNMt9Fm89h50eDcBYm9LJ+0Ol8zRcehKc/eYXfcBC40s66E1JO9 PijlxNoDnlMrVQx0SNhTV9wvNnnuhup4M/zuT3orO55qQ9yNyCKyNv2Pr4W8Yus5Zn1x +/jzuOPKdDE18+wb1rd4OTZWqNBi0Szbv3PthN9EM30jvgt9aOuAlqFgxLRgE48vXHL0 JxspBAJxGe5HLs7yjA1MRSX5f2Ruamt45C0ZW/FNRqBNCl+6ER74hpWKxwhXMk2MS3MJ nMXAotSiJKy9KrMjkwKVKYKxK/clQBnocs3HWeFJUmpZ5ApVlfSjWOevf6Mnck2o35kb Alcg== X-Gm-Message-State: AGi0PubqI1qHmeHSHLpvcKmF58pxS/h72CRwPU1eABC61bYAe6206KPN o6w9PQQ+qamJS6Pwk8QSUTRzJQd3DLS5KA== X-Google-Smtp-Source: APiQypLnsfV/kKq6wV/OT9BpzgjBJG4jrrEjXiNmV+1QssX65uOhEM0wXKqMvzwhVRndEzRC+eXDQQ== X-Received: by 2002:a2e:2413:: with SMTP id k19mr5788611ljk.134.1586807904536; Mon, 13 Apr 2020 12:58:24 -0700 (PDT) Received: from real.local (102-65-13-236.ftth.web.africa. [102.65.13.236]) by smtp.gmail.com with ESMTPSA id 78sm7752035ljf.76.2020.04.13.12.58.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 12:58:23 -0700 (PDT) From: Keegan Carruthers-Smith To: notmuch@notmuchmail.org Subject: [PATCH] emacs: use def instead of initial-input for notmuch-show-browse-urls Date: Mon, 13 Apr 2020 21:58:19 +0200 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: 0.09 Authentication-Results: aspmx2.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=jOMBQ8bB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx2.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 [0.09 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.45136220141733]; R_DKIM_REJECT(1.00)[gmail.com:s=20161025]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.01), ip: 50.126.95.6(-0.45)]; R_SPF_ALLOW(-0.20)[+a]; DKIM_TRACE(0.00)[gmail.com:-]; MX_GOOD(-0.50)[cached: notmuchmail.org]; MAILLIST(-0.20)[mailman]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[keegancsmith@gmail.com,notmuch-bounces@notmuchmail.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; SPF_REPUTATION_HAM(0.00)[-0.44983442868275]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed),none] X-TUID: gZ3ncmTUlQ6g This is the non-deprecated way to use completing-read. Additionally the old use was broken when using ivy for completing-read. For user's using completing-read-default they won't see the default URL now, but if they hit enter it will be visited. Alternatively they can select it with M-n. >From the completing-read documentation for initial-input: This feature is deprecated--it is best to pass nil for INITIAL-INPUT and supply the default value DEF instead. The user can yank the default value into the minibuffer easily using M-n. Additionally collection is now all urls, rather than all but the first. I'm not sure why "(cdr urls)" was previously done. --- emacs/notmuch-show.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 214e279f..079281c3 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2559,7 +2559,7 @@ browsing." (prompt (if kill "Copy URL to kill ring: " "Browse URL: ")) (fn (if kill #'kill-new #'browse-url))) (if urls - (funcall fn (completing-read prompt (cdr urls) nil nil (car urls))) + (funcall fn (completing-read prompt urls nil nil nil nil (car urls))) (message "No URLs found.")))) (provide 'notmuch-show) -- 2.26.0