all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* master c8acc5fd92: Introduce a new 'inhibit-isearch' text property
@ 2021-11-06 18:45 Juri Linkov
  2021-11-06 21:20 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2021-11-06 18:45 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

@@ -3547,7 +3561,8 @@ isearch-search-string
 Optional third argument, if t, means if fail just return nil (no error).
   If not nil and not t, move to limit of search and return nil."
   (let* ((func (isearch-search-fun))
-         (pos1 (save-excursion (funcall func string bound noerror)))
+         (pos1 (save-excursion
+                 (isearch--search-skip-inhibited func string bound noerror)))
          pos2)
     (when (and
 	   ;; Avoid "obsolete" warnings for translation-table-for-input.
@@ -3570,7 +3585,8 @@ isearch-search-string
         (when translated
           (save-match-data
             (save-excursion
-              (if (setq pos2 (funcall func translated bound noerror))
+              (if (setq pos2 (isearch--search-skip-inhibited
+                              func string bound noerror))
                   (setq match-data (match-data t)))))
           (when (and pos2
                      (or (not pos1)

It would be much cleaner to implement this using isearch-filter-predicate.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master c8acc5fd92: Introduce a new 'inhibit-isearch' text property
  2021-11-06 18:45 master c8acc5fd92: Introduce a new 'inhibit-isearch' text property Juri Linkov
@ 2021-11-06 21:20 ` Lars Ingebrigtsen
  2021-11-07 18:13   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-06 21:20 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel

Juri Linkov <juri@linkov.net> writes:

> It would be much cleaner to implement this using isearch-filter-predicate.

Isn't that for the user to tweak?  'inhibit-isearch' expresses intention
from the person who put text into the buffer.

But I guess that would make the implementation cleaner.

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master c8acc5fd92: Introduce a new 'inhibit-isearch' text property
  2021-11-06 21:20 ` Lars Ingebrigtsen
@ 2021-11-07 18:13   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2021-11-07 18:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> Isn't that for the user to tweak?  'inhibit-isearch' expresses intention
> from the person who put text into the buffer.

'inhibit-isearch' is not different from e.g. the text property
'dired-filename' used by 'dired-isearch-filter-filenames'
via 'isearch-filter-predicate' and other similar properties.

> But I guess that would make the implementation cleaner.

Done, a cleaner implementation pushed to master.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-07 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-06 18:45 master c8acc5fd92: Introduce a new 'inhibit-isearch' text property Juri Linkov
2021-11-06 21:20 ` Lars Ingebrigtsen
2021-11-07 18:13   ` Juri Linkov

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.