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: Sat, 27 Dec 2014 03:08:57 +0300 Message-ID: References: <83wq5ekrdx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419639023 24860 80.91.229.3 (27 Dec 2014 00:10:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Dec 2014 00:10:23 +0000 (UTC) Cc: 19443@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 27 01:10:12 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 1Y4exQ-0005KV-7X for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Dec 2014 01:10:12 +0100 Original-Received: from localhost ([::1]:54686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4exP-0004c7-8Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Dec 2014 19:10:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4exL-0004Zb-Vf for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 19:10:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4exH-0005r4-B4 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 19:10:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4exH-0005qb-3z for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 19:10:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4exG-0003XU-9K for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 19:10: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: Sat, 27 Dec 2014 00:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19443 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19443-submit@debbugs.gnu.org id=B19443.141963894713525 (code B ref 19443); Sat, 27 Dec 2014 00:10:02 +0000 Original-Received: (at 19443) by debbugs.gnu.org; 27 Dec 2014 00:09:07 +0000 Original-Received: from localhost ([127.0.0.1]:58477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4ewM-0003W4-VB for submit@debbugs.gnu.org; Fri, 26 Dec 2014 19:09:07 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58484) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4ewG-0003Va-FX for 19443@debbugs.gnu.org; Fri, 26 Dec 2014 19:09:05 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 60271207FA for <19443@debbugs.gnu.org>; Fri, 26 Dec 2014 19:09:00 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 26 Dec 2014 19:09:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= x-sasl-enc:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=mesmtp; bh=ihffV8Dq5/pe vml8WlDsp7/U5lo=; b=PYj9KefEtqauBsInyjl3ne1dMpmndip6waSgdimDMFX/ 8o17fA333yuCpVkBvBuOUE9nz77kOU5Y9nPvPc3s08I0msiVhYnhzpGha1EYA/MM JcbyjmFdDX/YG3TXAsEMubC8Jgz6Ay9V8vMefonTeyfGZCcUNQSZ38rcpqw4TUE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:cc:subject:references :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=ihffV8Dq5/pevml8WlDsp7/U5lo=; b=PxsJE0yqXtI4fwcCxZAm 6bGb+3rBnguGjzkV4NjLsEJkVmQuu0LBXvKR9J6jJpfY6bZETw5mFcCr3EkksKQi bYCNuRjGPNb6wUFczAi1czNLOu2H7kbrx6N189xQTA/MfCshL9yZtF4dMx+uSbjm I5VX4dOFIGM+dzwa+c9QNZ4= X-Sasl-enc: EH5tbOwA5AFrxwdDHhyR5KJylpkyDY5dgl5dBYjYKZdJ 1419638939 Original-Received: from fgunbin.local (unknown [178.66.176.174]) by mail.messagingengine.com (Postfix) with ESMTPA id 8743C680076; Fri, 26 Dec 2014 19:08:59 -0500 (EST) In-Reply-To: <83wq5ekrdx.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Dec 2014 23:55:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) 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:97747 Archived-At: On 26/12/2014 23:55 +0200, Eli Zaretskii wrote: >> From: Filipp Gunbin >> Date: Fri, 26 Dec 2014 20:06:45 +0300 >> >> Here's the patch on the subject. I'll apply it if no one objects. > > Fine with me, thanks. > > One minor comment about the doc string: you are talking about "the > choice", but no choice was mentioned before in the doc string. This > might confuse the user. I think you should mention completion in > order to make this clear. Ok, changed to "completion alternatives". Thanks. diff --git a/etc/NEWS b/etc/NEWS index 14933aa..315332f 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 completion +alternatives to currently visited manuals. + --- ** ntlm.el has support for NTLM2. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2bee14..d3d587d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-26 Filipp Gunbin + + * info.el (info-display-manual): Limit the completion alternatives + to currently visited manuals 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..33e982d 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 +completion alternatives 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)