From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Hiding *Note:: "tags" in info files Date: 31 Oct 2002 00:51:44 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5xvg3jo57z.fsf@kfs2.cua.dk> References: <20021029120319.95A4F7C012@mail.filanet.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1036018535 9475 80.91.224.249 (30 Oct 2002 22:55:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2002 22:55:35 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1871kL-0002Sc-00 for ; Wed, 30 Oct 2002 23:55:33 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1871pe-0007dO-00 for ; Thu, 31 Oct 2002 00:01:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 1871hg-0007Im-00; Wed, 30 Oct 2002 17:52:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 1871go-0006WI-00 for emacs-devel@gnu.org; Wed, 30 Oct 2002 17:51:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 1871gi-0006IG-00 for emacs-devel@gnu.org; Wed, 30 Oct 2002 17:51:50 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 1871gh-0006Ev-00; Wed, 30 Oct 2002 17:51:47 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id B35FA7C019; Wed, 30 Oct 2002 22:51:44 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 73 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8977 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8977 Richard Stallman 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 "\\" 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 "\\" Info-current-node)) -- Kim F. Storm http://www.cua.dk