all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 24627@debbugs.gnu.org
Subject: bug#24627: 24.5; (thing-at-point 'list) may return a non-empty string without a list
Date: Sat, 15 Oct 2016 12:26:11 +0200	[thread overview]
Message-ID: <42cf0703-980e-7a80-8547-4e3160bf1993@easy-emacs.de> (raw)
In-Reply-To: <87vawuc5fi.fsf@gmail.com>



On 15.10.2016 11:44, Tino Calancha wrote:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> On 13.10.2016 10:50, Tino Calancha wrote:
>>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>>>
>>>> beg still needs a check like
>>>>
>>>> (not (nth 8 (parse-partial-sexp (point-min) (point))))
>>>>
>>>> otherwise it could match inside a string or comment
>>> I have the feeling that this should return the local list
>>> at point, even if inside a string or comment.
>> Yes, but that would be reported by pps. However, when point is at
>> opening delimiter, this is not recognised by pps. Then we must be sure
>> not being inside a string or comment, where an opening delimiter is
>> meaningless, i.e. just a literal.
>>
>> IMO all needed is  something like
>>
>> (beg (or (nth 1 (parse-partial-sexp...))
>>
>>           (and (eq 4 (car (syntax-after (point))))
>>                (not (nth 8 (parse-partial-sexp...))
>>                (point)))))
>>       
>>
>> Should both fail, there is not list at point.
> Thank you.  I think i got what you mean.
> I need to invert the order of the above `or':
> (nth 1 (parse-partial-sexp...))
> need to appear the second.  Otherwise,
> (with-temp-buffer
>    (insert "(foo (a b) bar)")
>    (goto-char 6)
>    (list-at-point))
>
> will return:
> (foo (a b) bar)
> instead of:
> (a b)

Ah, good catch. Thanks back.






      reply	other threads:[~2016-10-15 10:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  9:43 bug#24627: 24.5; (thing-at-point 'list) may return a non-empty string without a list Tino Calancha
2016-10-07  6:42 ` Andreas Röhler
2016-10-11  3:42   ` Tino Calancha
2016-10-11 15:37     ` Andreas Röhler
2016-10-11 16:29       ` Tino Calancha
2016-10-11 16:47         ` Noam Postavsky
2016-10-11 17:09           ` Tino Calancha
2016-10-11 17:15             ` Noam Postavsky
2016-10-11 17:21               ` Tino Calancha
2016-10-11 17:16         ` bug#24627: "internal" designation [was: bug#24627: 24.5; (thing-at-point 'list) ...] Drew Adams
2016-10-11 17:21           ` Drew Adams
2016-10-11 17:20         ` Drew Adams
2016-10-11 19:13           ` Andreas Röhler
2016-10-12  5:11             ` "internal" designation [ Tino Calancha
2016-10-12  6:47               ` Andreas Röhler
2016-10-11 18:40         ` bug#24627: 24.5; (thing-at-point 'list) may return a non-empty string without a list Andreas Röhler
2016-10-12  4:58           ` Tino Calancha
2016-10-12  7:10             ` Andreas Röhler
2016-10-13  8:50               ` Tino Calancha
2016-10-13 17:50                 ` Andreas Röhler
2016-10-15  9:44                   ` Tino Calancha
2016-10-15 10:26                     ` 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

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

  git send-email \
    --in-reply-to=42cf0703-980e-7a80-8547-4e3160bf1993@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=24627@debbugs.gnu.org \
    --cc=tino.calancha@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.