From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience Date: Fri, 26 Dec 2014 20:06:45 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419613651 25835 80.91.229.3 (26 Dec 2014 17:07:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Dec 2014 17:07:31 +0000 (UTC) To: 19443@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 26 18:07:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y4YMG-0005XR-Pq for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Dec 2014 18:07:25 +0100 Original-Received: from localhost ([::1]:54003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YMF-0001BX-QN for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Dec 2014 12:07:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YLy-0000qI-15 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4YLu-00066b-Nt for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:07:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YLu-00066X-LV for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4YLu-00070D-C2 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Dec 2014 17:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19443 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141961362026907 (code B ref -1); Fri, 26 Dec 2014 17:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Dec 2014 17:07:00 +0000 Original-Received: from localhost ([127.0.0.1]:58356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4YLr-0006zv-Es for submit@debbugs.gnu.org; Fri, 26 Dec 2014 12:06:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55255) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4YLo-0006zm-La for submit@debbugs.gnu.org; Fri, 26 Dec 2014 12:06:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4YLn-00065P-Iq for submit@debbugs.gnu.org; Fri, 26 Dec 2014 12:06:56 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YLn-00065L-Fj for submit@debbugs.gnu.org; Fri, 26 Dec 2014 12:06:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YLm-0000iU-FU for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:06:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4YLj-000658-96 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:06:54 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4YLi-000654-Tq for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 12:06:51 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 539FB20939 for ; Fri, 26 Dec 2014 12:06:50 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Fri, 26 Dec 2014 12:06:50 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=4D27myUjvnmM+kt+bvxg8mFzT7A=; b=pCNC j/c8xUozciVQLN+vgiljkJjCRAJb9M/ZI1gRwF94BKdbfGAlnmkCXNhArbY7Hin3 duNZLrDLVFLPzN+nW6/+CRblJJ/wLjM+WoI3/embFIYxEsz6iwfV2n7XbF1EDYXU ec8p0n0lVeuCDx8zOlBcKS1fKbrWx0QAODVV8r0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=4D27myUjvnm M+kt+bvxg8mFzT7A=; b=WdFv2A32x0VwNAMXPZeRORj6IaR+y/KtfgORgXetJX2 UxZYm1H060Tp7sUej2/FnMzVwfF1A40eVNZI6PcPQWUAuNBy/xU5GzhRCEBGbgHv UD4O/Sob0LxPOhBJsKNvI6gJMg1VuBLGtR2c1i8dOHGYplN8yeG3GamuhyXuJVDo = X-Sasl-enc: ewAiIly9lcpsjL2e1p6SUqKhHGxTnPRPMG0OvfDooHOU 1419613609 Original-Received: from fgunbin.local (unknown [94.25.218.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C7DB6800F1 for ; Fri, 26 Dec 2014 12:06:49 -0500 (EST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97735 Archived-At: Here's the patch on the subject. I'll apply it if no one objects. Filipp diff --git a/etc/NEWS b/etc/NEWS index 14933aa..9e0c9c7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -338,6 +338,11 @@ The remainder were: --- ** `Info-fontify-maximum-menu-size' can be t for no limit. ++++ +** `info-display-manual' can now be given a prefix argument which (any +non-nil value) directs the command to limit the choice of manual to +currently visited manuals. + --- ** ntlm.el has support for NTLM2. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2bee14..3119d80 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-26 Filipp Gunbin + + * info.el (info-display-manual): Limit the choice of manuals to + currently visited if prefix argument is non-nil. + 2014-12-25 Helmut Eller Dmitry Gutov diff --git a/lisp/info.el b/lisp/info.el index 7c4d7f3..c5e3b21 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -5277,13 +5277,15 @@ type returned by `Info-bookmark-make-record', which see." (defun info-display-manual (manual) "Display an Info buffer displaying MANUAL. If there is an existing Info buffer for MANUAL, display it. -Otherwise, visit the manual in a new Info buffer." +Otherwise, visit the manual in a new Info buffer. In interactive +use, a prefix argument directs this command to limit the choice +to currently visited manuals." (interactive (list (progn (info-initialize) (completing-read "Manual name: " - (info--manual-names) + (info--manual-names current-prefix-arg) nil t)))) (let ((blist (buffer-list)) (manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)")) @@ -5302,7 +5304,7 @@ Otherwise, visit the manual in a new Info buffer." (info (Info-find-file manual) (generate-new-buffer-name "*info*"))))) -(defun info--manual-names () +(defun info--manual-names (visited-only) (let (names) (dolist (buffer (buffer-list)) (with-current-buffer buffer @@ -5313,11 +5315,12 @@ Otherwise, visit the manual in a new Info buffer." (file-name-nondirectory Info-current-file)) names)))) (delete-dups (append (nreverse names) - (all-completions - "" - (apply-partially 'Info-read-node-name-2 - Info-directory-list - (mapcar 'car Info-suffix-list))))))) + (when (not visited-only) + (all-completions + "" + (apply-partially 'Info-read-node-name-2 + Info-directory-list + (mapcar 'car Info-suffix-list)))))))) (provide 'info)