‘face’text property with a value of
‘font-lock-string-face’. Search overlays or text properties. From within Isearch:
‘C-M-t’for regexp search). First time, or with a prefix argument, you are prompted for the property and its values. See the doc string of command
‘face’and other text properties for use with
‘C-t’, you can use command
‘isearchp-put-prop-on-region’(outside of Isearch) to add a text property to a zone of text. By default, it applies the last property and value whose zones you searched using
‘C-t’, but a prefix argument lets you specify the property and value to apply. This gives you an interactive way to set up zones for text-property search (
‘C-t’). For property
‘face’, empty input removes all faces from the region.
‘nil’means automatically set the region around the last search target.
‘isearchp-toggle-set-region’, bound to
‘C-SPC’during isearch – toggle
‘set-region-around-search-target’– manually set the region around the last search target.
‘isearchp-regexp-quote-yank-flag’) and command (
‘isearchp-toggle-regexp-quote-yank’, bound to `
C-`’) to toggle quoting (escaping) of regexp special characters. With escaping turned off, you can yank text such as
^\*.*without it being transformed to
‘isearchp-retrieve-last-quit-search’) yanks the last successful search string (regexp or plain) from when you last hit
‘C-g’in Isearch. Sometimes you search for something but abandon the search — you just want to check the locations of something, without staying at any of them. Afterward, if you want to find them again, use
‘M-g’. This yanks that search string, so you can append it to whatever you are already searching for.
‘isearch-yank-secondary’) yanks the secondary selection onto the search string, if you also use library second-sel.el (see secondary selection enhancements).
‘isearchp-yank-char’) yanks successive characters onto the search string.
‘isearchp-yank-symbol-or-char’) yanks successive symbols (or words or subwords or chars) onto the search string.
‘isearchp-yank-sexp-symbol-or-char’) yanks successive sexps (or symbols or words or subwords or chars) onto the search string.
‘isearchp-kill-ring-save’) copies the current search string to the kill ring. You can then, for example, use
‘C-s M-y’to search for the same thing in another Emacs session. (Use
‘C-y’(in addition to any other Isearch bindings):
C-y C-_ isearchp-yank-symbol-or-char C-y C-( isearchp-yank-sexp-symbol-or-char C-y C-2 isearch-yank-secondary C-y C-c isearchp-yank-char C-y C-e isearchp-yank-line C-y C-w isearchp-yank-word-or-char C-y C-y isearch-yank-kill C-y M-y isearch-yank-pop
‘isearch-yank-pop’) by just repeating the last key. For example:
‘C-y C-e C-e C-e’adds the text up to the end of three lines.
‘isearchp-yank-line’. (It “works” for the others in Emacs 24 only because the same key without the
‘C-y’prefix is bound to essentially the same command. So the “repetition” is really a separate command.)
‘C-x 8 RET’(
‘isearchp-read-unicode-char’) reads the name of a Unicode character with completion and appends it to the search string. Same thing when editing the search string (i.e., after
‘isearchp-open-recursive-edit’) opens a recursive editing session, where you can do anything you like (including search for something different). Using
‘C-M-c’closes the recursive editing session and resumes the search (from the current position when you hit
‘C-g’, or removed/replaced automatically if you use
‘M-k’(see next). I added this feature to vanilla Emacs in release 23.1.
‘C-g’after successfully finding matches restores not only the original position but also its relative position in the window. IOW, you get back to what you saw before searching. Fixes GnuEmacs bug #12253 for Isearch.
‘isearchp-cycle-mismatch-removal’) cycles automatic removal or replacement of the input portion that does not match. The behavior is controlled by the value of option
‘replace-last’– Your current input replaces the last mismatched text. You can always see your last input, even if it is a mismatch. And it is available for editing using
‘nil’– Your current input is appended, even if the previous input has a mismatched portion.
‘isearchp-toggle-invisible’) toggles invisible-text sensitivity while searching.
‘prior’repeat the last Isearch forward and backward (easier than using the chords
‘C-end’– go to the longest line. Repeat to go to the longest line following that one in the buffer. As usual,
‘C-g’puts you back where you started. This binding is made only if you also use library misc-cmds.el. See Find Long Lines.
‘C-h’provides help on Isearch while searching. Library isearch+.el also redefines
‘isearch-mode-help’so that it lists all Isearch bindings and ends Isearch properly.
‘isearch-edit-string’) automatically puts the cursor at the first mismatch position in the search string, for easy editing. Whereas
‘M-k’) removes all of the mismatch, this feature lets you change or insert a character or two, without losing the rest of the search string.
‘isearchp-initiate-edit-commands’, that specifies commands whose keys will not exit Isearch but will instead initiate editing of the search string. For example, if
‘backward-char’is included in the list then
‘left’will just move the cursor backward over the search string so you can change, delete, or insert chars in the middle somewhere. This makes the search string more minibuffer-like.
‘C-s’etc. to search for it. This is controlled by user option
‘query-replace’. In particular, the ability to select (put the region around) the last replacement.
In Emacs 24.2.1, and maybe other versions, if you use IsearchPlus with Ido Ubiquitous (see: InteractivelyDoThings) enabled, you find that you can’t search for unicode charaters and if you try an error is generated. In Emacs 24.2.1 the solution is to disable Ido’s advice around
‘isearchp-read-unicode-char’ is called. This can be done by putting:
in your .emacs file. When I first did this, I evaluated the form interactively and it didn’t seem to fix the problem - I don’t know why - but it worked next time I started up Emacs. — Bernard Hurley
Good to know, for Ido users. If you investigate a bit more and figure out why it sometimes does not work, would this be something that should be done automatically in Isearch+? Or do you think some users would not want it done (in which case perhaps it should be an option or an Isearch toggle)? Would you like to try patching
isearch+.el to DTRT? Seems like we should be able to take care of this kind of thing automatically, so users do not need to do anything. – DrewAdams
Ido seems to work by advising
‘completing-read’ and advising various functions that call it. Ido code doesn’t look very clear to me, but I think that’s what it does. It also turns off this advice for functions that the Ido developers know about but haven’t got round to advising. This is obviously going to cause problems if you write a function that calls
‘completing-read’, as yours does, and are returned an unexpected value. I can’t imagine any users not wanting this fixed automatically. My own thoughts are that since Ido makes this quite radical change to a core Emacs function, it’s better if it’s done automatically in that package. I have emailed the developers to gently suggest this. However I will look farther into it in case they don’t want to do so. – Bernard Hurley
Thanks for the update. FYI, I renamed
‘isearchp-insert-char-by-name’ in keeping with an updated definition and an expectation that Emacs 24.4 might include this (as
I still have the same question as above:
Please let me know, when you can. It would be good to take care of this problem automatically, if that is appropriate. Thx – DrewAdams
Since searching for unicode characters in isearch+ is virtually impossible without the fix, I think it should be done automatically. Ido users might be a bit surprised not to get an Ido search at this point but Ido isn’t guaranteed to work everywhere, so I can’t see why anyone shouldn’t want the fix. – Bernard Hurley
OK, thanks. Can you provide a patch? Note that the same feature might well be added to Emacs — see this thread: http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00234.html. So you might want to bring JuriLinkov into the loop about fixing this wrt Ido. He might also have a suggestion. Please cc me if you do so by email. Thx – DrewAdams