unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: info faces for strings and quotations
Date: Wed, 6 Oct 2004 14:36:40 -0700	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBAECCCIAA.drew.adams@oracle.com> (raw)
In-Reply-To: <m1CFFGR-000UN8C@rattlesnake.com>


[-- Attachment #1.1: Type: text/plain, Size: 3038 bytes --]

Thanks, Bob. I'm glad someone played with the code and reported on what it
does. The incidents you mention where highlighting was not correct are the
kinds of thing I found too. I missed the last incident you mentioned. I did
run quickly through all the nodes of 33 manuals late last night, and I
probably missed a few others, as well. I wasn't hoping to be exhaustive in
my report, but to give a good idea of 1) the relative frequency of problems
(small) and 2) the kinds of problems encountered.

The problems you mention fall into this class: `...' highlighting does not
allow for unescaped enclosed ' marks, as in `foobar 'baz'. Highlighting here
will be only around the word (and space) "foobar ". So, in particular, it
will fail on single-quoted Lisp sexps with quotes in them, such as `(foobar
'baz)'. I think this is something we can live with.
  The Info buffer fails to highlight properly when the Info file is produced
from a correct Texinfo source... `(apply 'max numbers-list)'  Using the
patch, only `apply' is highlighted.
That's what I reported too. I guess you are confirming this and also
reporting that the Info text was correctly generated from Texinfo source.
Yes, there is nothing wrong with the Info text -- the highlighting fails on
it; that's all.
  There are also problems with @samp, which also puts single quotes around
its arguments, as in `Symbol's function definition is void: this'. Only
`Symbol' is highlighted.
Yes, for the same reason. I guess you are also saying something about the
mapping from Texinfo @samp. Again, there is nothing wrong with the Info
text.

The highlighting is not very smart, but it works most of the time. Note too
that, in this case, it would in fact be more proper (from a doc point of
view), to use double-quotes around the English expression that is being
discussed -- and in that case the highlighting works as it should. I'm not
saying that using @samp is wrong here; I'm just saying that in technical
documentation double-quotes would normally be used here.

FYI, here is the paragraph you cited, with double-quotes instead of
single-quotes, as it would appear highlighted:
  The error message can be understood: "Symbol's function definition is
void: this".  The symbol (that is, the word `this') lacks instructions for
the computer to carry out.
Don't get me wrong -- I'm not suggesting that this Info text needs to be
changed, or that any text should be changed just to fit the highlighting
code!  I'm simply saying: 1) yes, the highlighting code fails on text like
this, 2) this particular text would perhaps be better using double-quotes,
anyway (for reasons unrelated to highlighting), and 3) if the text used
double-quotes there would be no highlighting problem here.

Another common case that I reported on last night was backslashes between
single-quotes, where the backslashes were not escaping anything. I've fixed
the regexp to treat this, and have sent a new patch to the list
(separately).

Thanks for spending time on this and reporting carefully.

 - Drew

[-- Attachment #1.2: Type: text/html, Size: 5318 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2004-10-06 21:36 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-03  7:05 info faces for strings and quotations Drew Adams
2004-10-05  7:15 ` Drew Adams
2004-10-05  7:30   ` Miles Bader
2004-10-06  8:34     ` Matt Hodges
2004-10-05  8:58   ` Drew Adams
2004-10-05 11:43     ` Stefan
2004-10-05 11:56   ` Stefan
2004-10-05 16:11     ` Drew Adams
2004-10-06  2:25       ` Luc Teirlinck
2004-10-06  4:19         ` Drew Adams
2004-10-06  4:28           ` Miles Bader
2004-10-06  7:40             ` Drew Adams
2004-10-06 21:32               ` Drew Adams
2004-10-06  4:53           ` Stefan Monnier
2004-10-06  7:07             ` Drew Adams
2004-10-06 17:07               ` Robert J. Chassell
2004-10-06 21:36                 ` Drew Adams [this message]
2004-10-07  5:53                 ` Juri Linkov
2004-10-07  6:53                   ` Drew Adams
2004-10-07 14:58                     ` Stefan Monnier
2004-10-07 15:13                       ` David Kastrup
2004-10-07 17:01                         ` Stefan Monnier
2004-10-08  5:13                           ` Drew Adams
2004-10-07 15:13                       ` Kim F. Storm
2004-10-07 16:35                         ` David Kastrup
2004-10-08  0:33                   ` Luc Teirlinck
2004-10-08 16:04                   ` Richard Stallman
2004-10-08 16:51                     ` Luc Teirlinck
2004-10-09 15:45                       ` Richard Stallman
2004-10-08 20:00                     ` Robert J. Chassell
2004-10-07  5:57               ` Juri Linkov
2004-10-07 15:22               ` w3 mode Camm Maguire
2004-10-07 17:03                 ` Stefan Monnier
2004-10-07 17:25                   ` Camm Maguire
2004-10-07 17:37                     ` Mark Plaksin
2004-10-07 17:45                     ` Kevin Rodgers
2004-10-08 16:05                 ` Richard Stallman
2004-10-08 17:44                   ` David Kastrup
2004-10-07 15:28               ` unexec development Camm Maguire
2004-10-15 14:10                 ` Camm Maguire
2004-10-15 14:35                   ` Jan D.
2004-10-15 21:11                     ` Camm Maguire
2004-10-16 13:52                   ` Richard Stallman
2004-10-06  8:44         ` info faces for strings and quotations Oliver Scholz
2004-10-07  5:55       ` Juri Linkov
2004-10-07  7:13         ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2004-10-05 16:15 LENNART BORGMAN
2004-10-05 16:28 ` Drew Adams

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=FDELKNEBLPKKDCEBEJCBAECCCIAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).