GNU bug report logs - #30726
[26.0.91 9] optimistic forward-sexp

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Tue, 6 Mar 2018 07:18:01 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 30726 <at> debbugs.gnu.org
Subject: Re: bug#30726: [26.0.91 9] optimistic forward-sexp
Date: Tue, 6 Mar 2018 11:47:45 +0100
On 06.03.2018 08:47, Glenn Morris wrote:
> Andreas Röhler wrote:
> 
>> https://emacs.stackexchange.com/questions/39253/sh-mode-scan-error-containing-expression-ends-prematurely
> 
> Already reported as bug#30721.
> (It would be great if people forwarding other people's stackexchange
> issues would do basic checks first.)
> 
>> Error occurs when forward-sexp is called from closing paren at last
>> line of example code below
>>
>> (echo '#!/bin/bash'
>> echo 'myfunc() {'
>> echo "cat <<'z'"
>> seq 135
>> echo zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
>> echo z
>> echo '}') >out
> 
> Note that the OP meant you to run that as shell code to generate a file,
> "out", and then visit it.
> 
> You appear to have discovered that using forward-sexp inside eg
> 
> (
> 
> )
> 
> will print "containing expression ends prematurely" ?
> 

When calling the way the OP intended

get the error as below from inside the singlequoted, which also is an 
old issue:

To avoid these wrote ar-forward-sexp

which see here: 
https://github.com/andreas-roehler/thingatpt-utils-core/blob/master/ar-subr.el



;;;;;


Debugger entered--Lisp error: (scan-error "Containing expression ends 
prematurely" 515 515)
  signal(scan-error ("Containing expression ends prematurely" 515 515))
  smie-forward-sexp-command(1)
  forward-sexp(1)
  funcall-interactively(forward-sexp 1)
  call-interactively(forward-sexp nil nil)
  command-execute(forward-sexp)





This bug report was last modified 3 years and 285 days ago.

Previous Next


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