Re: Where is my editor?
Thus said Ken Hornstein on Fri, 19 Jan 2024 16:45:18 -0500: > Like many threads involving ancient greybeards, it kind of devolved > into a discussion about the "true" vi and how vim wasn't vi enough It wouldn't be a good devolution if it didn't involve vi vs emacs or another editor! > And the consensus of everyone was prompter was fine as a default. lso, > Andy, you later said in that thread: > > Sounds like I might have to add something to my profile now after > this change is made to avoid prompter. Now that you quote it, I definitely remember saying it. And as I most recently hinted, I still don't have EDITOR/VISUAL set; I've now set the editor in the mh profile. > But to be fair, we did have a reasonable discussion about this change > (that it seems we all forgot about). Yes, indeed we did. Thanks for reminding me. It's amazing that it only took 6 years for me to finally get impacted by the results of the discussion! Watch out debian, if you think you have stable releases that live on forever, watch out for nmh as a contender. Andy
Re: Where is my editor?
>Thus said Robert Elz on Fri, 19 Jan 2024 12:30:08 +0700: > >> That's "prompter" - has always been mh's default. > >Not always: > >https://git.savannah.nongnu.org/cgit/nmh.git/log/sbr/geteditor.c?h=1.8-release > >Looks like it was changed in 1.8 (if I read that correctly). > >I wasn't aware of "prompter" before, thanks for the education. I was curious and went back and looked. This was apparantly prompted (pun intended) by Fedora packaging and was discussed in this email thread, which, oddly enough Andy, you DID participate in: https://lists.nongnu.org/archive/html/nmh-workers/2018-03/msg5.html Like many threads involving ancient greybeards, it kind of devolved into a discussion about the "true" vi and how vim wasn't vi enough, but I guess part of this change is my fault since I went back and dug around to find out the original behavior of MH, which was to use "prompter" (the details are a little more complicated): https://lists.nongnu.org/archive/html/nmh-workers/2018-03/msg00037.html And the consensus of everyone was prompter was fine as a default. Also, Andy, you later said in that thread: Under what conditions will this change? I have neither EDITOR/VISUAL nor profile settings for editor, but maybe that won't matter because my usage patterns will never invoke prompter? Right now, when I run comp from the command line, I get a vi editor with with components in it. Is this where prompter comes in? Sounds like I might have to add something to my profile now after this change is made to avoid prompter. David replied to you and said: Yes, it does. Add this to your profile to preserve your current behavior: Editor: vi I'm not dragging you because it was almost 6 years ago and I forgot until now that I made that change, much less everything behind it. But to be fair, we did have a reasonable discussion about this change (that it seems we all forgot about). --Ken
Re: Where is my editor?
Sorry for the off-topic reply, but the mention of OpenBSD took me back. I probably have a dozen OpenBSD shirts. (I doubt I can fit in them anymore LOL!) I have a pile of CDs of OpenBSD and FreeBSD releases. When I started my last job in 2000, the first thing I did was fix the company email server. I ran FreeBSD with Postfix on a Compaq rack mount server. (So much easier than sendmail.cf!) I had an uptime of over three years at one point. Boy are those days gone. I just received a copy of Kernighan's Unix A History and a Memoir. While I knew most of the stories already, it was fun to see some pictures I hadn't seen before, and reading it took me back to those heady Doctor Dobb's and Microcornucopia days of my computer career youth... From: nmh-workers-bounces+doug=dougwellington@nongnu.org on behalf of Andy Bradford Sent: Friday, January 19, 2024 7:28 AM To: Robert Elz Cc: nmh-workers@nongnu.org Subject: Re: Where is my editor? Thus said Robert Elz on Fri, 19 Jan 2024 15:10:26 +0700: > Yes, I have had the "editor" line in my profile since MH days, (I have > been a user since almost forever) so what nmh did as default I never > knew, which is why I avoided saying that... >From looking at the past sources it used to use a C macro defined in h/nmh.h: #define DEFAULT_EDITOR "vi" I'm curious now how many installations of nmh do not have vi available... that being said, I do know Linux based OS developers make a lot of strange decisions about what is in the "base" OS, so it's entirely possible that vi may not exist in some flavors of Linux. How many non-POSIX systems is nmh running on? > I hope it is back working like you expected it now. It is now, thanks. I was able to figure out that EOT was what ended my experience with prompter and changed the default editor in .mh_profile and then I could just use "edit vi" at the "What now?" prompt. That's how I composed my original email starting this thread. It wasn't completely foreign (being a long-time Unix user I assumed it was just reading stdin and EOT would end it), just unexpected. I suppose I could set EDITOR but I've never had to on OpenBSD. Andy
Re: Where is my editor?
Hi Andy, > I suppose I could set EDITOR but I've never had to on OpenBSD. POSIX says EDITOR used by more(1) and crontab(1) defaults to vi if not set. But for mailx(1), the default is unspecified unless it's an XSI system when it's ed. mailx's default for VISUAL is vi, XSI or not. That's based on the section-1p man pages here. -- Cheers, Ralph.
Re: Where is my editor?
Thus said Robert Elz on Fri, 19 Jan 2024 15:10:26 +0700: > Yes, I have had the "editor" line in my profile since MH days, (I have > been a user since almost forever) so what nmh did as default I never > knew, which is why I avoided saying that... >From looking at the past sources it used to use a C macro defined in h/nmh.h: #define DEFAULT_EDITOR "vi" I'm curious now how many installations of nmh do not have vi available... that being said, I do know Linux based OS developers make a lot of strange decisions about what is in the "base" OS, so it's entirely possible that vi may not exist in some flavors of Linux. How many non-POSIX systems is nmh running on? > I hope it is back working like you expected it now. It is now, thanks. I was able to figure out that EOT was what ended my experience with prompter and changed the default editor in .mh_profile and then I could just use "edit vi" at the "What now?" prompt. That's how I composed my original email starting this thread. It wasn't completely foreign (being a long-time Unix user I assumed it was just reading stdin and EOT would end it), just unexpected. I suppose I could set EDITOR but I've never had to on OpenBSD. Andy
Re: Where is my editor?
Le 2024-01-19 à 09:10, Robert Elz a écrit : Date:18 Jan 2024 23:20:11 -0700 From:"Andy Bradford" Message-ID: <20240118232011.1679.qm...@angmar.bradfordfamily.org> | Ahh, I didn't read the fine print... you said "mh's default", but I | misunderstood it for "nmh's default". Yes, I have had the "editor" line in my profile since MH days, (I have been a user since almost forever) so what nmh did as default I never knew, which is why I avoided saying that... I assume the change you indicated happened is to avoid building a choice of default editors into nmh - prompter is part of the MH world, so always exists, even though ex/vi is POSIX std, there really is no guarantee it will exist on every system in the world (even less for emacs/jove/nano/vim/...) and having "ed" as the default would simply irritate people. Unfortunately, even ed is not on every system, eg. Debian by default has vi/ex but not ed. -- Thomas
Re: Where is my editor?
Date:18 Jan 2024 23:20:11 -0700 From:"Andy Bradford" Message-ID: <20240118232011.1679.qm...@angmar.bradfordfamily.org> | Ahh, I didn't read the fine print... you said "mh's default", but I | misunderstood it for "nmh's default". Yes, I have had the "editor" line in my profile since MH days, (I have been a user since almost forever) so what nmh did as default I never knew, which is why I avoided saying that... I assume the change you indicated happened is to avoid building a choice of default editors into nmh - prompter is part of the MH world, so always exists, even though ex/vi is POSIX std, there really is no guarantee it will exist on every system in the world (even less for emacs/jove/nano/vim/...) and having "ed" as the default would simply irritate people. I hope it is back working like you expected it now. Another profile entry worth having is prompter-next: vi (or perhaps even ed, or horrors, emacs) There are odd occasions where starting with prompter can be easier that a real editor, then you just end the prompter session (send EOF), and when it asks "What now?" you just "e" and then you get your real editor (prompter-next) to finish. comp -editor prompter will do that once you have the "editor" profile entry and so prompter is no longer the default. kre
Re: Where is my editor?
Thus said "Andy Bradford" on 18 Jan 2024 23:05:09 -0700: > Thus said Robert Elz on Fri, 19 Jan 2024 12:30:08 +0700: > > > That's "prompter" - has always been mh's default. Ahh, I didn't read the fine print... you said "mh's default", but I misunderstood it for "nmh's default". So it's a change to align with mh default behavior, and of course since I've never used mh I wouldn't know. Andy
Re: Where is my editor?
Thus said Robert Elz on Fri, 19 Jan 2024 12:30:08 +0700: > That's "prompter" - has always been mh's default. Not always: https://git.savannah.nongnu.org/cgit/nmh.git/log/sbr/geteditor.c?h=1.8-release Looks like it was changed in 1.8 (if I read that correctly). I wasn't aware of "prompter" before, thanks for the education. Andy
Re: Where is my editor?
Thus said Robert Elz on Fri, 19 Jan 2024 12:30:08 +0700: > That's "prompter" - has always been mh's default. Well, I'm confused. If it was always the default, why am I only now seeing it after upgrading to 1.8? I haven't changed anything in my .mh_profile in years: $ ls -l ~/.mh_profile -rw-r--r-- 1 amb amb 788 Aug 16 2019 /home/amb/.mh_profile I'll update ~/.mh_profile with your suggestion for editor, but I'm confused how it ever worked with my editor. I've been using nmh for years now and never had any dealings with "prompter". Thanks, Andy
Re: Where is my editor?
Date:18 Jan 2024 21:19:39 -0700 From:"Andy Bradford" Message-ID: <20240118211939.36652.qm...@angmar.bradfordfamily.org> | type this email I typed comp, and then it entered some kind of | interactive dialog asking me for the To header, the Subject, and other | headers, That's "prompter" - has always been mh's default. | What can I do to get the original behavior back? put editor: vi in your .mh_profile kre
Where is my editor?
Hello, After upgrading to 1.8 running commands like comp, repl, etc, no longer bring up my editor (vi) with the data already filled in. For example, to type this email I typed comp, and then it entered some kind of interactive dialog asking me for the To header, the Subject, and other headers, then it printed and then let me start typing a message. None of this is what it used to be. I used to type comp and immediately vi would open with all of the headers and other details from my components in there. Similarly, I used to type repl (followed by my favorite arguments) and it would populate my editor with a bunch of details that I could edit, but now I have some strange interactive thing. What can I do to get the original behavior back? Thanks, Andy