GNU bug report logs - #8203
sgml-delete-tag bug

Previous Next

Package: emacs;

Reported by: xahlee <at> gmail.com

Date: Tue, 8 Mar 2011 13:25:03 UTC

Severity: normal

Tags: confirmed, fixed, patch

Merged with 35381

Found in versions 24.5, 25.0.94, 26.2

Fixed in version 26.3

Done: Noam Postavsky <npostavs <at> gmail.com>

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 8203 in the body.
You can then email your comments to 8203 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Tue, 08 Mar 2011 13:25:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to xahlee <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Mar 2011 13:25:03 GMT) Full text and rfc822 format available.

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

From: Xah Lee <xahlee <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Subject: Re: sgml-delete-tag bug
Date: Tue, 8 Mar 2011 03:51:16 -0800
this seems to be a sure bug.

In html-mode. If you have this:

<p>some'</p>

and your cursor is at the beginning of line, then press C-c C-d
(sgml-delete-tag), it'll also delete the apostrophe.

This is “GNU Emacs 23.2.1 (i386-mingw-nt6.0.6002) of 2010-05-08 on G41R2F1”




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Tue, 08 Mar 2011 18:30:03 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8203: sgml-delete-tag bug
Date: Tue, 08 Mar 2011 19:33:58 +0100
Am 08.03.2011 12:51, schrieb Xah Lee:
> this seems to be a sure bug.
>
> In html-mode. If you have this:
>
> <p>some'</p>
>
> and your cursor is at the beginning of line, then press C-c C-d
> (sgml-delete-tag), it'll also delete the apostrophe.
>
> This is “GNU Emacs 23.2.1 (i386-mingw-nt6.0.6002) of 2010-05-08 on G41R2F1”
>
>
>
>

Hi,

can confirm this bug.
GNU Emacs 23.2.94.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2011-02-25

Error is in backward-prefix-chars, ie. in syntax.c AFAIS.

line 2855

  while (!char_quoted (pos, pos_byte)
	 /* Previous statement updates syntax table.  */
	 && ((c = FETCH_CHAR_AS_MULTIBYTE (pos_byte), SYNTAX (c) == Squote)
	     || SYNTAX_PREFIX (c)))
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

may that `or' SYNTAX_PREFIX above?



Andreas





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Tue, 08 Mar 2011 21:18:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8203: sgml-delete-tag bug
Date: Tue, 08 Mar 2011 16:16:47 -0500
> Error is in backward-prefix-chars, ie. in syntax.c AFAIS.

> line 2855

>   while (!char_quoted (pos, pos_byte)
> 	 /* Previous statement updates syntax table.  */
> 	 && ((c = FETCH_CHAR_AS_MULTIBYTE (pos_byte), SYNTAX (c) == Squote)
> 	     || SYNTAX_PREFIX (c)))
>                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> may that `or' SYNTAX_PREFIX above?

Why would you think so?  I'd rather say that the error is that ' in
html-mode buffers should not have prefix syntax.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Wed, 09 Mar 2011 11:59:01 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8203: sgml-delete-tag bug
Date: Wed, 09 Mar 2011 13:02:43 +0100
Am 08.03.2011 22:16, schrieb Stefan Monnier:
>> Error is in backward-prefix-chars, ie. in syntax.c AFAIS.
>
>> line 2855
>
>>    while (!char_quoted (pos, pos_byte)
>> 	 /* Previous statement updates syntax table.  */
>> 	&&  ((c = FETCH_CHAR_AS_MULTIBYTE (pos_byte), SYNTAX (c) == Squote)
>> 	     || SYNTAX_PREFIX (c)))
>>                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>> may that `or' SYNTAX_PREFIX above?
>
> Why would you think so?  I'd rather say that the error is that ' in
> html-mode buffers should not have prefix syntax.
>
>
>          Stefan
>

Indeed, thanks

couldn't get the syntax properly, as my report function in use failed.

with point at opening lesser-angle at closing tag
(syntax-after (1- (point)))


returns (1048578)

while word chars before return

(2)

checked with


(defun syntax-bfpt ()
  (interactive)
  (let ((stax (syntax-after (1- (point)))))
    (when (interactive-p)
      (message (format "%s" stax)))
    stax))



Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Thu, 21 Jan 2016 07:03:02 GMT) Full text and rfc822 format available.

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

From: Marcin Borkowski <mbork <at> mbork.pl>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 8203 <at> debbugs.gnu.org
Subject: Re: bug#8203: sgml-delete-tag bug
Date: Thu, 21 Jan 2016 08:02:47 +0100
On 2011-03-08, at 19:33, Andreas Röhler <andreas.roehler <at> easy-emacs.de> wrote:

> Am 08.03.2011 12:51, schrieb Xah Lee:
>> this seems to be a sure bug.
>>
>> In html-mode. If you have this:
>>
>> <p>some'</p>
>>
>> and your cursor is at the beginning of line, then press C-c C-d
>> (sgml-delete-tag), it'll also delete the apostrophe.
>>
>> This is “GNU Emacs 23.2.1 (i386-mingw-nt6.0.6002) of 2010-05-08 on G41R2F1”
>
> Hi,
>
> can confirm this bug.
> GNU Emacs 23.2.94.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2011-02-25

Hello,

I just wanted to add that the bug persists in GNU Emacs 25.1.50.1.

Best,

-- 
Marcin Borkowski
http://mbork.pl/en




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Sun, 05 Jun 2016 14:45:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: 8203 <at> debbugs.gnu.org
Subject: Re: sgml-delete-tag bug
Date: Sun, 5 Jun 2016 10:44:07 -0400
found 8203 24.5
found 8203 25.0.94
tag 8203 + confirmed
severity 8203 minor
quit

There is already

(defconst sgml-tag-syntax-table
...
    (unless (memq ?' sgml-specials)
      ;; Avoid that skipping a tag backwards skips any "'" prefixing it.
      (modify-syntax-entry ?' "w" table))

But it seems like `sgml-tag-syntax-table' is not applied in sufficient cases.




bug Marked as found in versions 24.5. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2016 14:45:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 25.0.94. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2016 14:45:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2016 14:45:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2016 14:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8203; Package emacs. (Thu, 09 May 2019 12:11:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: 8203 <at> debbugs.gnu.org
Subject: Re: bug#8203: sgml-delete-tag bug
Date: Thu, 09 May 2019 08:10:09 -0400
forcemerge 35381 8203
quit

Noam Postavsky <npostavs <at> gmail.com> writes:

> (defconst sgml-tag-syntax-table
> ...
>     (unless (memq ?' sgml-specials)
>       ;; Avoid that skipping a tag backwards skips any "'" prefixing it.
>       (modify-syntax-entry ?' "w" table))
>
> But it seems like `sgml-tag-syntax-table' is not applied in sufficient cases.

This was fixed along with Bug#35381.




Forcibly Merged 8203 35381. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 09 May 2019 12:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 Jun 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 322 days ago.

Previous Next


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