Learned a new bash trick. While writing a command on the CL, I can
enter a key shortcut:
Ctrl-x e
....which will put me in my default editor, which is allegedly
determined by my environmental variable, $EDITOR, where I can edit
said command at length. After editing said command line and exiting
my editor, the command will execute. OK, fine. It works as
advertised.
My question is, how does my bash shell know to go to emacs --which it
does, and jes happens to be my preferred editor-- if I have no $EDITOR
env var? I looked. I invoked echo $EDITOR and got a blank line. ???
Is there some other variable, determined by the distro, that defaults
to a specific editor? I'm running Slackware 13.37.
On 2012-08-10, J G Miller <mil...@yoyo.ORG> wrote:
> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:
>> "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
>> that order."
> It is a wonder that the vi afficianados have not gone to war
> over that! ;)
Nah--vi users, apparently unlike emacs users, know how to set the EDITOR environment variable. ;-)
--keith
-- kkeller-use...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt see X- headers for PGP signature information
On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:
> Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> wrote:
>>> It is a wonder that the vi afficianados have not gone to war
>>> over that! ;)
>> Nah--vi users, apparently unlike emacs users, know how to set the >> EDITOR environment variable. ;-)
> Wow- there hasn't been a good editor war or even a decent flamefest
> in many many years!
> Are you perhaps trying to start one?
Not intentionally! Just making a joke, which, at least to me, I thought
was obvious, since presumably anyone experienced enough to prefer emacs
over an editor like pico is experienced enough to be able to set
environment variables.
But perhaps I'm wrong. ;-)
--keith
-- kkeller-use...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt see X- headers for PGP signature information
Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> writes:
> On 2012-08-10, J G Miller <mil...@yoyo.ORG> wrote:
>> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:
>>> "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
>>> that order."
>> It is a wonder that the vi afficianados have not gone to war
>> over that! ;)
> Nah--vi users, apparently unlike emacs users, know how to set the > EDITOR environment variable. ;-)
An Emacs user that wanted to use this feature would be setting
$EDITOR to emacsclient.
notbob wrote:
> On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:
>> Are you perhaps trying to start one?
> Never one to be shy, allow me to cast the first stone:
> "vi ....the heart of evil!" --notbob
..but available on every *nix system I have ever had to edit a file on..
> nb
-- Ineptocracy
(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Stan Bischof wrote:
> Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> wrote:
>>> It is a wonder that the vi afficianados have not gone to war
>>> over that! ;)
>> Nah--vi users, apparently unlike emacs users, know how to set the
>> EDITOR environment variable. ;-)
> Wow- there hasn't been a good editor war or even a decent flamefest
> in many many years!
> Are you perhaps trying to start one?
> Stan
Emacs and vi can maybe called text-prozessors but both lack the editor-
ability. An Editor is small, easy and intuitiv to use.
I use emacs as my editor, and I do a lot of editing (scripts, web
pages, PostScript, Usenet, email, etc.). I always have emacs open,
and use emacsclient in alpine, slrn and firefox.
-- Chris F.A. Johnson, <http://cfajohnson.com>
Author:
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
> On 2012-08-10, Chris Davies <chris-use...@roaima.co.uk> wrote:
>> The default is emacs. For the rest of us there's the "set -o vi" option
>> that can be put in the .bashrc.
notbob <not...@nothome.com> wrote:
> As if I'd voluntarily impose such an affliction upon myself!
Clearly the simpler option is the default, leaving us experts to make
the change to suit.
On 2012-08-10, The Natural Philosopher <t...@invalid.invalid> wrote:
> notbob wrote:
>> On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:
>>> Are you perhaps trying to start one?
>> Never one to be shy, allow me to cast the first stone:
>> "vi ....the heart of evil!" --notbob
> ..but available on every *nix system I have ever had to edit a file on..
>> nb
And some versions of vi actually let you delete a character that
was in the file before you brought up the editor. It's a pain to
be stuck one of the versions of vi that doesn't allow it.
Emacs, a _REAL_ editor.
-- Robert Riches
spamtra...@jacob21819.net
(Yes, that is one of my email addresses.)
On 2012-08-11, Robert Riches <spamtra...@jacob21819.net> wrote:
> And some versions of vi actually let you delete a character that
> was in the file before you brought up the editor. It's a pain to
> be stuck one of the versions of vi that doesn't allow it.
You mean it's a one mode vi? Never heard of such a thing.
That's my entire case against vi(x). Ya gotta change modes to edit.
What genius came up with that stroke of insanity? Jay-sus, a half
century old Underwood doesn't even require that. Sure, I can use vi
if necessary, but why would I want to.
> Emacs, a _REAL_ editor.
I'll be the first to admit, it can be a _REAL_ pain! But, at least ya
don't hafta change modes to edit. Plus, it's a great file mgr. That,
IMO, is what makes emacs so great. I always start emacs in dired /.
You can do anything from there.
nb
-- "Do you recognize me?
No! ...cuz I don't fsckin' work here" Support labelling GMO foods http://www.nongmoproject.org/
> On 2012-08-11, Robert Riches <spamtra...@jacob21819.net> wrote:
>> And some versions of vi actually let you delete a character that
>> was in the file before you brought up the editor. It's a pain to
>> be stuck one of the versions of vi that doesn't allow it.
> You mean it's a one mode vi? Never heard of such a thing.
> That's my entire case against vi(x). Ya gotta change modes to edit.
> What genius came up with that stroke of insanity? Jay-sus, a half
> century old Underwood doesn't even require that. Sure, I can use vi
> if necessary, but why would I want to.
>> Emacs, a _REAL_ editor.
> I'll be the first to admit, it can be a _REAL_ pain! But, at least ya
> don't hafta change modes to edit. Plus, it's a great file mgr. That,
> IMO, is what makes emacs so great. I always start emacs in dired /.
> You can do anything from there.
Ahh, it's been a long time since I last witnessed the editor wars... :p
Just for the record, I have used vi in the past on proprietary UNIX - Sperry OS/3, to be precise - and I have both vim and emacs installed here on my GNU/Linux system. Both are very powerful editors - and perhaps too powerful for my own needs - but personally, I prefer emacs as well. ;-)
-- = Aragorn =
(registered GNU/Linux user #223157)
In comp.os.linux.misc, J G Miller <mil...@yoyo.ORG> wrote:
> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:
> > "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
> > that order."
> It is a wonder that the vi afficianados have not gone to war
> over that! ;)
Simple, don't use bash. In AT&T ksh the default editor for history is
(wait for it):