unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org, janneke@gnu.org
Subject: Re: [PATCH] ignoring Info extensions
Date: Fri, 02 Apr 2004 21:19:17 +0300	[thread overview]
Message-ID: <87n05udyze.fsf@mail.jurta.org> (raw)
In-Reply-To: <200404021416.i32EGYj01894@f7.net> (Karl Berry's message of "Fri, 2 Apr 2004 09:16:34 -0500")

karl@freefriends.org (Karl Berry) writes:
>     juri> I think `*Note' quoted with a preceding
>     ` or " character should not be considered as a valid reference
>
> I guess I can't think of a reason to write something like `@ref{foo}' or
> "@ref{foo}", and I don't see any cases in reality, so this might be ok,
> but neither am I clear as to why it is necessary.  What does
> fontification have to do with quote chars?  (Sorry, I could not quickly
> make sense of the code.)  Could you explain a little?

There are three cases with quoted `*Note' I was able to find:

./info.info:like a menu item except that it has `*note' instead of `*'.  It
./info-stnd.info:with `*Note', and continue with a label and a target.
./texinfo-1:     or an Info cross-reference saying `*Note NAME: NODE.'.

Currently they are fontified incorrectly: the text between them and
the next reference in the same Info node with them is very distorted.

However, the first two cases will be fixed when the reference regexp
will be changed to \*Note[ \t\n]+ because they have no whitespace
after *Note.  And the third case (in texinfo-1), even though it has
whitespace after *Note, is not a problem at all, because it's just
an example.  Moreover, by coincidence, it refers to the node named
`NODE', and the Texinfo manual has a node with the same name,
so this reference is not broken!

Currently the function `Info-fontify-node' has the code to skip the
reference if the preceding character is ".  The commentary says that
it's a "hack".  I haven't seen Info references with a leading ".
Could someone tell is this code really needed.  Otherwise, it could be
removed.

>     eliz> How about if we instead detect the "*Note:*" case and don't
>     treat it as a reference?  
>
> I believe this amounts to *Note:[^*] (vs. *Note:\s).  I think either one
> is ok, it won't make any difference in practice.  I slightly tend toward
> the latter, because it is clearer to understand "*Note: is always
> followed by whitespace" rather than "*Note: is followed by anything
> except a *" (which, in practice, is always whitespace).

I guess you actually meant *Note[^:*] vs. *Note\s.  Anyway,
restricting the character after *Note to [:*] instead of
whitespace apparently will not solve the problem for all
known references.  Here is the distribution of \*Note[^ \t]+
matches on the biggest Info base I found:

     78 *Note:*
      8 *NOTEBOOK,
      6 *Note:
      4 *NOTE:*
      4 *NOTE*
      3 *Note*:
      2 *note:*
      2 *NOTEBOOK)
      2 *NOTE*:
      1 *note*
      1 *Notes:*
      1 *Note2:
      1 *note'
      1 *Note',

So perhaps whitespace is a better choice.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2004-04-02 18:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-11 19:47 resend: [PATCH] ignoring Info extensions Jan Nieuwenhuizen
2004-03-14  7:39 ` Eli Zaretskii
2004-03-14 12:53   ` Jan Nieuwenhuizen
2004-03-29  7:57   ` Jan Nieuwenhuizen
2004-03-31 20:56     ` Juri Linkov
2004-04-01  2:01       ` Karl Berry
2004-04-01  5:53         ` Eli Zaretskii
2004-04-01 16:33         ` Juri Linkov
2004-04-01 19:53           ` Eli Zaretskii
2004-04-02  3:27             ` Juri Linkov
2004-04-02  7:47               ` Eli Zaretskii
2004-04-03  1:30               ` Richard Stallman
2004-04-02  1:50           ` Karl Berry
2004-04-02  3:32             ` Juri Linkov
2004-04-02 14:16               ` Karl Berry
2004-04-02 18:19                 ` Juri Linkov [this message]
2004-04-02 19:28                   ` Eli Zaretskii
2004-04-02 21:38                     ` Juri Linkov
2004-04-03  0:19                     ` Karl Berry
2004-04-02 19:29                 ` Eli Zaretskii
2004-04-02  7:43             ` Eli Zaretskii
2004-04-02 21:47         ` Juri Linkov
2004-04-03  1:25           ` Karl Berry
2004-04-03  4:56             ` Juri Linkov
2004-04-03  9:05             ` Eli Zaretskii
2004-04-03 23:39           ` Richard Stallman

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=87n05udyze.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=janneke@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).