GNU bug report logs -
#24434
[25.1.1] parse-partial-sexp: opening delimiter missed
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24434 in the body.
You can then email your comments to 24434 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24434
; Package
emacs
.
(Wed, 14 Sep 2016 09:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 14 Sep 2016 09:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
python-mode, problem seems not restricted to.
When after curly bracket in example below from
https://docs.python.org/3/library/string.html#formatstrings
6.1.3. Format String Syntax:
str.format("Bring me a {
depth-in-paren. i.e.
(nth 0 (parse-partial-sexp ...))
should indicate "2", but says "1".
When outside a string, `{' is recognized as opener.
GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2016-08-22
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24434
; Package
emacs
.
(Wed, 14 Sep 2016 14:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24434 <at> debbugs.gnu.org (full text, mbox):
tag 24434 moreinfo
quit
On Wed, Sep 14, 2016 at 5:46 AM, Andreas Röhler
<andreas.roehler <at> easy-emacs.de> wrote:
> python-mode, problem seems not restricted to.
>
> When after curly bracket in example below from
> https://docs.python.org/3/library/string.html#formatstrings
> 6.1.3. Format String Syntax:
>
> str.format("Bring me a {
>
> depth-in-paren. i.e.
>
> (nth 0 (parse-partial-sexp ...))
This bug report is a bit incomplete, what do you put for "..."?
>
> should indicate "2", but says "1".
>
> When outside a string, `{' is recognized as opener.
I think this is correct, parse-partial-sexp detects whether it's in a
string-literal or not. If you want to parse the contents of the string
literal, FROM should be inside the literal.
Added tag(s) moreinfo.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Wed, 14 Sep 2016 14:05:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24434
; Package
emacs
.
(Thu, 15 Sep 2016 06:20:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 24434 <at> debbugs.gnu.org (full text, mbox):
On 14.09.2016 16:04, Noam Postavsky wrote:
> tag 24434 moreinfo
> quit
>
> On Wed, Sep 14, 2016 at 5:46 AM, Andreas Röhler
> <andreas.roehler <at> easy-emacs.de> wrote:
>> python-mode, problem seems not restricted to.
>>
>> When after curly bracket in example below from
>> https://docs.python.org/3/library/string.html#formatstrings
>> 6.1.3. Format String Syntax:
>>
>> str.format("Bring me a {
>>
>> depth-in-paren. i.e.
>>
>> (nth 0 (parse-partial-sexp ...))
> This bug report is a bit incomplete, what do you put for "..."?
(point-min) (point)
>
>> should indicate "2", but says "1".
>>
>> When outside a string, `{' is recognized as opener.
> I think this is correct, parse-partial-sexp detects whether it's in a
> string-literal or not. If you want to parse the contents of the string
> literal, FROM should be inside the literal.
Thanks. This works for me:
(defun in-string-interpolation-maybe ()
(let ((pps (parse-partial-sexp (point-min) (point))))
(and (nth 3 pps) (nth 3 (parse-partial-sexp (1+ (nth 8 pps))
(point))))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24434
; Package
emacs
.
(Thu, 15 Sep 2016 12:51:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 24434 <at> debbugs.gnu.org (full text, mbox):
tags 24434 = notabug
close 24434
quit
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>>>
>>> When outside a string, `{' is recognized as opener.
>> I think this is correct, parse-partial-sexp detects whether it's in a
>> string-literal or not. If you want to parse the contents of the string
>> literal, FROM should be inside the literal.
>
> Thanks. This works for me:
>
> (defun in-string-interpolation-maybe ()
> (let ((pps (parse-partial-sexp (point-min) (point))))
> (and (nth 3 pps) (nth 3 (parse-partial-sexp (1+ (nth 8 pps))
> (point))))))
Okay, looks like everything is functioning as expected, closing.
Added tag(s) notabug; removed tag(s) moreinfo.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Thu, 15 Sep 2016 12:51:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
24434 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Thu, 15 Sep 2016 12:51:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Oct 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.