unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
@ 2012-08-12 21:00 Drew Adams
  2012-08-13  2:39 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2012-08-12 21:00 UTC (permalink / raw)
  To: 12187

emacs -Q
 
Set option `Info-breadcrumbs-depth' to 0.
 
Visit an Info node.  You will see something like this:
 
 File: elisp.info,  Node: Introduction
 
We should not be displaying the suffix ".info".  The "file" name here is
intended to indicate which manual you are in.  Showing the ".info"
suffix is a distraction that reflects the implementation, and it wastes
space.  This is a (minor) regression.
 
In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600)
 of 2012-08-08 on DANI-PC
Bzr revision: 109511 michael.albinus@gmx.de-20120808134045-t26l1voivvzfypey
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -I../../libs/libxpm-3.5.8/include -I../../libs/libxpm-3.5.8/src
 -I../../libs/libpng-1.4.10 -I../../libs/zlib-1.2.6
 -I../../libs/giflib-4.1.4-1/include -I../../libs/jpeg-6b-4/include
 -I../../libs/tiff-3.8.2-1/include
 -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
 -I../../libs/gnutls-3.0.16/include
 -I../../libs/libiconv-1.14-2-mingw32-dev/include'
 






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

* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-12 21:00 bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix Drew Adams
@ 2012-08-13  2:39 ` Eli Zaretskii
  2012-08-13 13:45   ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2012-08-13  2:39 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12187

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Sun, 12 Aug 2012 14:00:25 -0700
> 
> emacs -Q
>  
> Set option `Info-breadcrumbs-depth' to 0.
>  
> Visit an Info node.  You will see something like this:
>  
>  File: elisp.info,  Node: Introduction
>  
> We should not be displaying the suffix ".info".  The "file" name here is
> intended to indicate which manual you are in.

No, it's a file name.  That's how all Info readers work.

This is not a bug.





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

* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-13  2:39 ` Eli Zaretskii
@ 2012-08-13 13:45   ` Stefan Monnier
  2012-08-13 13:55     ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2012-08-13 13:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 12187, Karl Berry

>> emacs -Q
>> 
>> Set option `Info-breadcrumbs-depth' to 0.
>> 
>> Visit an Info node.  You will see something like this:
>> 
>> File: elisp.info,  Node: Introduction
>> 
>> We should not be displaying the suffix ".info".  The "file" name here is
>> intended to indicate which manual you are in.

> No, it's a file name.  That's how all Info readers work.
> This is not a bug.

I agree it's not a bug, and not a regression in the Info reader either,
but IIUC having just "elisp" in there would work as well (because when
searching for "elisp" the Info reader also tries to look for
"elisp.info"), so I think it's a reasonable request to elide the
".info".
But I'm not sure if eliding should be the job of makeinfo or of the
Info renderer.


        Stefan





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

* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-13 13:45   ` Stefan Monnier
@ 2012-08-13 13:55     ` Drew Adams
  2012-08-13 15:44       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2012-08-13 13:55 UTC (permalink / raw)
  To: 'Stefan Monnier', 'Eli Zaretskii'
  Cc: 12187, 'KarlBerry'

> >> We should not be displaying the suffix ".info".  The 
> >> "file" name here is intended to indicate which manual you are in.
> 
> > No, it's a file name.  That's how all Info readers work.
> > This is not a bug.
> 
> I agree it's not a bug, and not a regression in the Info 
> reader either, but IIUC having just "elisp" in there would work
> as well (because when searching for "elisp" the Info reader also
> tries to look for "elisp.info"), so I think it's a reasonable
> request to elide the ".info".  But I'm not sure if eliding should
> be the job of makeinfo or of the Info renderer.

I can see both your points of view.

Eli, can you speak more of the advantage of showing the suffix?  E.g., are there
cases where there might be more than one manual with the same file name except
for the suffix?  And could you elaborate on how this relates to other Info
readers and why it can be important to show the suffix?

I was thinking of the suffix here as essentially noise.  But if there is a real
use for it then I would agree that it need not be removed.






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

* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-13 13:55     ` Drew Adams
@ 2012-08-13 15:44       ` Eli Zaretskii
  2012-08-13 16:10         ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2012-08-13 15:44 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12187, karl

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: "'KarlBerry'" <karl@freefriends.org>, <12187@debbugs.gnu.org>
> Date: Mon, 13 Aug 2012 06:55:25 -0700
> 
> Eli, can you speak more of the advantage of showing the suffix?  E.g., are there
> cases where there might be more than one manual with the same file name except
> for the suffix?

Yes, there could be more than one manual with the same name, however
unlikely.  Not sure how important that is, though.

> And could you elaborate on how this relates to other Info readers
> and why it can be important to show the suffix?

What you see is simply the header line of every node, verbatim, as
makeinfo generates it.  If you visit the Info file literally, that is
what you will see there at the beginning of each node.  I don't think
there's some deep philosophy here, just tradition and KISS, really.





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

* bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-13 15:44       ` Eli Zaretskii
@ 2012-08-13 16:10         ` Drew Adams
  2012-08-21 22:28           ` bug#12187: 24.1.50; " Juri Linkov
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2012-08-13 16:10 UTC (permalink / raw)
  To: 'Eli Zaretskii'; +Cc: 12187, karl

> > Eli, can you speak more of the advantage of showing the 
> > suffix?  E.g., are there cases where there might be more than
> > one manual with the same file name except for the suffix?
> 
> Yes, there could be more than one manual with the same name, however
> unlikely.  Not sure how important that is, though.

I would think that the suffix is not very important, and I have not heard
anything to the contrary.  If the user had access to two manuals in different
_locations_ but with the same name, then I can see an advantage in somehow
making the full file name evident.  (The file location is available in Emacs via
`pwd' etc.)

But I do not see an advantage in showing the suffix if there are two files in
the same location, one with suffix .info and the other without it. 

> > And could you elaborate on how this relates to other Info readers
> > and why it can be important to show the suffix?
> 
> What you see is simply the header line of every node, verbatim, as
> makeinfo generates it.  If you visit the Info file literally, that is
> what you will see there at the beginning of each node.  I don't think
> there's some deep philosophy here, just tradition and KISS, really.

I agree with Stefan - please elide the suffix in Emacs, at least.  That could be
done during rendering, if you do not think that makeinfo should do it generally.

From an Emacs _user_ perspective this is a regression.  Whereas, before, `File:'
indicated only the manual, now it shows also a file-name suffix.

Arguments saying, in effect, "but that _is_ the file" would be logically the
same if Emacs suddenly started showing the full file name ("path") in that
field.

What is useful to users is the non-directory and non-suffix part of the file
name: "elisp".  Especially since the suffix has no special meaning: there are
not different Info-file suffixes with different meanings, AFAIK.  For users, the
suffix is noise.






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

* bug#12187: 24.1.50; `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-13 16:10         ` Drew Adams
@ 2012-08-21 22:28           ` Juri Linkov
  2012-08-22 23:33             ` Juri Linkov
  0 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2012-08-21 22:28 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12187, karl

> I agree with Stefan - please elide the suffix in Emacs, at least.
> That could be done during rendering, if you do not think that
> makeinfo should do it generally.

This can be implemented in Emacs with the following patch.
The change should have no bad effect in case when makeinfo
will be changed to produce file names without suffix in the header.

=== modified file 'lisp/info.el'
--- lisp/info.el	2012-08-20 23:44:19 +0000
+++ lisp/info.el	2012-08-21 22:27:52 +0000
@@ -4537,7 +4537,17 @@ (defun Info-fontify-node ()
              ((not (bobp))
               ;; Hide the punctuation at the end, too.
               (skip-chars-backward " \t,")
-              (put-text-property (point) header-end 'invisible t))))))
+              (put-text-property (point) header-end 'invisible t)
+	      ;; Hide the suffix of the Info file name.
+	      (beginning-of-line)
+	      (if (re-search-forward
+		   (concat (format "File: %s\\([^,\n\t]*\\)"
+				   (if (stringp Info-current-file)
+				       (file-name-nondirectory Info-current-file)
+				     Info-current-file)))
+		   header-end t)
+		  (put-text-property (match-beginning 1) (match-end 1)
+				     'invisible t)))))))
 
       ;; Fontify titles
       (goto-char (point-min))





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

* bug#12187: 24.1.50; `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
  2012-08-21 22:28           ` bug#12187: 24.1.50; " Juri Linkov
@ 2012-08-22 23:33             ` Juri Linkov
  0 siblings, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2012-08-22 23:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12187-done, karl

>> I agree with Stefan - please elide the suffix in Emacs, at least.
>> That could be done during rendering, if you do not think that
>> makeinfo should do it generally.
>
> This can be implemented in Emacs with the following patch.
> The change should have no bad effect in case when makeinfo
> will be changed to produce file names without suffix in the header.

Installed and closed.





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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-12 21:00 bug#12187: 24.1.50; Regression: `Info-breadcrumbs-depth' should show `File:' without ".info" suffix Drew Adams
2012-08-13  2:39 ` Eli Zaretskii
2012-08-13 13:45   ` Stefan Monnier
2012-08-13 13:55     ` Drew Adams
2012-08-13 15:44       ` Eli Zaretskii
2012-08-13 16:10         ` Drew Adams
2012-08-21 22:28           ` bug#12187: 24.1.50; " Juri Linkov
2012-08-22 23:33             ` Juri Linkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).