[OS X TeX] avoid space when pasting in TeXShop

Matthias Damm macplanet at macnews.de
Tue Apr 4 21:02:09 CEST 2006

Am 02.04.2006 um 17:23 schrieb Jan Hegewald:

> Am 31.03.2006 um 19:13 schrieb Adam R. Maxwell:
>> Looks like it can be disabled with setSmartInsertDeleteEnabled:NO  
>> (but then you have an inconsistent user experience).
> The assistance this feature provides is generally a good idea.  
> Rather than to turn it completely off, I would like to "fix" the  
> behavior: If pasting in a string which doesn't contain any spaces,  
> no spaces should be added around the inserted snippet.
> pasting into "foo bar" gives "foo TEST bar", which is good.
> pasting into "\ref{fig:foo}" should result in "\ref{fig:TESTfoo}",  
> not "\ref{fig: TEST foo}".
> As Justin noticed, the behaviour depends on how you *copy* TEST. It  
> should also depend on the situation present when pasting.

It already depends on the situation when pasting:

Try the following: double-click TEST and copy it.

1. Insert it into "foobar" (after "foo") -> "foo TEST bar"
2. Insert it into "foo bar" (before or after the space) -> "foo TEST  
3. Insert it into "foo  bar" (between the spaces) -> "foo TEST bar"
4. Insert it into "foobar" (after "bar") -> "foobar TEST"

I.e. in the second and third case the double space(s) is/are omitted  
automatically, in the fourth case the space after "TEST" is omitted.
(All tried out inside Mail.app, but I suppose it will work like this  
in every application that uses NSTextView.)

So it seems to be intended to paste (not only copy) according to the  
place where you want to paste something, and the behavior seems to  
make sense for text editing.

But of course you are right that the desired behavior will be  
different inside a programming editor.

The best solution was if Apple made the behavior of NSTextView more  
sophisticated, and it might be a good idea to file a feature request,  
but I don't think we should expect a change for 10.4.7 or something ;-)

Best regards,

Matthias Damm
mad at macpla.net
PGP key: http://macpla.net/MatthiasDamm.asc
PGP fingerprint: CED3 6074 7F7D 3148 C6F3  DFF2 05FF 3A0B 0D12 4D41

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the macostex-archives mailing list