bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable


From: Francis Moreau
Subject: Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable
Date: Sat, 23 Aug 2008 11:42:43 +0200

On Sat, Aug 23, 2008 at 12:53 AM, Chet Ramey <address@hidden> wrote:
> Francis Moreau wrote:
>> hmm why not fixing the command instead ?
>
> It's not broken.

Well, if you consider the man page correct, the command is, isn't it ?

>> VISUAL can be used to visualize a  file, so can be set to 'less' for
>> example. It shouldn't be used if you wand to edit.
>
> That isn't the case.  In fact, it's exactly the opposite.
>
> The historic use of VISUAL was for the user to set it to his preferred
> `visual' (screen-oriented) editor (note the similarity to `vi') while
> leaving EDITOR set to, most often, `ed'.  It can be set to `less', but
> I'm not sure why you'd want to.
>
> These days there's no practical difference between the two.
>
> You might see what `man environ' on your system says.  A random Ubuntu
> system I have access to reflects the usage as I've described it.
>

Indeed thanks for the clarificaiton.

>> I think what is described in the man is fine. And I wanted to
>> customize FCEDIT to launch emacs in sh-mode, something I can't do with
>> current command setting.
>
> I'll consider it as an enhancement request for a future version.  You

Thanks

> can, of course, set `VISUAL' to a command that starts emacs in the
> desired mode.

VISUAL is used by so many others programs where emacs in sh-mode by
default is not the right thing to do.

I think I won't use VISUAL but start emacs in sh-mode if the file name
argument matches "*bash-fc-*" pattern. It should be safe.

Could you point out the source code where the command you showed is
located ?

thanks
-- 
Francis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]