• Re: VI* on VMS

    From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Fri Oct 18 06:57:06 2024
    On 10/17/2024 11:17 PM, Lawrence D'Oliveiro wrote:
    On Thu, 17 Oct 2024 21:06:56 -0400, Arne Vajhøj wrote:
    No guarantee that emacs is installed on a Linux system.

    It’s in the standard repos for all the common distros.

    It exist yes.

    And for ones own system then no problem installing it.
    But if one is working on somebody elses system, then
    it may be more complicated.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Oct 18 12:09:23 2024
    On 2024-10-17, Arne Vajh°j <arne@vajhoej.dk> wrote:
    On 10/17/2024 8:53 AM, Arne Vajh°j wrote:
    On 10/17/2024 8:37 AM, Simon Clubley wrote:
    What is wrong with eve/tpu? or even LSE?

    However, when it comes to emacs, it does a _lot_ that EVE does not do.
    For one simple but very important example, you have brace matching in
    emacs so you can easily check the closing brace matches the correct
    opening brace.

    EVE does not have that out of the box.

    But then EVE has relative little out of the box.

    You can add it.

    Either DIY or grab a copy of Kenneth Faitfield's
    EVE_MATCH_DELIMITORS.

    I am afraid there are no online archive of INFO-TPU, but
    the most valuable pieces will have survived somewhere
    (I got the above).

    Here it is.


    [snip]

    How is this run ? Do you have to manually press a key to do the matching
    or does the routine get called automatically as you type (as in emacs) ?

    I also don't see what happens if the opening brace is off the top of the screen. For emacs, it shows the matching source code in the status line
    at the bottom of the screen in this case.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Oct 18 08:48:04 2024
    On 10/18/2024 8:09 AM, Simon Clubley wrote:
    On 2024-10-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 10/17/2024 8:53 AM, Arne Vajhøj wrote:
    On 10/17/2024 8:37 AM, Simon Clubley wrote:
    What is wrong with eve/tpu? or even LSE?

    However, when it comes to emacs, it does a _lot_ that EVE does not do. >>>> For one simple but very important example, you have brace matching in
    emacs so you can easily check the closing brace matches the correct
    opening brace.

    EVE does not have that out of the box.

    But then EVE has relative little out of the box.

    You can add it.

    Either DIY or grab a copy of Kenneth Faitfield's
    EVE_MATCH_DELIMITORS.

    I am afraid there are no online archive of INFO-TPU, but
    the most valuable pieces will have survived somewhere
    (I got the above).

    Here it is.

    [snip]

    How is this run ? Do you have to manually press a key to do the matching
    or does the routine get called automatically as you type (as in emacs) ?

    As is it is just a command. You can bind that command to a key of
    your choice.

    Doing it automatically is an interesting question. I don't know how, but
    maybe there is a way in TPU - an "on something changed event". I don't
    think anyone wanted to do that back then (late 80's early 90's), but
    with todays CPU's then why not.

    I also don't see what happens if the opening brace is off the top of the screen. For emacs, it shows the matching source code in the status line
    at the bottom of the screen in this case.

    It definitely does not use status line. It just highlights and when
    you scroll down you can see it as highlighted. That would
    obviously not work with the automatic process you envision above
    and VT where scrolling change current position.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Fri Oct 18 09:26:11 2024
    On 10/18/2024 8:48 AM, Arne Vajhøj wrote:
    On 10/18/2024 8:09 AM, Simon Clubley wrote:
    On 2024-10-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 10/17/2024 8:53 AM, Arne Vajhøj wrote:
    On 10/17/2024 8:37 AM, Simon Clubley wrote:
    For one simple but very important example, you have brace matching in >>>>> emacs so you can easily check the closing brace matches the correct
    opening brace.

    EVE does not have that out of the box.

    But then EVE has relative little out of the box.

    You can add it.

    Either DIY or grab a copy of Kenneth Faitfield's
    EVE_MATCH_DELIMITORS.

    I am afraid there are no online archive of INFO-TPU, but
    the most valuable pieces will have survived somewhere
    (I got the above).

    Here it is.

    [snip]

    How is this run ? Do you have to manually press a key to do the matching
    or does the routine get called automatically as you type (as in emacs) ?

    As is it is just a command. You can bind that command to a key of
    your choice.

    Doing it automatically is an interesting question. I don't know how, but maybe there is a way in TPU - an "on something changed event". I don't
    think anyone wanted to do that back then (late 80's early 90's), but
    with todays CPU's then why not.

    I took a look at the TPU manual. It does not look like there
    is anything smart for this.

    It would of course be possible to do a callout in all
    procedures that change current position. But that is a very
    intrusive solution.

    Seems like CTRL/whatever is the best practical.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Fri Oct 18 13:47:18 2024
    On 10/18/2024 9:26 AM, Arne Vajhøj wrote:
    On 10/18/2024 8:48 AM, Arne Vajhøj wrote:
    On 10/18/2024 8:09 AM, Simon Clubley wrote:
    On 2024-10-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 10/17/2024 8:53 AM, Arne Vajhøj wrote:
    On 10/17/2024 8:37 AM, Simon Clubley wrote:
    For one simple but very important example, you have brace matching in >>>>>> emacs so you can easily check the closing brace matches the correct >>>>>> opening brace.

    EVE does not have that out of the box.

    But then EVE has relative little out of the box.

    You can add it.

    Either DIY or grab a copy of Kenneth Faitfield's
    EVE_MATCH_DELIMITORS.

    I am afraid there are no online archive of INFO-TPU, but
    the most valuable pieces will have survived somewhere
    (I got the above).

    Here it is.

    [snip]

    How is this run ? Do you have to manually press a key to do the matching >>> or does the routine get called automatically as you type (as in emacs) ?

    As is it is just a command. You can bind that command to a key of
    your choice.

    Doing it automatically is an interesting question. I don't know how, but
    maybe there is a way in TPU - an "on something changed event". I don't
    think anyone wanted to do that back then (late 80's early 90's), but
    with todays CPU's then why not.

    I took a look at the TPU manual. It does not look like there
    is anything smart for this.

    It would of course be possible to do a callout in all
    procedures that change current position. But that is a very
    intrusive solution.

    Seems like CTRL/whatever is the best practical.

    Nothing in the TPU manual, but something in the TPU$ manual.

    This is not pretty, but it seems to work.

    procedure eve_auto_match()
    if (current_character = "{") or
    (current_character = "(") or
    (current_character = ")") or
    (current_character = "}") then
    eve_match_delimitors();
    endif
    endprocedure;

    #include <stdio.h>
    #include <stdint.h>

    #include <descrip.h>
    #include <tpudef.h>
    #include <starlet.h>
    #include <lib$routines.h>
    #include <tpu$routines.h>

    static const uint32_t MATCH_DELIM_ACTION = 1;

    static void setup_timer();

    static void do_match()
    {
    tpu$trigger_async_action(&MATCH_DELIM_ACTION);
    setup_timer();
    }

    static void setup_timer()
    {
    uint64_t tmo = 1000000; // 0.1 second
    sys$setimr(0, &tmo, do_match, 0, 0);
    }

    static uint32_t cmd_handler()
    {
    char cmdlin[1024];
    uint16_t cmdlin_len;
    $DESCRIPTOR(cmdlin_desc, cmdlin);
    uint32_t fileio_desc[2] = { (uint32_t)&tpu$fileio, 0 };
    lib$get_foreign(&cmdlin_desc, 0, &cmdlin_len);
    cmdlin_desc.dsc$w_length = cmdlin_len;
    return tpu$cliparse(&cmdlin_desc, fileio_desc, NULL);
    }

    int main(int argc, char *argv[])
    {
    lib$establish(tpu$handler);
    uint32_t cmd_handler_desc[2] = { (uint32_t)&cmd_handler, 0 };
    tpu$initialize(cmd_handler_desc, 0);
    tpu$execute_inifile();
    $DESCRIPTOR(matchdelim_desc, "EVE_AUTO_MATCH()");
    tpu$specify_async_action(&MATCH_DELIM_ACTION, &matchdelim_desc);
    setup_timer();
    tpu$control();
    uint32_t flags = TPU$M_DELETE_CONTEXT;
    tpu$cleanup(&flags);
    return 0;
    }

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Fri Oct 18 21:05:40 2024
    On Fri, 18 Oct 2024 06:57:06 -0400, Arne Vajhøj wrote:

    But if one is working on somebody elses system, then it may be more complicated.

    If I am expected to be primarily responsible for a customer’s servers,
    then I expect to be given reasonably free rein to set them up as I see
    fit.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Fri Oct 18 20:42:59 2024
    On 10/18/2024 1:47 PM, Arne Vajhøj wrote:
    On 10/18/2024 9:26 AM, Arne Vajhøj wrote:
    On 10/18/2024 8:48 AM, Arne Vajhøj wrote:
    Doing it automatically is an interesting question. I don't know how, but >>> maybe there is a way in TPU - an "on something changed event". I don't
    think anyone wanted to do that back then (late 80's early 90's), but
    with todays CPU's then why not.

    I took a look at the TPU manual. It does not look like there
    is anything smart for this.

    Nothing in the TPU manual, but something in the TPU$ manual.

    This is not pretty, but it seems to work.

    Code updated to fix a few issues (not supporting
    empty file, having to explicit specify "tpu" as
    argument).

    procedure eve_auto_match()
    if mark (NONE) <> end_of(current_buffer) then
    if (current_character = "{") or
    (current_character = "(") or
    (current_character = ")") or
    (current_character = "}") then
    eve_match_delimitors();
    endif;
    endif;
    endprocedure;

    #include <stdio.h>
    #include <string.h>
    #include <stdint.h>

    #include <descrip.h>
    #include <tpudef.h>
    #include <starlet.h>
    #include <lib$routines.h>
    #include <tpu$routines.h>

    static const uint32_t MATCH_DELIM_ACTION = 1;

    static void setup_timer();

    static void do_match()
    {
    tpu$trigger_async_action(&MATCH_DELIM_ACTION);
    setup_timer();
    }

    static void setup_timer()
    {
    uint64_t tmo = 1000000; // 0.1 second
    sys$setimr(0, &tmo, do_match, 0, 0);
    }

    static uint32_t cmd_handler()
    {
    char cmdlin[1024];
    $DESCRIPTOR(cmdlin_desc, cmdlin);
    uint16_t cmdlin_len;
    uint32_t fileio_desc[2] = { (uint32_t)&tpu$fileio, 0 };
    strcpy(cmdlin, "tpu ");
    cmdlin_desc.dsc$a_pointer += 4;
    cmdlin_desc.dsc$w_length -= 4;
    lib$get_foreign(&cmdlin_desc, 0, &cmdlin_len);
    cmdlin_desc.dsc$a_pointer -= 4;
    cmdlin_desc.dsc$w_length = 4 + cmdlin_len;
    return tpu$cliparse(&cmdlin_desc, fileio_desc, NULL);
    }

    int main(int argc, char *argv[])
    {
    $DESCRIPTOR(matchdelim_desc, "EVE_AUTO_MATCH()");
    uint32_t cmd_handler_desc[2] = { (uint32_t)&cmd_handler, 0 };
    uint32_t flags = TPU$M_DELETE_CONTEXT;
    lib$establish(tpu$handler);
    tpu$initialize(cmd_handler_desc, 0);
    tpu$execute_inifile();
    tpu$specify_async_action(&MATCH_DELIM_ACTION, &matchdelim_desc);
    setup_timer();
    tpu$control();
    tpu$cleanup(&flags);
    return 0;
    }

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Froble@21:1/5 to Lawrence D'Oliveiro on Fri Oct 18 22:18:44 2024
    On 10/18/2024 5:05 PM, Lawrence D'Oliveiro wrote:
    On Fri, 18 Oct 2024 06:57:06 -0400, Arne Vajhøj wrote:

    But if one is working on somebody elses system, then it may be more
    complicated.

    If I am expected to be primarily responsible for a customer’s servers,
    then I expect to be given reasonably free rein to set them up as I see
    fit.


    That was always my attitude.

    --
    David Froble Tel: 724-529-0450
    Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
    DFE Ultralights, Inc.
    170 Grimplin Road
    Vanderbilt, PA 15486

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)