unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8203: sgml-delete-tag bug
       [not found] ` <AANLkTikNQBdM2KgcWQ=sOM6pT2tyr=wQrNtPK+Ou998k@mail.gmail.com>
@ 2011-03-08 11:51   ` Xah Lee
  2011-03-08 18:33     ` Andreas Röhler
  2016-06-05 14:44     ` Noam Postavsky
  0 siblings, 2 replies; 7+ messages in thread
From: Xah Lee @ 2011-03-08 11:51 UTC (permalink / raw)
  To: 8203

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”





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2011-03-08 11:51   ` bug#8203: sgml-delete-tag bug Xah Lee
@ 2011-03-08 18:33     ` Andreas Röhler
  2011-03-08 21:16       ` Stefan Monnier
  2016-01-21  7:02       ` Marcin Borkowski
  2016-06-05 14:44     ` Noam Postavsky
  1 sibling, 2 replies; 7+ messages in thread
From: Andreas Röhler @ 2011-03-08 18:33 UTC (permalink / raw)
  To: bug-gnu-emacs

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2011-03-08 18:33     ` Andreas Röhler
@ 2011-03-08 21:16       ` Stefan Monnier
  2011-03-09 12:02         ` Andreas Röhler
  2016-01-21  7:02       ` Marcin Borkowski
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2011-03-08 21:16 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: bug-gnu-emacs

> 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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2011-03-08 21:16       ` Stefan Monnier
@ 2011-03-09 12:02         ` Andreas Röhler
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2011-03-09 12:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs

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/






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2011-03-08 18:33     ` Andreas Röhler
  2011-03-08 21:16       ` Stefan Monnier
@ 2016-01-21  7:02       ` Marcin Borkowski
  1 sibling, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2016-01-21  7:02 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: 8203

On 2011-03-08, at 19:33, Andreas Röhler <andreas.roehler@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2011-03-08 11:51   ` bug#8203: sgml-delete-tag bug Xah Lee
  2011-03-08 18:33     ` Andreas Röhler
@ 2016-06-05 14:44     ` Noam Postavsky
  2019-05-09 12:10       ` Noam Postavsky
  1 sibling, 1 reply; 7+ messages in thread
From: Noam Postavsky @ 2016-06-05 14:44 UTC (permalink / raw)
  To: 8203

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#8203: sgml-delete-tag bug
  2016-06-05 14:44     ` Noam Postavsky
@ 2019-05-09 12:10       ` Noam Postavsky
  0 siblings, 0 replies; 7+ messages in thread
From: Noam Postavsky @ 2019-05-09 12:10 UTC (permalink / raw)
  To: 8203

forcemerge 35381 8203
quit

Noam Postavsky <npostavs@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-09 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2884d8aa-2688-4611-ba53-44dca51c489f@d12g2000prj.googlegroups.com>
     [not found] ` <AANLkTikNQBdM2KgcWQ=sOM6pT2tyr=wQrNtPK+Ou998k@mail.gmail.com>
2011-03-08 11:51   ` bug#8203: sgml-delete-tag bug Xah Lee
2011-03-08 18:33     ` Andreas Röhler
2011-03-08 21:16       ` Stefan Monnier
2011-03-09 12:02         ` Andreas Röhler
2016-01-21  7:02       ` Marcin Borkowski
2016-06-05 14:44     ` Noam Postavsky
2019-05-09 12:10       ` Noam Postavsky

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).