unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30132: 27.0.50; scan-sexps and ##
@ 2018-01-15 18:09 Michael Heerdegen
  2018-02-12 16:12 ` Michael Heerdegen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2018-01-15 18:09 UTC (permalink / raw)
  To: 30132


Hello,

Insert into *scratch*

  (list ##)

and put point at the beginning of "##".  Then eval M-:

  (goto-char (scan-sexps (point) 1))

and you get

| Debugger entered--Lisp error: (scan-error "Containing expression ends prematurely" 154 155)
|   scan-sexps(152 1)
|   (goto-char (scan-sexps (point) 1))
|   eval((goto-char (scan-sexps (point) 1)) t)
|   eval-expression((goto-char (scan-sexps (point) 1)) nil nil 127)
|   funcall-interactively(eval-expression (goto-char (scan-sexps (point) 1)) nil nil 127)
|   call-interactively(eval-expression nil nil)
|   command-execute(eval-expression)

Expected is that the scan doesn't fail.

## is the rarely used representation of an interned symbol named with
the empty string.  My problem is that where it is used (like in
"org-list.el"), el-search.el gets into trouble.


Thanks in advance,

Michael.


In GNU Emacs 27.0.50 (build 17, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-01-15 built on drachen
Repository revision: 55a83102629d597eb172e91698578930ff193c5d
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Debian GNU/Linux testing (buster)






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

* bug#30132: 27.0.50; scan-sexps and ##
  2018-01-15 18:09 bug#30132: 27.0.50; scan-sexps and ## Michael Heerdegen
@ 2018-02-12 16:12 ` Michael Heerdegen
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2018-02-12 16:12 UTC (permalink / raw)
  To: 30132

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Hello,
>
> Insert into *scratch*
>
>   (list ##)
>
> and put point at the beginning of "##".

BTW, this is not the only kind of situation where `scan-sexps' can error
for expressions containing ##.  In particular, point doesn't necessarily
need to be directly before "##" for the problem to occur.


Michael.





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

* bug#30132: 27.0.50; scan-sexps and ##
  2019-07-07  2:08               ` Noam Postavsky
@ 2022-05-06 15:50                 ` Lars Ingebrigtsen
  2022-05-06 16:30                   ` bug#15998: " Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-06 15:50 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 30132, Shigeru Fukaya, Stefan Monnier, 15998

Noam Postavsky <npostavs@gmail.com> writes:

> * elisp-mode.el (elisp-mode-syntax-propertize): New function.
> (emacs-lisp-mode): Set it as syntax-propertize-function.

I've tried the patch, and it seems to work well.  However, it makes
edebug-tests-dotted-forms hang completely, and breaks other edebug
tests.

I've poked at this briefly, but I've been unable to see what makes
things hang here.  It would be nice to get this to work -- did you get
any further in debugging these test problems, Noam?

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





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

* bug#30132: 27.0.50; scan-sexps and ##
  2022-05-06 16:30                   ` bug#15998: " Lars Ingebrigtsen
@ 2022-05-07  0:08                     ` Michael Heerdegen
  2022-05-07  4:05                       ` bug#15998: " Michael Heerdegen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2022-05-07  0:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: 30132, Shigeru Fukaya, Noam Postavsky, Stefan Monnier, 15998

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> > I've poked at this briefly, but I've been unable to see what makes
> > things hang here.  It would be nice to get this to work -- did you get
> > any further in debugging these test problems, Noam?
>
> The offending bit was this:
>
> (seq (group-n 1 (+ digit) "="))     ; Object label.

I wonder why.

> Which is something that should never appear in Lisp files anyway.
> [...]
> So I'm pushing Noam's patch to Emacs 29 (with that object label thing
> removed).

Thanks.  My original use case seems to be fixed.

Michael.





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

* bug#30132: 27.0.50; scan-sexps and ##
  2022-05-07  4:05                       ` bug#15998: " Michael Heerdegen
@ 2022-05-07 10:17                         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-07 10:17 UTC (permalink / raw)
  To: Michael Heerdegen
  Cc: 30132, 15998, Noam Postavsky, Stefan Monnier, Shigeru Fukaya

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Dunno how the Edebug tests are supposed to run...:  When I load
> edebug-tests.el and run those tests with M-x ert-run-tests-interactively
> t RET, I always get lots of fails - also with what is installed now (and
> even without the patch).

I run them with "make check" or "make edebug-tests".  

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





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

end of thread, other threads:[~2022-05-07 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 18:09 bug#30132: 27.0.50; scan-sexps and ## Michael Heerdegen
2018-02-12 16:12 ` Michael Heerdegen
  -- strict thread matches above, loose matches on Subject: below --
2013-11-29 14:45 bug#15998: 24.3; forward-sexp (scan-sexps) doesn't do well with some SEXPs Shigeru Fukaya
2013-11-29 17:12 ` Stefan Monnier
2013-12-01 20:08   ` Shigeru Fukaya
2013-12-01 20:44     ` Stefan Monnier
2013-12-03  9:47       ` Shigeru Fukaya
2013-12-03 17:09         ` Stefan Monnier
2019-06-26 15:23           ` Lars Ingebrigtsen
2019-06-26 17:06             ` Stefan Monnier
2019-07-07  2:08               ` Noam Postavsky
2022-05-06 15:50                 ` bug#30132: 27.0.50; scan-sexps and ## Lars Ingebrigtsen
2022-05-06 16:30                   ` bug#15998: " Lars Ingebrigtsen
2022-05-07  0:08                     ` Michael Heerdegen
2022-05-07  4:05                       ` bug#15998: " Michael Heerdegen
2022-05-07 10:17                         ` Lars Ingebrigtsen

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