GNU bug report logs -
#13016
24.3.50; Inconsistency in the way of presenting the filename in info buffers.
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Tue, 27 Nov 2012 23:24:02 UTC
Severity: minor
Found in version 24.3.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 13016 <at> debbugs.gnu.org (full text, mbox):
> 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))
This bug report was last modified 12 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.