From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: pxref Date: Mon, 24 Oct 2005 20:17:01 +0000 (UTC) Message-ID: References: <17238.44739.179203.166568@kahikatea.snap.net.nz> <87irvstp4p.fsf@jurta.org> <87k6g8cf1c.fsf@jurta.org> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1130185150 11517 80.91.229.2 (24 Oct 2005 20:19:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2005 20:19:10 +0000 (UTC) Cc: bob@rattlesnake.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 22:19:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EU8l1-0001Vr-D7 for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2005 22:17:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EU8l0-00052K-O9 for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2005 16:17:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EU8ks-00052F-1s for emacs-devel@gnu.org; Mon, 24 Oct 2005 16:17:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EU8kr-000523-Gv for emacs-devel@gnu.org; Mon, 24 Oct 2005 16:17:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EU8kr-000520-Bz for emacs-devel@gnu.org; Mon, 24 Oct 2005 16:17:13 -0400 Original-Received: from [69.168.108.225] (helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EU8kr-0003Ye-5q for emacs-devel@gnu.org; Mon, 24 Oct 2005 16:17:13 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Mon, 24 Oct 2005 20:17:01 +0000 (UTC) Original-To: emacs-devel@gnu.org In-reply-to: (rms@gnu.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44755 Archived-At: Now I understand what is your complaint. Yes, I agree that the sentence produced by an @xref should begin with a capitalized "See". Isn't that how they actually begin, in the Info file? That is the bug: sentences stopped beginning that way in the default. (Using today's CVS snapshot.) There are two reasons that I discovered in emacs/lisp/info.el in `Info-fontify-node': * First, the previous line of text, before a blank line, ended with a colon. (You can see that here.) A colon followed by a blank line should not force lower case when a blank line intervenes. To fix, move the colon from the conditional that always produces a lower case `see' and to the conditional that produces an upper case `See' and add a colon to the conditional involving a blank line. * Second, the `Info-fontify-node' function used `looking-at' rather than `looking-back' which meant never checking backwards. To fix, replace `looking-at' with `looking-back'. I think these two changes fix all the problems; but I do not use the default except for tests and would appreciate your trying this yourself. Thank you. Here is the diff: diff -c2p /usr/local/src/emacs/lisp/info.el.\~1.453.\~ /usr/local/src/emacs/lisp/info.el *** /usr/local/src/emacs/lisp/info.el.~1.453.~ Mon Oct 24 19:22:40 2005 --- /usr/local/src/emacs/lisp/info.el Mon Oct 24 20:10:24 2005 *************** the variable `Info-file-list-for-emacs'. *** 3738,3744 **** (skip-syntax-backward " ") (setq other-tag ! (cond ((memq (char-before) '(nil ?\. ?! ??)) "See ") ! ((memq (char-before) '(?\, ?\; ?\: ?-)) "see ") ((memq (char-before) '(?\( ?\[ ?\{)) --- 3738,3744 ---- (skip-syntax-backward " ") (setq other-tag ! (cond ((memq (char-before) '(nil ?\. ?! ?\: ??)) "See ") ! ((memq (char-before) '(?\, ?\; ?-)) "see ") ((memq (char-before) '(?\( ?\[ ?\{)) *************** the variable `Info-file-list-for-emacs'. *** 3746,3753 **** ;; an end of sentence (skip-syntax-backward " (") ! (if (memq (char-before) '(nil ?\. ?! ??)) "See " "see ")) ! ((save-match-data (looking-at "\n\n")) "See ")))) (goto-char next) --- 3746,3753 ---- ;; an end of sentence (skip-syntax-backward " (") ! (if (memq (char-before) '(nil ?\. ?! ?\: ??)) "See " "see ")) ! ((save-match-data (looking-back "\n\n")) "See ")))) (goto-char next) Here is a test Texinfo file that you can convert to Info: \input texinfo.tex @c -*-texinfo-*- @comment %**start of header @setfilename foo.info @settitle Texinfo Test @smallbook @comment %**end of header @ignore ## Summary of shell commands to create various output formats: pushd /u/texinfo/ ## Info output makeinfo --force --fill-column=70 --no-split --paragraph-indent=0 \ --verbose foo.texi ## ;; (kill-buffer "*info*") ## ;; (info "/u/texinfo/foo.info" nil) ## DVI output texi2dvi foo.texi ## View DVI output ## xdvi foo.dvi & ## HTML output makeinfo --no-split --html foo.texi ## Plain text output makeinfo --fill-column=70 --no-split --paragraph-indent=0 \ --verbose --no-headers --output=foo.txt \ foo.texi ## DocBook output makeinfo --docbook --no-split --paragraph-indent=0 \ --verbose foo.texi ## XML output makeinfo --xml --no-split --paragraph-indent=0 \ --verbose foo.texi popd @end ignore @titlepage @sp 6 @re@center @titlefont{Test document} @sp 4 @center by Robert J. Chassell @page @vskip 0pt plus 1filll @end titlepage @contents @ifnottex @node Top, Chapter One, (dir), (dir) @top Test Top @end ifnottex @menu * Chapter One:: * Musings on fossil fuels:: @end menu @node Chapter One, Musings on fossil fuels, Top, Top @chapter Chapter One Contents of chapter 1. See @url{http://www.rattlesnake.com/notions/Choice-and-Constraint.html}, which is intended as a description of `what is' @dots{} not the `what is' that most often concern citizens, politicians, and political scientists, but a `what is' that reflects the current world and of `what can be done'. Here is an @@pxref (@pxref{Musings on fossil fuels}) in a sentence. Here is a standalone xref within parentheses: (@xref{Musings on fossil fuels}.) Here is another @@xref, no parentheses; this ends with a colon and is followed by a blank line: @xref{Musings on fossil fuels}. Here is another @@xref, no parentheses; this ends with a period and is followed by a blank line. @xref{Musings on fossil fuels}. More contents of chapter 1. @node Musings on fossil fuels, , Chapter One, Top @chapter Musings on Fossil Fuels More than three decades ago, some modern people I knew tried to replace fossil fuels with alternate sources of energy. @bye -- Robert J. Chassell bob@rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.rattlesnake.com http://www.teak.cc