[R-SIG-Mac] Cocoa GUI feature request (with patch!)

Jean Thioulouse jtnews1 at biomserv.univ-lyon1.fr
Thu Oct 21 13:43:06 CEST 2004


I checked Byron's patch, and it works exactly like needed. It also
seems to interact well with history and command completion (which
I have just discovered and is indeed very neat).

Jean

At 1:25 -0700 21/10/04, Byron Ellis wrote:
>The insertion point moves because its part of the selection handling 
>routines for NSTextView. Short of a completely custom terminal 
>implementation there's no really good way of suppressing it without 
>breaking the selection behavior. I'm pretty sure we like all of the 
>selection behavior. Hence my little patch, which does not swallow 
>typing, rather it does exactly what you suggest--append the typing 
>to the current line (and reset the insertion point while we're at 
>it).
>
>I'm not certain how it interacts with the history (up-arrow, 
>down-arrow) or command completion (tab. BTW, thanks for including 
>this---the command line R on any platform AFAIK has never sensibly 
>implemented tab. It completes filenames, which is just weird). I 
>suspect it just ignores those inputs if the insertion point is in 
>the wrong location (this is reparable, I just didn't think of it 
>until now).
>
>
>On Oct 21, 2004, at 1:12 AM, jtnews1 at biomserv.univ-lyon1.fr wrote:
>
>>Pressing CMD+1 does not change the fact that, when you click in the
>>console window, the insertion point is moved to the line where the
>>click occured. This makes it impossible to type new commands, unless
>>you click on the last input line, which is not easy, or type a carriage
>>return, which means that the command you just typed before this carriage
>>return is lost.
>>
>>Why is the insertion point moved when a click occurs in the console
>>window ? I think it should stay at the prompt just after the last
>>output, like when using the terminal. Any keystroke should be echoed
>>on the last line, and not "eaten" by the console.
>>
>>Jean
>>
>>On Oct 21, 2004, at 9:00 AM, stefano iacus wrote:
>>
>>>I'll have a look, but you can just press CMD+1 to activate the keyb.
>>>
>>>stefano
>>>
>>>On Oct 21, 2004, at 9:00 AM, Byron Ellis wrote:
>>>
>>>>First off, many many thanks to Stefano and Simon for their hard
>>>>work making OS X a first-class R citizen. Great work guys!
>>>>
>>>>Second, I'm a lazy sort of guy (you may have noticed...) and I tend
>>>>to click at random on the R Console to activate it, which has the
>>>>unfortunate effect of moving the insertion point, rendering the
>>>>keyboard more-or-less useless. My solution, in the attached patch,
>>>>makes a small change to the RController that inserts the text at
>>>>the end of the console buffer and moves the insertion point to the
>>>>end when text is entered within the committed text region.
>>>>
>>>>
>>
>>
>>--
>>Jean Thioulouse - Labo. BBE, UMR CNRS 5558, Equipe "Ecologie Statistique"
>>Universite Lyon 1,  Batiment G. Mendel, 69622 Villeurbanne Cedex,  France
>>Tel: (33) 4 72 43 27 56                           Fax: (33) 4 72 43 27 56
>>                 http://pbil.univ-lyon1.fr/JTHome.html
>>
>>_______________________________________________
>>R-SIG-Mac mailing list
>>R-SIG-Mac at stat.math.ethz.ch
>>https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>---
>Byron Ellis (bellis at hsph.harvard.edu)
>"Oook" -- The Librarian

-- 
Jean Thioulouse - Labo. BBE, UMR CNRS 5558, Equipe "Ecologie Statistique"
Universite Lyon 1,  Batiment G. Mendel, 69622 Villeurbanne Cedex,  France
Tel: (33) 4 72 43 27 56                           Fax: (33) 4 72 43 27 56
                 http://pbil.univ-lyon1.fr/JTHome.html



More information about the R-SIG-Mac mailing list