Timeline for Make region(s) invisible (not evaluated) to "string-match", "occur" and similar commands
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 14, 2019 at 22:32 | vote | accept | Gabriele | ||
Mar 11, 2019 at 22:37 | comment | added | Drew |
Didn't notice anything obviously amiss with your code. I assume you tested with the various optional args etc. A few of the functions have almost identical code - dunno whether you want to factor out the common part. If you submit your code as a patch in a bug report the Emacs developers will anyway take a close look. If they decide that isearch-filter-predicate should be respected by such functions then they might want to make the change in C, where some of the functions are defined now.
|
|
Mar 11, 2019 at 22:30 | comment | added | Drew |
You should always feel free to use M-x report-emacs-bug to make a bug report or an enhancement request (e.g. make non-interactive search functions respect isearch-filter-predicate or whatever). But someone might give a good reason why they intended it only for interactive search (dunno).
|
|
Mar 11, 2019 at 22:01 | comment | added | Gabriele | @Drew, I would appreciate it very much if you could take a look at my own answer. I was thinking of sending it as a patch or as a feature request. | |
Mar 11, 2019 at 21:57 | answer | added | Gabriele | timeline score: 0 | |
Feb 15, 2019 at 18:19 | comment | added | Gabriele |
@Tobias Thank you for you comment. Up to now I have used a strategy similar to the one you described. This strategy has the side effect that an undo alters the contents of the buffer. I'd like to avoid this problem. Indeed I'd like to operate only on text properties instead on text.
|
|
Feb 15, 2019 at 14:45 | comment | added | Tobias |
You can modify the buffer temporarily for the execution of a function with cmdbufmod . You could look for an eqnarray environment, restrict the buffer to that region, delete the sub-environments in the entries of BUFMOD-LIST of cmdbufmod , run your command, and leave cmdbufmod restoring the deleted sub-environments.
|
|
Feb 14, 2019 at 8:17 | history | edited | Gabriele | CC BY-SA 4.0 |
added 1 character in body
|
Feb 13, 2019 at 16:28 | comment | added | Drew |
Not with isearch-filter-predicate , to my knowledge anyway. But perhaps someone will post a relevant and helpful answer for you.
|
|
Feb 13, 2019 at 7:02 | comment | added | Gabriele |
@Drew I know I can use an alternative method to test for text properties on the region. I was only wondering if there was a system to hide some portions of the buffer to string-match and similar functions. This would make my job easier.
|
|
Feb 13, 2019 at 0:18 | comment | added | Drew |
You can check for your text property during your scan of the buffer (your test... ). Something like that is what you'll need to do. You could define a function that does only that and use that in other code. See next-single-char-property-change , for a start.
|
|
Feb 13, 2019 at 0:14 | comment | added | Drew |
1. You could simplify the code you present here, to make it easier. 2. Why would you expect string-match(-p) or occur to be sensitive to isearch-filter-predicate ? They are not, nor are functions such as re-search-forward (used by occur-1 ). Isearch and perform-replace are sensitive to it.
|
|
Feb 12, 2019 at 22:40 | history | edited | Gabriele | CC BY-SA 4.0 |
deleted 2 characters in body
|
Feb 12, 2019 at 21:17 | history | edited | Gabriele | CC BY-SA 4.0 |
added 4 characters in body
|
Feb 12, 2019 at 21:03 | history | edited | Gabriele | CC BY-SA 4.0 |
added 33 characters in body
|
Feb 12, 2019 at 20:55 | history | edited | Gabriele | CC BY-SA 4.0 |
added 2 characters in body
|
Feb 12, 2019 at 20:49 | history | asked | Gabriele | CC BY-SA 4.0 |