Is the &#39;<span class="Apple-style-span" style>Script Plugin&#39; an option for keybindings?</span><div><br></div><div>S.</div><div><br></div><span></span><div><span class="Apple-style-span" style>The Script Plugin for DrRacket may help to create simple plugins, like automatic text (or snip%s) insertion, text selection replacement (and much more), without needing to restart DrRacket :<br>
<a href="http://planet.plt-scheme.org/display.ss?package=script-plugin.plt&amp;owner=orseau" target="_blank" style="text-decoration:none">http://planet.plt-scheme.org/display.ss?package=script-plugin.plt&amp;owner=orseau</a><br>
Docs:<br><a href="http://planet.plt-scheme.org/package-source/orseau/script-plugin.plt/2/0/planet-docs/manual/index.html" target="_blank" style="text-decoration:none">http://planet.plt-scheme.org/package-source/orseau/script-plugin.plt/2/0/planet-docs/manual/index.html</a></span><br dir="ltr">
<br>On Friday, May 11, 2012, Nick Shelley  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So no, it does not allow you to enter arbitrary computations. I&#39;m not saying that this should replace the current language-based approach, but I think that having this for all pre-defined actions (like new tab, run, complete, etc.) would make customizing (as apposed to augmenting) much more convenient.<br>


<br><div>On Fri, May 11, 2012 at 1:39 PM, Nick Shelley <span dir="ltr">&lt;<a>nickmshelley@gmail.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Sorry to be imprecise. It lists all menu actions plus many standard text actions. Here&#39;s a screenshot of the last menu actions followed by some selection actions.<div><div><div><br><div>

On Fri, May 11, 2012 at 1:32 PM, Luke Vilnis <span dir="ltr">&lt;<a>lvilnis@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I assume Chaitin&#39;s constant is involved.<div><div><br><br><div>On Fri, May 11, 2012 at 3:22 PM, Matthias Felleisen <span dir="ltr">&lt;<a>matthias@ccs.neu.edu</a>&gt;</span> wrote:<br>




<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
[How] does Xcode allow you to enter arbitrary computations in response to key events? I don&#39;t understand how one can list &quot;all possible actions&quot; since there are infinitely many? -- Matthias<br>
<div><div><br>
<br>
<br>
On May 11, 2012, at 2:58 PM, Nick Shelley wrote:<br>
<br>
&gt; On the topic of key bindings, is there a reason this can&#39;t be done in the preferences menu? Xcode has a key bindings section in the preferences menu that has all possible actions on the left and the current bindings on the right, and you can just click on the current binding and change it to whatever you want. I think something like that would be nice in DrRacket, but I have no idea how hard it would be to implement.<br>





&gt;<br>
&gt; Maybe that&#39;s on the list of &quot;It would be nice, but...&quot;<br>
&gt;<br>
&gt; On Fri, May 11, 2012 at 6:14 AM, Robby Findler &lt;<a>robby@eecs.northwestern.edu</a>&gt; wrote:<br>
&gt; Ah, good point. I&#39;ve added some example code to the docs that shows<br>
&gt; how to bind menu items. Here&#39;s the code.<br>
&gt;<br>
&gt; Robby<br>
&gt;<br>
&gt; #lang s-exp framework/keybinding-lang<br>
&gt;<br>
&gt; (define (menu-bind key menu-item)<br>
&gt;  (keybinding<br>
&gt;   key<br>
&gt;   (λ (ed evt)<br>
&gt;     (define canvas (send ed get-canvas))<br>
&gt;     (when canvas<br>
&gt;       (define menu-bar (find-menu-bar canvas))<br>
&gt;       (when menu-bar<br>
&gt;         (define item (find-item menu-bar menu-item))<br>
&gt;         (when item<br>
&gt;           (define evt<br>
&gt;             (new control-event%<br>
&gt;                  [event-type &#39;menu]<br>
&gt;                  [time-stamp<br>
&gt;                   (send evt get-time-stamp)]))<br>
&gt;           (send item command evt)))))))<br>
&gt;<br>
&gt; (define/contract (find-menu-bar c)<br>
&gt;  (-&gt; (is-a?/c area&lt;%&gt;) (or/c #f (is-a?/c menu-bar%)))<br>
&gt;  (let loop ([c c])<br>
&gt;    (cond<br>
&gt;      [(is-a? c frame%) (send c get-menu-bar)]<br>
&gt;      [(is-a? c area&lt;%&gt;) (loop (send c get-parent))]<br>
&gt;      [else #f])))<br>
&gt;<br>
&gt; (define/contract (find-item menu-bar label)<br>
&gt;  (-&gt; (is-a?/c menu-bar%)<br>
&gt;      string?<br>
&gt;      (or/c (is-a?/c selectable-menu-item&lt;%&gt;) #f))<br>
&gt;  (let loop ([o menu-bar])<br>
&gt;    (cond<br>
&gt;      [(is-a? o selectable-menu-item&lt;%&gt;)<br>
&gt;       (and (equal? (send o get-plain-label) label)<br>
&gt;            o)]<br>
&gt;      [(is-a? o menu-item-container&lt;%&gt;)<br>
&gt;       (for/or ([i (in-list (send o get-items))])<br>
&gt;         (loop i))]<br>
&gt;      [else #f])))<br>
&gt;<br>
&gt; (menu-bind &quot;c:a&quot; &quot;Run&quot;)<br>
&gt;<br>
&gt;<br>
&gt; On Thu, May 10, 2012 at 8:22 PM, Ray Racine &lt;<a>ray.racine@gmail.com</a>&gt; wrote:<br>
&gt; &gt; I&#39;m caught in a bit of Catch-22.   From the doc.<br>
&gt; &gt;<br>
&gt; &gt; If you are most familiar with Emacs-style key bindings (especially on<br>
&gt; &gt; windows or some linux installations where the control key is, by default,<br>
&gt; &gt; for the menu shortcuts), you should uncheck the Enable keybindings in<br>
&gt; &gt; menus preference. Many of the keybindings below are inspired by Emacs.<br>
&gt; &gt;<br>
&gt; &gt; So I&#39;ve disabled keybindings in menu and thereby lose crtl-r Run and crtl-i<br>
&gt; &gt; Reindent.  I&#39;d like to re-bind but I&#39;ve as of yet been unable to locate what<br>
&gt; &gt; functions Run and Reindent correspond to.<br>
&gt; &gt;<br>
&gt; &gt; I totally missed the online check syntax option, which sounds like a very<br>
&gt; &gt; good thing.  In fact I&#39;m still totally missing </div></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></blockquote></div><br><br>-- <br><div> </div><div>--</div><div>
Stephen De Gabrielle</div><div><a href="mailto:stephen.degabrielle@acm.org" target="_blank">stephen.degabrielle@acm.org</a></div><div>Telephone +44 (0)20 85670911</div><div>Mobile        +44 (0)79 85189045</div><div><a href="http://www.degabrielle.name/stephen" target="_blank">http://www.degabrielle.name/stephen</a></div>
<div>----</div><div>Professor: Oh God! I clicked without reading! </div><div>Cubert: And I slightly modified something I own! </div><div>Professor: We&#39;re monsters!</div><br>