mailing-list for TeXmacs Users

Text archives Help


[TeXmacs] complex search and replace


Chronological Thread 
  • From: Michael Lachmann <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: [TeXmacs] complex search and replace
  • Date: Tue, 14 Jan 2014 14:41:54 +0100

I just discovered that TeXmacs can actually do search and replace of complex
structures, like
parts of formulas, or text with certain properties
(look in the documentation of search and replace.. basically you select one,
do "edit->copy to search", select the other, do "edit->copy to replace", and
then do the search with empty strings. A bit of a hack.)

What is strange is that this hack works differently when you are in "edit
source tree" mode and in regular mode.
It is obvious that in edit source tree mode, you can be much more precise in
telling exactly what you want to search, and exactly what you want to
replace. So, if you have these formulas in a document:
x^2
x^3
1+f(x^2)+x^2

you can select the x^2 and replace all occurrences with x^3.
But what is strange is that if you do all the selection in source tree mode,
and then switch to non-source tree mode, suddenly nothing is found. Switch
back to source tree mode, and things are found again.


Another thing I found is that selected regions are not preserved between
source tree and non-source tree mode.
When you switch between them, strange things happen with the selection.

Michael

  • [TeXmacs] complex search and replace, Michael Lachmann, 01/14/2014

Archive powered by MHonArc 2.6.19.

Top of page