[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36486: [PATCH] Add tests for text-property-search to check prop-matc
From: |
Juri Linkov |
Subject: |
bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value |
Date: |
Tue, 09 Jul 2019 23:31:05 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> But searching for a certain font-lock face value is the most useful
>> application of this command. How do you do that?
>
> Non-interactively?
>
> (I've never used it to search for any faces. :-))
It is useful interactively to find errors fontified
with the error face. Here is a better patch that
can read symbols as well as strings:
diff --git a/lisp/emacs-lisp/text-property-search.el
b/lisp/emacs-lisp/text-property-search.el
index 41ca07057e..9c45cee3c1 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -54,10 +54,13 @@ text-property-search-forward
that's matching), and `prop-match-value' (the value of PROPERTY
at the start of the region)."
(interactive
- (list
- (let ((string (completing-read "Search for property: " obarray)))
- (when (> (length string) 0)
- (intern string obarray)))))
+ (let* ((property (completing-read "Search for property: " obarray))
+ (property (when (> (length property) 0)
+ (intern property obarray)))
+ (value (when property
+ (read-from-minibuffer "Search for property value: "
+ nil nil t nil "nil"))))
+ (list property value)))
(cond
;; No matches at the end of the buffer.
((eobp)
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Stefan Kangas, 2019/07/03
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/06
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Juri Linkov, 2019/07/07
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/08
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Juri Linkov, 2019/07/08
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/08
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value,
Juri Linkov <=
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/09
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Juri Linkov, 2019/07/10
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/11
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Juri Linkov, 2019/07/11
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/12
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Juri Linkov, 2019/07/12
- bug#36486: [PATCH] Add tests for text-property-search to check prop-match-value, Lars Ingebrigtsen, 2019/07/12