unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Glenn Morris <rgm@gnu.org>
Cc: 30726@debbugs.gnu.org
Subject: bug#30726: [26.0.91 9] optimistic forward-sexp
Date: Tue, 6 Mar 2018 11:47:45 +0100	[thread overview]
Message-ID: <2598ad60-bb29-d693-638c-b830cec903ad@easy-emacs.de> (raw)
In-Reply-To: <phfu5d63xb.fsf@fencepost.gnu.org>

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)






      parent reply	other threads:[~2018-03-06 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  7:16 bug#30726: [26.0.91 9] optimistic forward-sexp Andreas Röhler
2018-03-06  7:47 ` Glenn Morris
2018-03-06 10:43   ` Andreas Röhler
2021-08-12 14:20     ` Lars Ingebrigtsen
2018-03-06 10:47   ` Andreas Röhler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2598ad60-bb29-d693-638c-b830cec903ad@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=30726@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).