- Subject: Re: Question about mailedit.sl docs
- From: Marc Haber <mh+jed-users@xxxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 10:13:15 +0200
On Sat, Jul 29, 2006 at 12:55:10PM +0000, Jörg Sommer wrote:
> Marc Haber <mh+jed-users-l@xxxxxxxxxxxx> wrote:
> > Hi,
> >
> > I am using jed 0.99.18 on Debian sid[1], which includes a library of
> > extensions. I do not know whether this mailing list is appropriate for
> > questions. If it is not, please point me to the right list.
> >
> > I am trying to use mailedit.sl which is placed into
> > /usr/share/jed/lib/mailedit.sl by the Debian packages.
>
> This is the upstream version.
No offense intended. I just was not aware where the original code
places that file and thus wanted to avoid confusion.
> > I'd like to use this function to define key sequences like "^Cs" to
> > jump to certain headers, like the Subject, for example. I do not have
> > any idea how to accomplish this.
>
> Create your own goto_header function in your jed.rc.
>
> define my_goto_header(header)
> {
> variable mark = create_user_mark();
> bob();
> !if ( bol_fsearch("\n") )
> {
> goto_user_mark(mark);
> throw UsageError, "No headers found in this buffer";
> }
> !if ( bol_bsearch(header+":") )
> {
> goto_user_mark(mark);
> throw UsageError, "Header not found";
> }
> }
>
> and then define your keys:
>
> definekey_reserved("my_goto_header(\"Subject\")", "s", "mailedit");
> definekey_reserved("my_goto_header(\"From\")", "f", "mailedit");
> definekey_reserved("my_goto_header(\"Expires\")", "e", "mailedit");
With that, I get "Unknown keymap: mailedit" on startup.
> > Using goto_header in a setkey statement in my keybindings_hook does not
> > seem to work as well as defining my own function (define
> > mail_edit_subject() { goto_header("Subject"); }) in ~/.jed/jed.rc. I
> > suspect this is because mailedit definies goto_header as private.
>
> Yes, you are right. You cannot access a private function outside of the
> file it was defined in.
I see. Why was goto_header defined in the first place if it is not
useable and not used?
> > Are there any docs how to make use of the mailedit mode?
>
> Unfortunately, no
A pity.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]