- Subject: Re: When a new version of JED will be released?
- From: Marko Mahnič <marko.mahnic@xxxxxxxx>
- Date: Thu, 18 Nov 2004 14:23:34 +0100
G. Milde wrote:
IMHO, it would be better to use Guidos keydefs.sl in these places, as it
works on all platforms the same. In my jedrc I have
require("keydefs"); % symbolic names for keys
Did you try the variant of expand_keystring() from
http://jedmodes.sf.net/mode/hyperhelp/ ?
I have not tried it, yet. But I think it will not work for the
menus (at least the text menus), since there is no hook in
jed.
I think the key-names in menus are really important.
( if I want to do a search command and I do not know the function
name, and I forgot the key, I open the menu and see ^@X: it does
not help. But describe_bindings would probably also do...)
This is something I really miss just now (for Ctrl-Shift-<Arrow> to mark
wordwise with cuamark.sl).
I am testing this feature at the time and it works. But it requires
a special (artificial) key mapping scheme.
There is another way to solve the key-names problem. We devise a
standard key scheme for Jed (for jed the key PageUp has allways
the same code no mather what os).
Each os then translates its keysequences into standard jed keysequences.
A brute-force approach would be to create preprocessing keymaps for
each os (each leaf contains a standard jed keysequence):
- OS stores an event into event queue
- sys_getkey uses a preprocessing keymap to convert the event into a
standard jed keysequence
- the obtained keysequence is stored with buffer_keystring()
And all the problems considering key-names are gone...
fljed does the above conversion.
What do you want to flag with VISIBLE_LINE_MARK? "Normal" reagions, or
lines tagged with create_line_mark()? BTW: There is a "slang-widget" for
listings in http://jedmodes.sf.net/mode/listings/ .
Consider copying a region of lines:
- goto first line
- bol
- mark
- goto last line
- eol
- move to new position
- bol
- paste
With VISIBLE_LINE_MARK (and a scrap that has the same flag)
- goto first line
- mark (of line type; cursor does not move)
- goto last line
- copy (cursor does not move)
- move to new position
- paste
I am lazy and I like to save at least 3 keypresses.
Also in brief if no region is marked and you call copy, you
have just copied the current line to the scrap. For me this
is a very frequent operation.
As John wrote, you will need some wrapper functions that set e.g. a
Variable Last_Region_is_Block to 1 or 0. Then you could use one paste()
fucntion to call either yp_yank() or insert_rect().
After I posted the reply to Dino I went and looked at the code. Since
there are two distinct scrap-buffers (Paste, Rectangle), a buffer
local variable would not do and Last_Region_is_Block seems the
best solution, although it does not allways work. I do not remember
where the problem is, but it happened when I was implementing it in
the brief mode. Maybe I've fixed it or I just learned to avoid it.
Marko
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]