all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
@ 2012-11-27 23:21 Dani Moncayo
  2012-12-07 15:32 ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Dani Moncayo @ 2012-11-27 23:21 UTC (permalink / raw)
  To: 13016

Hi,

If I open an info manual with `C-u C-h i <path-to-info-file> <RET>',
the modeline of the *info* buffer shows the info file name including
also its ".info" extension.  E.g., if I open the emacs manual that
way, I see `*info* (emacs.info) Top' in the modeline.  But when I open
that same manual via `C-h r' or `C-h i m emacs RET', the ".info" part
is omitted.

I don't see the point of this inconsistency.

Unless I'm missing something, TRT here would be to always omit the
".info" part, since I guess it is always the same.  But in any case,
the way of showing the filename in the modeline should not depend on
the way of opening the info file.


In GNU Emacs 24.3.50.1 (i386-mingw-nt6.1.7601)
 of 2012-11-27 on MS-W7-DANI
Bzr revision: 111020 rgm@gnu.org-20121127164004-lgc8r83an332hury
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src
 -Ic:/emacs/libs/libpng-1.2.37-lib/include -Ic:/emacs/libs/zlib-1.2.5
 -Ic:/emacs/libs/giflib-4.1.4-1-lib/include
 -Ic:/emacs/libs/jpeg-6b-4-lib/include
 -Ic:/emacs/libs/tiff-3.8.2-1-lib/include
 -Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include
 -Ic:/emacs/libs/libiconv-1.9.2-1-lib/include'

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

-- 
Dani Moncayo





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
  2012-11-27 23:21 bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers Dani Moncayo
@ 2012-12-07 15:32 ` Chong Yidong
  2012-12-07 16:16   ` Dani Moncayo
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2012-12-07 15:32 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 13016-done

Dani Moncayo <dmoncayo@gmail.com> writes:

> If I open an info manual with `C-u C-h i <path-to-info-file> <RET>',
> the modeline of the *info* buffer shows the info file name including
> also its ".info" extension.  E.g., if I open the emacs manual that
> way, I see `*info* (emacs.info) Top' in the modeline.  But when I open
> that same manual via `C-h r' or `C-h i m emacs RET', the ".info" part
> is omitted.
>
> I don't see the point of this inconsistency.

Fixed in trunk, thanks.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
  2012-12-07 15:32 ` Chong Yidong
@ 2012-12-07 16:16   ` Dani Moncayo
  2012-12-07 23:54     ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Dani Moncayo @ 2012-12-07 16:16 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13016-done

> Fixed in trunk, thanks.

Thanks Chong.

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.

TIA.

-- 
Dani Moncayo





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
  2012-12-07 16:16   ` Dani Moncayo
@ 2012-12-07 23:54     ` Juri Linkov
  2012-12-08  2:13       ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2012-12-07 23:54 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 13016, Chong Yidong

> 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))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
  2012-12-07 23:54     ` Juri Linkov
@ 2012-12-08  2:13       ` Chong Yidong
  2012-12-08 23:12         ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2012-12-08  2:13 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 13016

Juri Linkov <juri@jurta.org> writes:

> 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:

Looks fine to me (or we could define a `Info-current-manual' subroutine
for that).  Please, go ahead.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers.
  2012-12-08  2:13       ` Chong Yidong
@ 2012-12-08 23:12         ` Juri Linkov
  0 siblings, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2012-12-08 23:12 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 13016

>> If using `file-name-sans-extension' is the right way
>> to fix them, then all they could be fixed with:
>
> Looks fine to me (or we could define a `Info-current-manual' subroutine
> for that).  Please, go ahead.

Installed without `Info-current-manual' (there is duplicate code in many
other places in info.el that might need refactoring as a separate task).





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-08 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 23:21 bug#13016: 24.3.50; Inconsistency in the way of presenting the filename in info buffers Dani Moncayo
2012-12-07 15:32 ` Chong Yidong
2012-12-07 16:16   ` Dani Moncayo
2012-12-07 23:54     ` Juri Linkov
2012-12-08  2:13       ` Chong Yidong
2012-12-08 23:12         ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.