From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers. Date: Sat, 08 Dec 2012 01:54:20 +0200 Organization: JURTA Message-ID: <87pq2la1d7.fsf@mail.jurta.org> References: <87wqwtev3v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354925148 11993 80.91.229.3 (8 Dec 2012 00:05:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 00:05:48 +0000 (UTC) Cc: 13016@debbugs.gnu.org, Chong Yidong To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 08 01:06:01 2012 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 1Th7vd-0003tc-5x for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Dec 2012 01:06:01 +0100 Original-Received: from localhost ([::1]:56056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th7vQ-0004Y6-Or for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Dec 2012 19:05:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th7vN-0004Xi-NU for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 19:05:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th7vL-0007f9-Fm for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 19:05:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th7vL-0007f1-C2 for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 19:05:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Th7ve-00008v-Sa for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 19:06:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Dec 2012 00:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13016 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13016-submit@debbugs.gnu.org id=B13016.1354925142508 (code B ref 13016); Sat, 08 Dec 2012 00:06:02 +0000 Original-Received: (at 13016) by debbugs.gnu.org; 8 Dec 2012 00:05:42 +0000 Original-Received: from localhost ([127.0.0.1]:59542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th7vJ-000086-Jl for submit@debbugs.gnu.org; Fri, 07 Dec 2012 19:05:42 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:44806 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th7vG-00007w-5M for 13016@debbugs.gnu.org; Fri, 07 Dec 2012 19:05:39 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id DE9DF46FA010; Fri, 7 Dec 2012 16:05:12 -0800 (PST) In-Reply-To: (Dani Moncayo's message of "Fri, 7 Dec 2012 17:16:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:68154 Archived-At: > The original problem is fixed, but I still see one: After opening an > info manual via `C-u C-h i ...', if I try to define a bookmark via > `C-x r m', the default value in the minibuffer prompt does have the > ".info" extension (like others default values brought by `M-n'). > > The ".info" extension should be removed there too. Searching the source file info.el for more occurrences of (file-name-nondirectory Info-current-file) also finds the same problem in other places like when typing `w' (Info-copy-current-node-name), and in `Info-breadcrumbs' and `Info-fontify-node'. If using `file-name-sans-extension' is the right way to fix them, then all they could be fixed with: === modified file 'lisp/info.el' --- lisp/info.el 2012-12-07 23:15:16 +0000 +++ lisp/info.el 2012-12-07 23:53:00 +0000 @@ -4064,7 +4064,9 @@ (defun Info-copy-current-node-name (&opt (unless Info-current-node (user-error "No current Info node")) (let ((node (if (stringp Info-current-file) - (concat "(" (file-name-nondirectory Info-current-file) ") " + (concat "(" (file-name-sans-extension + (file-name-nondirectory Info-current-file)) + ") " Info-current-node)))) (if (zerop (prefix-numeric-value arg)) (setq node (concat "(info \"" node "\")"))) @@ -4451,7 +4453,8 @@ (defun Info-breadcrumbs () (if (not (equal node "Top")) node (format "(%s)Top" (if (stringp Info-current-file) - (file-name-nondirectory Info-current-file) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)) ;; Some legacy code can still use a symbol. Info-current-file))))) (setq line (concat @@ -4563,7 +4566,8 @@ (defun Info-fontify-node () (if (re-search-forward (format "File: %s\\([^,\n\t]+\\)," (if (stringp Info-current-file) - (file-name-nondirectory Info-current-file) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)) Info-current-file)) header-end t) (put-text-property (match-beginning 1) (match-end 1) @@ -5101,7 +5105,8 @@ (defun Info-bookmark-make-record () "This implements the `bookmark-make-record-function' type (which see) for Info nodes." (let* ((file (and (stringp Info-current-file) - (file-name-nondirectory Info-current-file))) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)))) (bookmark-name (if file (concat "(" file ") " Info-current-node) Info-current-node))