[9fans] News doesn't get saved in acme Dump - Plan9

This is a discussion on [9fans] News doesn't get saved in acme Dump - Plan9 ; Is there a reason that acme doesn’t include a News pane when executing Dump? --Joel...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [9fans] News doesn't get saved in acme Dump

  1. [9fans] News doesn't get saved in acme Dump

    Is there a reason that acme doesn’t include a News pane when executing Dump?

    --Joel


  2. Re: [9fans] News doesn't get saved in acme Dump

    On 2/1/07, Joel Salomon wrote:
    > Is there a reason that acme doesn't include
    > a News pane when executing Dump?


    Probably News doesn't write an appropriate dump
    command to the acme ctl file.

    Russ

  3. Re: [9fans] News doesn't get saved in acme Dump

    > > Is there a reason that acme doesn't include
    > > a News pane when executing Dump?

    >
    > Probably News doesn't write an appropriate dump
    > command to the acme ctl file.


    How can I fake it?

    % cat acme.dump
    /usr/chesky
    /lib/font/bit/lucidasans/unicode.7.font
    /lib/font/bit/lucm/unicode.9.font
    0 33
    f 0 1 80 80 1
    1 34 80 1 1 /usr/chesky/ Del Snarf Get | Look
    e 1 0 0 0 1
    2 49 5 0 1 /usr/chesky/-hymie Del Snarf | Look Send Noscroll
    /usr/chesky
    win
    e 1 0 0 0 5
    3 49 0 0 0 /mail/fs/mbox/ Del Snarf | Look Put Mail Delmesg
    /acme/mail
    Mail -o /mail/box/chesky/outgoing mbox
    f 1 16 676 676 30
    16 39 839 0 0 /usr/chesky/acme.dump Del Snarf | Look
    %

    I’m guessing I need to replace the last two lines with something like:
    e x x x x x
    4 57 0 0 0 /mnt/news/digitalmars/D/ Del Snarf | Look Newpost More
    /acme/news
    News digitalmars.D
    —but what are the ‘x’ values? Looking through acme(4), I made a stab
    at guessing the second line (window ID, the number or characters in
    the tag as returned by wc, no chars in body (the way Mail reports it),
    not a directory, and not modified), but what about the line starting
    with ‘e’? Win uses “e 1 0 0 0 1”, Mail uses “e 1 0 0 0 5”; what are
    these numbers and where are they documented?

    Thanks,
    --Joel


  4. Re: [9fans] News doesn't get saved in acme Dump

    Don't fake it -- fix News. You have the source.

    Russ

  5. Re: [9fans] News doesn't get saved in acme Dump

    > Don't fake it -- fix News. You have the source.

    that's good advice for life, not just News. Too bad life doesn't
    come with source code.


  6. Re: [9fans] News doesn't get saved in acme Dump

    > Don't fake it -- fix News. You have the source.

    Right. So… when I try to implement the write-to-ctl in News, what is
    the meaning of the numbers sent? Reading through
    /acme/mail/src/mail.c and /acme/mail/src/win.c is somewhat less than
    edifying.

    --Joel

  7. Re: [9fans] News doesn't get saved in acme Dump

    > > Don't fake it -- fix News. You have the source.
    >
    > Right. So when I try to implement the write-to-ctl in News, what is
    > the meaning of the numbers sent? Reading through
    > /acme/mail/src/mail.c and /acme/mail/src/win.c is somewhat less than
    > edifying.


    /acme/mail/src/mail.c:
    winsetdump(wbox, "/acme/mail", cmd);

    /acme/mail/src/win.c:
    void
    winsetdump(Window *w, char *dir, char *cmd)
    {
    if(dir != nil)
    ctlprint(w->ctl, "dumpdir %s\n", dir);
    if(cmd != nil)
    ctlprint(w->ctl, "dump %s\n", cmd);
    }

    So if you open the ctl file and then do

    fprint(ctl, "dumpdir /news/window/title\n");
    fprint(ctl, "dump News whatever args you use\n");

    then you're done. There are no numbers to send.

    Russ

+ Reply to Thread