unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually
@ 2014-05-27 12:12 Nicolas Richard
  2014-05-27 13:29 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Richard @ 2014-05-27 12:12 UTC (permalink / raw)
  To: 17608

Hello,

Running:
emacs -Q /usr/local/bin/latexmk -f cperl-mode --eval '(goto-char 301038)' -f forward-sexp
makes a scan error (unbalanced parenthese)

However, leaving out "-f forward-sexp" and hitting C-M-f manually once
emacs is loaded makes no error.

My guess is that there is some jit propertization/syntax-class-ization
that has to be done before C-M-f works. Evalling (message "%S"
(buffer-substring 301038 302108)) indeed shows that syntax-table
properties are used in the region. But what should be done to fix it ?

Fwiw, I encountered the problem trying to use hideshow :
emacs -Q /usr/local/bin/latexmk -f cperl-mode -f hs-minor-mode -f hs-hide-all

-- 
Nico.





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

* bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually
  2014-05-27 12:12 bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually Nicolas Richard
@ 2014-05-27 13:29 ` Stefan Monnier
  2014-06-11 14:14   ` Nicolas Richard
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-05-27 13:29 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: 17608

> emacs -Q /usr/local/bin/latexmk -f cperl-mode --eval '(goto-char 301038)' -f forward-sexp
> makes a scan error (unbalanced parenthese)

You probably want to call (syntax-propertize (point-max)) before calling
forward-sexp.

> emacs -Q /usr/local/bin/latexmk -f cperl-mode -f hs-minor-mode -f hs-hide-all

Maybe hs-hide-all should call (syntax-propertize (point-max)), then.


        Stefan





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

* bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually
  2014-05-27 13:29 ` Stefan Monnier
@ 2014-06-11 14:14   ` Nicolas Richard
  2014-06-12  1:14     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Richard @ 2014-06-11 14:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Nicolas Richard, 17608

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Maybe hs-hide-all should call (syntax-propertize (point-max)), then.

I forgot to follow up on this bug ; the following indeed worked for me :

--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -789,6 +789,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
      (unless hs-allow-nesting
        (hs-discard-overlays (point-min) (point-max)))
      (goto-char (point-min))
+     (syntax-propertize (point-max))
      (let ((spew (make-progress-reporter "Hiding all blocks..."
                                          (point-min) (point-max)))
            (re (concat "\\("

-- 
Nico.





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

* bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually
  2014-06-11 14:14   ` Nicolas Richard
@ 2014-06-12  1:14     ` Stefan Monnier
  2014-06-13 20:00       ` Nicolas Richard
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-06-12  1:14 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: 17608

>> Maybe hs-hide-all should call (syntax-propertize (point-max)), then.
> I forgot to follow up on this bug ; the following indeed worked for me :

Thanks, please install into `trunk'.


        Stefan





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

* bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually
  2014-06-12  1:14     ` Stefan Monnier
@ 2014-06-13 20:00       ` Nicolas Richard
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Richard @ 2014-06-13 20:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Nicolas Richard, 17608-done

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Maybe hs-hide-all should call (syntax-propertize (point-max)), then.
>> I forgot to follow up on this bug ; the following indeed worked for me :
>
> Thanks, please install into `trunk'.

In fact you had done that yourself two weeks ago. Closing the bug.

-- 
Nico.





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

end of thread, other threads:[~2014-06-13 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 12:12 bug#17608: 24.3.91; foward-sexp via hideshow triggers scan error -- no error manually Nicolas Richard
2014-05-27 13:29 ` Stefan Monnier
2014-06-11 14:14   ` Nicolas Richard
2014-06-12  1:14     ` Stefan Monnier
2014-06-13 20:00       ` Nicolas Richard

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