unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juri Linkov <juri@linkov.net>
Cc: 36486@debbugs.gnu.org, Stefan Kangas <stefan@marxist.se>
Subject: bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value
Date: Thu, 11 Jul 2019 16:17:22 +0200	[thread overview]
Message-ID: <m37e8oy7t9.fsf@gnus.org> (raw)
In-Reply-To: <87o921mskm.fsf@mail.linkov.net> (Juri Linkov's message of "Thu,  11 Jul 2019 01:29:45 +0300")

Juri Linkov <juri@linkov.net> writes:

>> I don't understand -- this will still return a symbol.  (And error out
>> if you enter stuff like "foo bar".)
>
> Yes, entering a symbol returns a symbol, entering a string
> like "foo bar" returns a string "foo bar" literally.

Oh, right.  Hm.  Well, entering things with "..." is very unusual in
Emacs prompts, so if we want that, the prompt should at least say that
that's what's expected...

> Currently text-property-search-forward has more problems:
> today I needed to search the property ‘face’ with the value
> ‘hi-yellow’ in the buffer with regexps highlighted by hi-lock.el.
> Executing interactively:
>
>   M-x text-property-search-forward RET face RET hi-yellow RET
>
> failed to find the property because all hi-lock occurrences were
> combined with font-lock text properties, i.e. all they had the
> property ‘face’ with the value ‘(hi-yellow font-lock-keyword-face)’
> and text-property-search-forward fails to find a value in the list
> of values.

Yes, you can't really use text-property-search-forward to do that in any
meaningful manner, which is why I didn't add that to the interactive
bit.  It's a function useful almost only when programming, and the only
useful interactive thing is to vaguely poke around in the buffer.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-07-11 14:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  9:44 bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value Stefan Kangas
2019-07-06 14:25 ` Lars Ingebrigtsen
2019-07-07 22:59   ` Juri Linkov
2019-07-08 16:18     ` Lars Ingebrigtsen
2019-07-08 20:51       ` Juri Linkov
2019-07-08 21:54         ` Lars Ingebrigtsen
2019-07-09 20:31           ` Juri Linkov
2019-07-09 21:52             ` Lars Ingebrigtsen
2019-07-10 22:29               ` Juri Linkov
2019-07-11 14:17                 ` Lars Ingebrigtsen [this message]
2019-07-11 22:08                   ` Juri Linkov
2019-07-12 14:37                     ` Lars Ingebrigtsen
2019-07-12 18:47                       ` Juri Linkov
2019-07-12 23:40                         ` Lars Ingebrigtsen

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=m37e8oy7t9.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=36486@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=stefan@marxist.se \
    /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).