jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Orthogonality beetween keybinding and language modes [was: "RE: Your enhanced Perl mode for JED (fwd)"]


Please see especially the discussion in the PS: block.


---------- Forwarded message ----------
Date: Thu, 6 Nov 2008 13:16:19 +0100 (CET)
From: Michele Dondi <blazar@xxxxxxxxxxxxxxxxxx>
Reply-To: Michele 'blazar' Dondi <blazar@xxxxxxxxxxxxxx>, blazar@xxxxxxxxxxxx
To: "Olesen, Mark" <***>
Subject: RE: Your enhanced Perl mode for JED

On Thu, 6 Nov 2008, Olesen, Mark wrote:

[Cut]

As far as "other functionality" is concerned... well what I WOULD REALLY LIKE is interaction WITHIN the editor. First of all, a keybinding to just run the script.

Something like perl_exec (Ctrl-C e), or perl_check (Ctrl-C c) ?

So, it's actually there! I may have suspected it...

Then some refinements of the same action: e.g. run it on a given buffer or selection within a buffer, to be passed either via STDIN or as a filename on the cmd line. With output in another buffer or modifiying the buffer or selection in place.

This shouldn't be so hard, but I've never needed it myself.
There is a filter region command within JED, but that's not how I work.

Hmmm, this works in what I would call a complementary way. Of course I suppose it's enough to save the Perl script to disk. I wonder if there's any way to make it work by selecting it from a buffer instead. (Which, for maximum reliability would include to temporarily save to disk, IMHO, as opposed to passing it to the perl executable through STDIN...)

[Cut]

PS: I just tried perl_exec, which of course works like a charm, and I feel like an idiot for not having known about it for years! Anyway... I don't have a keybinding for it: of course I can set it up FOR ME and it would make some sense since after all I *only* (well, mostly, but that's another story) program in Perl. But that brings us to another problem: namely, that of orthogonality between main editing modes (i.e. keybindings) and language-specific modes. I believe the former ones should provide an "introductory keybinding" upon which the latter ones could form composed ones. For example, I see ^J is not taken by the ide mode I use. Then the perl mode may use it abstractly (i.e. asking it to some function which I don't know) to form ^J-e, ^J-c and assign them to perl_exec, perl_check and so on. And similarly other modes. Does it make sense? If so, then I'm asking you the permission to forward this very mail to the JED ML. I would like to know what the other guys think of it.

---------- End of forwarded message ----------


TIA,
Michele
--
Oh whatta mighty!
Oh whatta mighty!
Oh whatta mighty dread!
Oh whatta mighty dread...
- Buju Banton

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]