From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KEhVF/AmMGUxHgAAG6o9tA:P1 (envelope-from ) for ; Wed, 18 Oct 2023 20:41:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KEhVF/AmMGUxHgAAG6o9tA (envelope-from ) for ; Wed, 18 Oct 2023 20:41:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 08F6F6C0A6 for ; Wed, 18 Oct 2023 20:41:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=bxYa9rJC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697654512; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2uD4RXcpstYVcgX7Vw+OHpUugTSWmrvSlLKSJIlgX+E=; b=UZualp/1sa63vUhbnzt7pzU8kHt/tA2+g6bD92nLAJrBTOyF2T0h/T0WciLZ4J/KBO9XQ3 uEgUOyCgUyu5dY5jrhEFJYBHXvgHfBtPwcLBr9FM3lcJmIB4bmqdaNWxpbv23nRByhvbKx v4wI57HwS04pgcbY6fvVF6i7NYzg/6ZfdMtSCbhawN0vx5yHnMLLpifF58e6ArRjKP22Kg cK8e6ZDRSUs3xwgHIXmu4n6W2i27dL/sr/8Xk9cqk+4jCA5228MYg6fEchJgNJy1URDy/J d4oXvcQcVlXVQxQngseRtP8LtbPj9sXQ1B1hmt4EvJse7NEacnOJI6tXR23w1g== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1697654512; a=rsa-sha256; cv=pass; b=JwNYsjTYOxvS+d2UT28sKhow20FjPVzH9XFdhroKw13kiFfy1FsXxyLGc8oyO9MWFDQSh0 oaaeuSKaOSyadN5wg1sjRRh2jAuF8HgtdqKSoTKEhJtKBv5n3KgIY1UQMjnHZ2asmZLrHK rHzP0do0mWeaPy/zBxa+VS6Xpmg4wA0T/CZ6bfse127HdTLEBurve8hSoNTbtIS44a3DKj ZgY52KmGwO39qYLNjxJy60JaekyuQbnbXC/tTo+mdbbAOI9I82E1CcgwNg7IdJMSNqTOp1 kKBU9uE/44osJAEWDWS8jK22/LmMHfftHdHcU52XqbJhRr41vj8XI8TNP45Kbw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=bxYa9rJC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtBU6-0000SD-KB; Wed, 18 Oct 2023 14:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtBU4-0000Qz-CT for guix-devel@gnu.org; Wed, 18 Oct 2023 14:41:32 -0400 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtBU0-0005i2-Hh for guix-devel@gnu.org; Wed, 18 Oct 2023 14:41:31 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1697654481; cv=none; d=zohomail.com; s=zohoarc; b=DHsPtR9Eg4f8m4iMbhAihSSRQpwyHvQUpDczcFvpi8AOJ1FGCk2czaQCuKWAlAVe0+tTxjDctI0wkth5EE5m5Y40eBHkjfgniGvYIMMqkH7K3+cT32ynOJskh04PS44fUT+uuOQcZYuz4eQYGVPOFNdastbm+ZfdIUSXqSuKdWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697654481; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=2uD4RXcpstYVcgX7Vw+OHpUugTSWmrvSlLKSJIlgX+E=; b=bfjNQZHcrqMkdV6mG6EegXlISJC8dQKKgoBc5tkl06DIml2a8O81Gcf+K6smIH1u14r+dF0xLiF8BkVkFM40h03OYWETNutKhvMuaLI7Mo9gtNpQUHKOOeWcuFiWsyZdHRP8yQoOlteB5Jv0DZz+jaKYriqxncwBsavH8fB+JDw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1697654481; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=2uD4RXcpstYVcgX7Vw+OHpUugTSWmrvSlLKSJIlgX+E=; b=bxYa9rJC3T1Pwp5mr4cQXCA43q8o441RVKE7jBD5vD+Vy2vmqamAeKtsScp9ztzN O0F6NB+nSSpsY2i9iF9CcCsgI4xk5I3twbJwzBdfyuZh5ZMJHr4aEmCZjiPVk0rsWQr LJVaUDw20MrKUwKmaNuuQ/7vIHPBy748reWZ6m0k= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1697654479377854.5723076177901; Wed, 18 Oct 2023 11:41:19 -0700 (PDT) Date: Wed, 18 Oct 2023 20:41:19 +0200 From: Matt To: "Simon Tournier" Cc: "Maxim Cournoyer" , "Ricardo Wurmus" , "Nathan Dehnel" , "Felix Lechner" , "guix-devel" Message-ID: <18b441799eb.10e14e0da958031.6053092172065193271@excalamus.com> In-Reply-To: <87zg0folx6.fsf@gmail.com> References: <878r8q3iub.fsf@elephly.net> <86h6ndbfjr.fsf@gmail.com> <874jit2nh8.fsf@gmail.com> <87zg0folx6.fsf@gmail.com> Subject: Useful Info related Emacs functions (was Re: more than 1,800 dependent packages: website out of date) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.12; envelope-from=matt@excalamus.com; helo=sender4-op-o12.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.34 X-Migadu-Queue-Id: 08F6F6C0A6 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.34 X-TUID: Z+RmLs0PHFUy ---- On Wed, 18 Oct 2023 19:55:17 +0200 Simon Tournier wrote --- > On Sat, 14 Oct 2023 at 12:11, Maxim Cournoyer maxim.cournoyer@gmail.com> wrote: > > > Not to preach, but I've spent some time looking at 'info info' once and > > I'm sold to it now. I basically use these keys: 'g' to navigate to > > nodes, 'm' to select a menu, 'space' to page down and 'backspace' to > > page up. > > Yeah the tutorial is really good! Well, I did it several times over the > past 10 years and, as I said, my muscle memory has hard time with > keybindings. Hum, let try once again. :-) > > Well, I added this to my configuration: > > --88--- > (define-key Info-mode-map (kbd "W") > #'(lambda () > "Stash the current node name as URL for online manual." > (interactive) > (Info-copy-current-node-name) > (let* ((node (pop kill-ring)) > (that (if (string-match "(\\([[:alnum:]]+\\)) \\(.*\\)" node) > (if (string= "guix" (match-string 1 node)) > (concat > "https://guix.gnu.org/manual/devel/en/guix.html#" > (replace-regexp-in-string " " "-" > (match-string 2 node))) > node) > node))) > (kill-new that) > (message "%s" that)))) > --88--- > > Let see if I use it. ;-) Three unasked for tips: 1. There is also 'i' to search index topics 2. In the Emacs info browser, there is the command 'info-apropos' which (as far as I know) isn't bound to anything by default. I bind it to 'a'. It searches across *all* manuals on your system for a regex and presents a menu of results. 3. I have a similar function to yours that I've expanded over the years which you may appreciate. It's set up to work with the Guix, Guile, and Emacs manuals and will format a link as a URL or an Org mode link and place it in the kill-ring. There is also an option to open the web version with the default browser. (defun xc/Info-link-to-current-node (&optional arg) "Format current info node as url. With no prefix, place the url corresponding to the current Info node into the kill ring. With universal prefix, visit url with default web browser and do not put url into the kill ring. With numeric prefix, create Org link with node name as description into the kill ring." (interactive "p") (unless Info-current-node (user-error "No current Info node")) (let* ((info-file (if (stringp Info-current-file) (file-name-sans-extension (file-name-nondirectory Info-current-file)))) (node Info-current-node) (url (cond ((or (string= info-file "emacs") (string= info-file "org")) (concat "https://www.gnu.org/software/emacs/manual/html_node/" info-file "/" (if (string= node "Top") "" (concat (replace-regexp-in-string " " "-" node t) ".html")))) ((string= info-file "guile") (concat "https://www.gnu.org/software/guile/manual/html_node/" (if (string= node "Top") "" (concat (replace-regexp-in-string " " "-" node t) ".html")))) ((string= info-file "guix") (concat "https://guix.gnu.org/en/manual/devel/en/html_node/" (if (string= node "Top") "" (concat (replace-regexp-in-string " " "-" node t) ".html")))) ))) (cond ((eq arg 1) ; no prefix (kill-new url) (message "%s" (car kill-ring))) ((eq arg 4) ; universal prefix (browse-url-default-browser url)) (t ; any other prefix (kill-new (format "[[%s][%s]]" url node)) (message "%s" (car kill-ring)))))) I have it bound as: (general-def :keymaps 'Info-mode-map "a" 'info-apropos "U" 'xc/Info-link-to-current-node ; [U]rl "G" '(lambda () (interactive) (xc/Info-link-to-current-node 4)) ; [G]o to web version "O" '(lambda () (interactive) (xc/Info-link-to-current-node 16)) ; [O]rg link formatted "h" 'nil ; hitting 'h' by accident kills all window arrangement )