GNU bug report logs - #4153
error in `sentence-end-base'

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Sat, 15 Aug 2009 13:15:04 UTC

Severity: normal

Done: Kenichi Handa <handa <at> m17n.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 4153 in the body.
You can then email your comments to 4153 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#4153; Package emacs. (Sat, 15 Aug 2009 13:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Štěpán Němec <stepnem <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 15 Aug 2009 13:15:04 GMT) Full text and rfc822 format available.

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

From: Štěpán Němec <stepnem <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: error in `sentence-end-base'
Date: Sat, 15 Aug 2009 15:11:09 +0200
 Hello,
there is obviously an error in the `sentence-end-base' variable,
defined in lisp/textmodes/paragraphs.el (and also set in sgml-mode.el
and texinfo.el) as:

"[.?!][]\"'””)}]*"

 There are two `U+201D RIGHT DOUBLE QUOTATION MARK' characters in the
class; I suppose one of them should be different -- `U+2019 RIGHT SINGLE
QUOTATION MARK' perhaps?

 I observed the error in the latest git sources and 23.1.50.1
emacs-snapshot package.


 Štěpán Němec




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4153; Package emacs. (Sat, 15 Aug 2009 22:00:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 15 Aug 2009 22:00:08 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Kenichi Handa  <handa <at> m17n.org>
Cc: stepnem <at> gmail.com, 4153 <at> debbugs.gnu.org
Subject: Re: error in `sentence-end-base'
Date: Sat, 15 Aug 2009 17:56:17 -0400
> there is obviously an error in the `sentence-end-base' variable,
> defined in lisp/textmodes/paragraphs.el (and also set in sgml-mode.el
> and texinfo.el) as:
>
> "[.?!][]\"'””)}]*"
>
>  There are two `U+201D RIGHT DOUBLE QUOTATION MARK' characters in the
> class

The first cheracter has code-point 0x2149, and the second one has
code-point 0x727D; both code-points refer to the character 8221.

IIUC, this is some hold-over from pre-unicode Emacs.  Handa, could you
verify this?  I assume it's ok to remove one of these characters?



Reply sent to Kenichi Handa <handa <at> m17n.org>:
You have taken responsibility. (Thu, 20 Aug 2009 20:30:21 GMT) Full text and rfc822 format available.

Notification sent to Štěpán Němec <stepnem <at> gmail.com>:
bug acknowledged by developer. (Thu, 20 Aug 2009 20:30:22 GMT) Full text and rfc822 format available.

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

From: Kenichi Handa <handa <at> m17n.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: stepnem <at> gmail.com, 4153-done <at> debbugs.gnu.org
Subject: Re: error in `sentence-end-base'
Date: Tue, 18 Aug 2009 10:22:36 +0900
In article <874os8n3lq.fsf <at> cyd.mit.edu>, Chong Yidong <cyd <at> stupidchicken.com> writes:

> > there is obviously an error in the `sentence-end-base' variable,
> > defined in lisp/textmodes/paragraphs.el (and also set in sgml-mode.el
> > and texinfo.el) as:
> >
> > "[.?!][]\"'””)}]*"
> >
> >  There are two `U+201D RIGHT DOUBLE QUOTATION MARK' characters in the
> > class

> The first cheracter has code-point 0x2149, and the second one has
> code-point 0x727D; both code-points refer to the character 8221.

> IIUC, this is some hold-over from pre-unicode Emacs.  Handa, could you
> verify this?  I assume it's ok to remove one of these characters?

Yes.  I've just installed these changes.

2009-08-18  Kenichi Handa  <handa <at> m17n.org>

	* textmodes/paragraphs.el: Change to utf-8.  Adjust coding cookie.
	(sentence-end-without-space): Delete duplicated chars.
	(sentence-end-base): Likewise.

	* textmodes/sgml-mode.el: Change to utf-8.  Adjust coding cookie.
	(html-mode): Delete duplicated chars from sentence-end-base.

	* textmodes/texinfo.el: Change to utf-8.  Adjust coding cookie.
	(texinfo-mode): Delete duplicated chars from sentence-end-base.

---
Kenichi Handa
handa <at> m17n.org



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4153; Package emacs. (Fri, 28 Aug 2009 00:10:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to d <at> teklibre.org (Dave Täht):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 28 Aug 2009 00:10:05 GMT) Full text and rfc822 format available.

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

From: d <at> teklibre.org (Dave Täht)
To: 4153 <at> debbugs.gnu.org
Subject: sentence-end properly constructed now?
Date: Thu, 27 Aug 2009 18:04:35 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I am curious if this bug resolves the problem I was encountering with
sentence-forward and sentence-backward in the post 22 versions of emacs
I have had available to me. 

I also ran into it in http://www.emacswiki.org/emacs/auto-capitalize.el 
which irked me enough to try and find the cause of the problem. 

Is sentence-end getting properly constructed now?

... elided ...
;; auto-capitalize.el 
;; 1 Jun 2009: It does not work with Aquamacs 1.7/GNUEmacs 22. Only the first word in the buffer 
;; (or the first word typed after mode activation) is capitalized. 
;; Maybe the code is too old (1998). -- Rikal

;; No.
;; The reason why this code bit is failing is that sentence-end is not
;; getting constructed for some reason in paragraphs.el: 

;; (message "%s" sentence-end) ;; returns null in the post 22 versions of emacs I tried.

;; According to the documentation, sentence-end is supposed to be automatically
;; constructed from the other regexps defined there. It isn't. I did not
;; dig any further. 

;; This also explains why sentence-forward and sentence-backward (M-e,
;; M-a respectively) are not working in the current emacs-snapshot. (I do not have
;; emacs 23.1 installed on the machine I am on, but this does sound like
;; it is also a problem in 23.1)

;; To keep me going I just did a:
;; (setq sentence-end "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" )
;; in my main .emacs file, and this makes auto-capitalization.el work for me.

;; Maybe this is related to bug 4153 which is reported as fixed in emacs head?
;; 28 Aug 2009 -- dtaht

- -- 
Dave Taht
http://the-edge.blogspot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkqXHxEACgkQpdejJcOV4uRU2gCguFaf5/CGeq/riyrB3tbFY8Cs
no8An0ELJkkXVml6xBzBqp7mdB+3TTJ0
=q/1C
-----END PGP SIGNATURE-----



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

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

From: Glenn Morris <rgm <at> gnu.org>
To: d <at> teklibre.org
Cc: 4153 <at> debbugs.gnu.org
Subject: Re: bug#4153: sentence-end properly constructed now?
Date: Fri, 28 Aug 2009 00:11:48 -0400
Dave =?UTF-8?Q?T=C3=A4ht wrote:

> I am curious if this bug resolves the problem I was encountering with
> sentence-forward and sentence-backward in the post 22 versions of emacs
> I have had available to me. 
>
> I also ran into it in http://www.emacswiki.org/emacs/auto-capitalize.el 
> which irked me enough to try and find the cause of the problem. 

No, it is totally unrelated.

Your issue is explained in the NEWS for Emacs 22, and in the documentation
of the variable sentence-end:

  The value nil means to use the default value defined by the
  function `sentence-end'.  You should always use this function
  to obtain the value of this variable.

So auto-capitalize should use sentence-end the function, not the variable.

> ;; The reason why this code bit is failing is that sentence-end is not
> ;; getting constructed for some reason in paragraphs.el: 
>
> ;; (message "%s" sentence-end) ;; returns null in the post 22 versions of emacs I tried.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 25 Sep 2009 14:24:21 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 273 days ago.

Previous Next


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