From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Hiding *Note:: "tags" in info files
Date: 31 Oct 2002 00:51:44 +0100 [thread overview]
Message-ID: <5xvg3jo57z.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <E186wSv-0002t4-00@fencepost.gnu.org>
Richard Stallman <rms@gnu.org> writes:
> The result isn't perfect, since the wording around some of the nodes
> become a bit sparse, e.g. (upper case indicates highlighting)
>
> *Note GETTING A PRINTED MANUAL::, if you would like a paper copy of
> the Emacs manual.
>
> (which isn't perfect English either) becomes
>
> GETTING A PRINTED MANUAL, if you would like a paper copy of
> the Emacs manual.
>
> In the printed output, we would put "See " at the beginning".
> Perhaps you can use a before-string to insert "See " before
> the xref text.
The following improved patch does that for *Note but not for *note.
BTW, should it handle *note Item: Section. differently from *note Item::
(e.g. by hiding the Section part)?
In any case, there are many incorrect uses of *Note: in the info files,
so you will still see a some "see See ..." occurrences.
Index: info.el
===================================================================
RCS file: /cvs/emacs/lisp/info.el,v
retrieving revision 1.318
diff -c -r1.318 info.el
*** info.el 8 Oct 2002 04:57:27 -0000 1.318
--- info.el 30 Oct 2002 15:47:22 -0000
***************
*** 2712,2724 ****
(add-text-properties (match-beginning 2) (1+ (match-end 2))
'(invisible t intangible t))))
(goto-char (point-min))
! (while (re-search-forward "\\*Note[ \n\t]+\\([^:]*\\):" nil t)
(if (= (char-after (1- (match-beginning 0))) ?\") ; hack
nil
(add-text-properties (match-beginning 1) (match-end 1)
'(font-lock-face info-xref
mouse-face highlight
! help-echo "mouse-2: go to this node"))))
(goto-char (point-min))
(if (and (search-forward "\n* Menu:" nil t)
(not (string-match "\\<Index\\>" Info-current-node))
--- 2712,2731 ----
(add-text-properties (match-beginning 2) (1+ (match-end 2))
'(invisible t intangible t))))
(goto-char (point-min))
! (while (re-search-forward "\\(\\*Note[ \n\t]+\\)\\([^:]*\\)\\(:+\\)" nil t)
(if (= (char-after (1- (match-beginning 0))) ?\") ; hack
nil
(add-text-properties (match-beginning 1) (match-end 1)
+ (if (= (char-after (1+ (match-beginning 1))) ?N)
+ '(display "See ")
+ '(invisible t)))
+ (add-text-properties (match-beginning 2) (match-end 2)
'(font-lock-face info-xref
mouse-face highlight
! help-echo "mouse-2: go to this node"))
! (add-text-properties (match-beginning 3) (match-end 3)
! '(invisible t))))
!
(goto-char (point-min))
(if (and (search-forward "\n* Menu:" nil t)
(not (string-match "\\<Index\\>" Info-current-node))
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-10-30 23:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-29 12:03 Hiding *Note:: "tags" in info files Kim F. Storm
2002-10-29 17:11 ` Francesco Potorti`
2002-10-29 19:42 ` Eli Zaretskii
2002-10-30 17:17 ` Richard Stallman
2002-10-30 23:51 ` Kim F. Storm [this message]
2002-10-31 4:07 ` Karl Eichwalder
2002-10-31 4:24 ` Miles Bader
2002-10-31 6:00 ` Eli Zaretskii
2002-10-31 17:27 ` Richard Stallman
2002-11-01 0:10 ` Kim F. Storm
2002-11-01 2:24 ` Karl Eichwalder
2002-11-01 8:01 ` Eli Zaretskii
2002-11-01 15:30 ` Stefan Monnier
2002-11-01 23:22 ` Kim F. Storm
2002-11-02 8:08 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2002-10-30 11:49 Kim F. Storm
2002-10-30 13:20 ` Andreas Schwab
2002-10-30 14:14 ` Eli Zaretskii
2002-10-30 19:14 ` Andreas Schwab
2002-10-31 17:26 ` Richard Stallman
2002-11-01 8:57 Kim F. Storm
2002-11-01 9:34 ` Karl Eichwalder
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=5xvg3jo57z.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.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).