GNU bug report logs - #3312
23.0.93; Use punctuation syntax for apostrophe in Info

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 16 May 2009 22:10:04 UTC

Severity: normal

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3312 in the body.
You can then email your comments to 3312 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sat, 16 May 2009 22:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 16 May 2009 22:10:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sat, 16 May 2009 15:02:51 -0700
I don't know if this would be appropriate for all Info manuals, but at
least for Emacs, Elisp, Eintr, and Efaq it makes sense, I think.
 
Apostrophe, or single quote, (') currently has word-constituent syntax
in Info, which it inherits from text-mode.
 
This means that if point is inside some `...'  string, and you use
`C-s C-w', you will pick up also the ' at the end as part of the
search string, which is typically not what you want.
 
If the syntax class for ' were `punctuation' instead of `word', then
you could more easily pick up key sequences, function names, and
variable names that are quoted: `C-x C-x' or `char-syntax', for
example.
 
Yes, you can today pick up everything, including the ` and the ', by
positioning the cursor on the `, but if you want just the quoted
content or some suffix of it, and not the quoting delimiters, you
get the ' too, which is not what you want.
 
If this makes sense for all Info manuals, then a simple fix would
presumably be to change this (in the definition of `info-mode'):
 
(set-syntax-table text-mode-syntax-table)
 
To this:
 
(set-syntax-table
  (copy-syntax-table text-mode-syntax-table))
(modify-syntax-entry ?' ".")
 
I don't know much about text-mode, but I wonder if even there it might
make sense for ' to have syntax class `punctuation' instead of
`word'. Probably the answer is "no", or that would already be the
case. ;-)
 
I see this in `text-mode.el':
 ;; We add `p' so that M-c on 'hello' leads to 'Hello'
 ;; rather than 'hello'.
 (modify-syntax-entry ?' "w p" st)
 
That explains why p was added, but not why ' should have syntax class
w at all.  Again, there probably is a good reason, but I don't know
what it is.  After changing the syntax to punctuation, M-c still seems
to act as desired on 'hello'.
 
In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600)
 of 2009-05-02 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 14:55:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kevin Rodgers <kevin.d.rodgers <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 14:55:07 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 08:50:50 -0600
Drew Adams wrote:
> I don't know much about text-mode, but I wonder if even there it might
> make sense for ' to have syntax class `punctuation' instead of
> `word'. Probably the answer is "no", or that would already be the
> case. ;-)
>  
> I see this in `text-mode.el':
>  ;; We add `p' so that M-c on 'hello' leads to 'Hello'
>  ;; rather than 'hello'.
>  (modify-syntax-entry ?' "w p" st)
>  
> That explains why p was added, but not why ' should have syntax class
> w at all.  Again, there probably is a good reason, but I don't know
> what it is.  After changing the syntax to punctuation, M-c still seems
> to act as desired on 'hello'.

FWIW, I've got this in my ~/.emacs:

(add-hook 'text-mode-hook
          (defun text-mode-punctuation-syntax ()
            ;; Change non-letter characters from word syntax to 
punctuation:
            (modify-syntax-entry ?\240 ".") ; NO-BREAK SPACE
            (modify-syntax-entry ?' ".")))  ; APOSTROPHE

-- 
Kevin Rodgers
Denver, Colorado, USA






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 16:05:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 16:05:06 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Kevin Rodgers'" <kevin.d.rodgers <at> gmail.com>,
        <3312 <at> debbugs.gnu.org>, <bug-gnu-emacs <at> gnu.org>
Cc: <emacs-pretest-bug <at> gnu.org>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 08:59:40 -0700
> > I don't know much about text-mode, but I wonder if even 
> > there it might make sense for ' to have syntax class
> > `punctuation' instead of `word'. Probably the answer
> > is "no", or that would already be the case. ;-)
> >  
> > I see this in `text-mode.el':
> >  ;; We add `p' so that M-c on 'hello' leads to 'Hello'
> >  ;; rather than 'hello'.
> >  (modify-syntax-entry ?' "w p" st)
> >  
> > That explains why p was added, but not why ' should have 
> > syntax class w at all.  Again, there probably is a good
> > reason, but I don't know what it is.  After changing the
> > syntax to punctuation, M-c still seems to act as desired
> > on 'hello'.
> 
> FWIW, I've got this in my ~/.emacs:
> 
> (add-hook 'text-mode-hook
>            (defun text-mode-punctuation-syntax ()
> ;; Change non-letter characters from word syntax to punctuation:
>              (modify-syntax-entry ?\240 ".") ; NO-BREAK SPACE
>              (modify-syntax-entry ?' ".")))  ; APOSTROPHE

Yes, but I wasn't sure that the changes should also be made to text-mode itself
(dunno). For now, I was thinking of having info-mode do `copy-syntax-table' and
then modify that copy.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 16:05:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 16:05:07 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 16:05:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 16:05:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 19:20:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 19:20:05 GMT) Full text and rfc822 format available.

Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 3312 <at> debbugs.gnu.org, <emacs-pretest-bug <at> gnu.org>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 21:59:59 +0300
> If this makes sense for all Info manuals, then a simple fix would
> presumably be to change this (in the definition of `info-mode'):
>
> (set-syntax-table text-mode-syntax-table)
>
> To this:
>
> (set-syntax-table
>   (copy-syntax-table text-mode-syntax-table))
> (modify-syntax-entry ?' ".")

From my .emacs:

     (add-hook 'Info-mode-hook
               (lambda ()
                 (let ((st (copy-syntax-table text-mode-syntax-table)))
                   (modify-syntax-entry ?' "." st)
                   (set-syntax-table st))))

So this is a real problem for Info manuals.

> I don't know much about text-mode, but I wonder if even there it might
> make sense for ' to have syntax class `punctuation' instead of
> `word'. Probably the answer is "no", or that would already be the
> case. ;-)

AFAIK, the apostrophe has word syntax in text-mode to allow treating
word contractions as one word (can't, it's, I'll).  I don't know
whether this is grammatically correct or not but at least the Unicode says
that the category of the apostrophe is Punctuation, so perhaps we should
change apostrophe syntax to punctuation in text-mode as well.

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 19:20:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 19:20:11 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 19:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 19:30:05 GMT) Full text and rfc822 format available.

Message #40 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 3312 <at> debbugs.gnu.org
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 15:29:18 -0400
> Apostrophe, or single quote, (') currently has word-constituent syntax
> in Info, which it inherits from text-mode.
 
> This means that if point is inside some `...'  string, and you use
> `C-s C-w', you will pick up also the ' at the end as part of the
> search string, which is typically not what you want.

Yes, it might be a good idea to change it in Info-mode, which is quite
different from text-mode because of the extensive use of `...' and the
fact that it's read-only.
 
> I don't know much about text-mode, but I wonder if even there it might
> make sense for ' to have syntax class `punctuation' instead of
> `word'. Probably the answer is "no", or that would already be the
> case. ;-)
 
Indeed, the answer is no because we want M-u M-u to turn "it's time"
into "It's Time" and not "It'S time".


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 20:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 20:10:04 GMT) Full text and rfc822 format available.

Message #45 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>
Cc: <3312 <at> debbugs.gnu.org>, <emacs-pretest-bug <at> gnu.org>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 13:03:57 -0700
> So this is a real problem for Info manuals.
> 
> > I don't know much about text-mode, but I wonder if even 
> > there it might make sense for ' to have syntax class
> > `punctuation' instead of `word'. Probably the answer is
> > "no", or that would already be the case. ;-)
> 
> AFAIK, the apostrophe has word syntax in text-mode to allow treating
> word contractions as one word (can't, it's, I'll).  I don't know
> whether this is grammatically correct or not

Yes, that is correct, and it is a good reason, as far as it goes.

The comment in the code is way off target, it seems.
What should be said there is what you said here: we treat apostrophe as
word-constituent because of its use in contractions.

Similarly, for possessive forms: the dog's bone.

But in both cases, contractions and possessives, it is a choice whether we want
to treat the apostrophe as word-constituent. The argument in favor is stronger
in the case of contractions - for the possessive "dog's" it is not clear that
you would want to include the "'s" when selecting a word.

> but at least the Unicode says that the category of the
> apostrophe is Punctuation, so perhaps we should
> change apostrophe syntax to punctuation in text-mode as well.

It _is_ punctuation, even in contractions such as "can't". The problem is that
it is punctuation _within a word_, so Emacs must choose whether it wants to
treat it as part of the word (for convenience) or strictly as punctuation.

I would probably vote for treating the syntax class in text mode as punctuation,
not word, but it would be good to hear other points of view.

I do feel that within Info mode it should be treated as punctuation. The use of
`...' forms in Info (even beyond Emacs doc) far outweighs the use of
contractions. In technical doc, we generally avoid using contractions anyway.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 20:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 20:10:06 GMT) Full text and rfc822 format available.

Message #50 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>, 3312 <at> debbugs.gnu.org
Cc: drew.adams <at> oracle.com
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 23:01:37 +0300
> From: Juri Linkov <juri <at> jurta.org>
> Date: Sun, 17 May 2009 21:59:59 +0300
> Cc: emacs-pretest-bug <at> gnu.org, 3312 <at> emacsbugs.donarmstrong.com
> 
> I don't know whether this is grammatically correct or not but at
> least the Unicode says that the category of the apostrophe is
> Punctuation, so perhaps we should change apostrophe syntax to
> punctuation in text-mode as well.

Unicode and Emacs have different goals, so we should look for good
reasons that stem from Emacs usage, not follow external standards
blindly.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 20:10:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 20:10:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Sun, 17 May 2009 20:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 17 May 2009 20:15:04 GMT) Full text and rfc822 format available.

Message #60 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: <3312 <at> debbugs.gnu.org>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 13:08:41 -0700
> > I don't know much about text-mode, but I wonder if even 
> > there it might make sense for ' to have syntax class
> > `punctuation' instead of `word'. Probably the answer is
> > "no", or that would already be the case. ;-)
>  
> Indeed, the answer is no because we want M-u M-u to turn "it's time"
> into "It's Time" and not "It'S time".

I think you meant `M-c', but the same reasoning holds for `M-u'.

That's a reason, but it's not necessarily a strong reason. Interactively, you
can as easily do `M-c M-f M-c' to skip over the "s" in "it's".

However, using `capitalize-region', `upcase-region', etc. is another story.
There, your argument is stronger. Still, I personally wonder if it's worth it.
Dunno - I don't know much about how people use text-mode.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Tue, 19 May 2009 01:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 19 May 2009 01:10:04 GMT) Full text and rfc822 format available.

Message #65 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3312 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Tue, 19 May 2009 03:47:34 +0300
>> Apostrophe, or single quote, (') currently has word-constituent syntax
>> in Info, which it inherits from text-mode.
>
>> This means that if point is inside some `...'  string, and you use
>> `C-s C-w', you will pick up also the ' at the end as part of the
>> search string, which is typically not what you want.
>
> Yes, it might be a good idea to change it in Info-mode, which is quite
> different from text-mode because of the extensive use of `...' and the
> fact that it's read-only.

This can be fixed with the following patch (don't know whether now
is the right time to install it):

Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.558
diff -u -r1.558 info.el
--- lisp/info.el	14 Jan 2009 23:09:45 -0000	1.558
+++ lisp/info.el	19 May 2009 00:45:36 -0000
@@ -3441,6 +3441,14 @@
 (defvar tool-bar-map)
 (defvar bookmark-make-record-function)
 
+(defvar Info-mode-syntax-table
+  (let ((st (copy-syntax-table text-mode-syntax-table)))
+    ;; Use punctuation syntax for apostrophe because of
+    ;; extensive use of quotes in Info manuals.
+    (modify-syntax-entry ?' "." st)
+    st)
+  "Syntax table used while in `Info-mode'.")
+
 ;; Autoload cookie needed by desktop.el
 ;;;###autoload
 (defun Info-mode ()
@@ -3512,7 +3520,7 @@
   (setq tab-width 8)
   (use-local-map Info-mode-map)
   (add-hook 'activate-menubar-hook 'Info-menu-update nil t)
-  (set-syntax-table text-mode-syntax-table)
+  (set-syntax-table Info-mode-syntax-table)
   (setq local-abbrev-table text-mode-abbrev-table)
   (setq case-fold-search t)
   (setq buffer-read-only t)

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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Tue, 19 May 2009 03:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 19 May 2009 03:15:04 GMT) Full text and rfc822 format available.

Message #70 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>,
        "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: <3312 <at> debbugs.gnu.org>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Mon, 18 May 2009 20:09:49 -0700
> From: Juri Linkov Sent: Monday, May 18, 2009 5:48 PM
> >> Apostrophe, or single quote, (') currently has 
> >> word-constituent syntax in Info, which it inherits from text-mode.
> >>
> >> This means that if point is inside some `...'  string, and you use
> >> `C-s C-w', you will pick up also the ' at the end as part of the
> >> search string, which is typically not what you want.
> >
> > Yes, it might be a good idea to change it in Info-mode, 
> > which is quite different from text-mode because of the
> > extensive use of `...' and the fact that it's read-only.
> 
> This can be fixed with the following patch...

That's the same thing I sent in my original bug report:
(set-syntax-table
  (copy-syntax-table text-mode-syntax-table))
(modify-syntax-entry ?' ".")

except that you added a defvar for the table - not needed, but why not? So it's
OK by me.

Dunno whether Kevin's suggestion of doing the same for non-breaking space should
be adopted also: (modify-syntax-entry ?\240 ".")





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3312; Package emacs. (Mon, 08 Jun 2009 17:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 08 Jun 2009 17:40:05 GMT) Full text and rfc822 format available.

Message #75 received at 3312 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <3312 <at> debbugs.gnu.org>, "'Juri Linkov'" <juri <at> jurta.org>,
        "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Mon, 8 Jun 2009 10:34:52 -0700
Any chance Juri's patch could be applied now? See also my previous question: do
we want to also treat no-break space the same way?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#3312; Package emacs. (Fri, 16 Sep 2011 21:21:01 GMT) Full text and rfc822 format available.

Message #78 received at 3312 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 3312 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Fri, 16 Sep 2011 23:12:39 +0200
Juri Linkov <juri <at> jurta.org> writes:

> +    (modify-syntax-entry ?' "." st)

There wasn't much discussion after this, but it seems to me that having
' be 

    (modify-syntax-entry ?\' "w" st)

which it currently is, isn't all that nice in Info buffers.  `M-.' and
the like doesn't work as well as one would like if stuff like `this'
gets treated like "this'" by `M-.'.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#3312; Package emacs. (Sat, 17 Sep 2011 12:38:01 GMT) Full text and rfc822 format available.

Message #81 received at 3312 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 3312 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sat, 17 Sep 2011 15:31:48 +0300
>> +    (modify-syntax-entry ?' "." st)
>
> There wasn't much discussion after this, but it seems to me that having
> ' be
>
>     (modify-syntax-entry ?\' "w" st)
>
> which it currently is, isn't all that nice in Info buffers.  `M-.' and
> the like doesn't work as well as one would like if stuff like `this'
> gets treated like "this'" by `M-.'.

I see that Gnus solves this problem by modifying syntax of ' and `
to whitespace:

  (defvar gnus-article-mode-syntax-table
    (let ((table (copy-syntax-table text-mode-syntax-table)))
      ;; This causes the citation match run O(2^n).
      ;; (modify-syntax-entry ?- "w" table)
      (modify-syntax-entry ?> ")<" table)
      (modify-syntax-entry ?< "(>" table)
      ;; make M-. in article buffers work for `foo' strings
      (modify-syntax-entry ?' " " table)
      (modify-syntax-entry ?` " " table)
      table)
    "Syntax table used in article mode buffers.
  Initialized from `text-mode-syntax-table.")

So I'm not sure what is better for Info buffers:
whitespace syntax (" ") or punctuation (".")?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#3312; Package emacs. (Sat, 17 Sep 2011 14:47:02 GMT) Full text and rfc822 format available.

Message #84 received at 3312 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>,
	"'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 3312 <at> debbugs.gnu.org, 'Stefan Monnier' <monnier <at> iro.umontreal.ca>
Subject: RE: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sat, 17 Sep 2011 07:41:23 -0700
> I see that Gnus solves this problem by modifying syntax of ' and `
> to whitespace...
> So I'm not sure what is better for Info buffers:
> whitespace syntax (" ") or punctuation (".")?

Either is probably OK.  I would vote for punctuation syntax for ` and ',
especially since they are used not only for `...' but also in Lisp code, and
since they are, in English, punctuation.

[We do have embedded spaces in `...' in the manuals (e.g., search for regexp
`\([a-zA-Z]+ \)+[a-zA-Z]+' in (elisp)).  But either whitespace or punctuation
syntax for `' would be OK for that, since you could in either case get all of
the text easily by clicking the mouse (e.g. double-click mouse-1, then click
mouse-3).]





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3312; Package emacs. (Sun, 18 Sep 2011 08:13:01 GMT) Full text and rfc822 format available.

Message #87 received at 3312 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 3312 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 18 Sep 2011 09:51:20 +0200
Juri Linkov <juri <at> jurta.org> writes:

> So I'm not sure what is better for Info buffers:
> whitespace syntax (" ") or punctuation (".")?

It probably doesn't matter much, but punctuation sounds more correct.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Sun, 18 Sep 2011 20:03:02 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sun, 18 Sep 2011 20:03:02 GMT) Full text and rfc822 format available.

Message #92 received at 3312-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3312-done <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 18 Sep 2011 22:57:08 +0300
> Yes, it might be a good idea to change it in Info-mode, which is quite
> different from text-mode because of the extensive use of `...' and the
> fact that it's read-only.

Fixed and closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.