# [OS X TeX] Find & Replace in TS

JOSEP MARIA FONT LLOVET jmfont at ub.edu
Sat Sep 8 11:20:09 CEST 2012

On 07/09/2012, at 23:18, Herbert Schulz wrote:

> On Sep 7, 2012, at 2:35 PM, Themis Matsoukas <tmatsoukas at me.com> wrote:
>
>> I think this request has been made by others before but I would like to repeat it: When I search using the OgreKit the Replace tab contains the string used in the most recent Replace action. That's a disaster waiting to happen, and today it happened to me. I was searching for all \tilde and accidentally all the \tilde were replaced by \chapter, which was the leftover string in Replace. You can imagine the console when you try to typeset an equation that contains \chapter, and it is not pretty. To make things worse, the error message I was getting was about missing braces, which kept me very confused until I spotted the misplaced \chapter. My disaster was easy to fix once I knew what the problem was.  Other programs keep the replace/replace all tab hidden until you specifically ask for a replacement, and then, this tab is empty. Of course, other programs don't give you the versatility of the OgreKit, and most of them cannot beat the price of TS (\$0.00), but I wish this could be fixed in a future release. And I would be happy (and I mean happy, not just willing) to pay a dollar price for TS, which is probably the most heavily used app on my computer.
>>
>> Themis
>
>
> Howdy,
>
> You clearly did a Replace All instead of a Find All.

A recent period of heavy detailed editing in TeXShop has convinced me to do a "Find all" before any massive replacement. The feature is very convenient, you can see the context of each occurrence of the found string and whether there are potential conflicts, etc. (e.g., some : should be changed to \colon, but certainly not all...). Very often one does not realize the wanted string appears also as a substring of others you were not thinking of...

BTW, is there any quick, simple user guide of the regular expressions issue for beginners ? From time to time I think I could use it if I knew how to...

Best,

JMaF

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.