From: Juri Linkov <juri@jurta.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 12187@debbugs.gnu.org, karl@freefriends.org
Subject: bug#12187: 24.1.50; `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
Date: Wed, 22 Aug 2012 01:28:51 +0300 [thread overview]
Message-ID: <87r4qzubfg.fsf_-_@mail.jurta.org> (raw)
In-Reply-To: <8595694B4937406D9918DAF1268002E5@us.oracle.com> (Drew Adams's message of "Mon, 13 Aug 2012 09:10:44 -0700")
> 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))
next prev parent reply other threads:[~2012-08-21 22:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Juri Linkov [this message]
2012-08-22 23:33 ` bug#12187: 24.1.50; " Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4qzubfg.fsf_-_@mail.jurta.org \
--to=juri@jurta.org \
--cc=12187@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=karl@freefriends.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).