[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to open a file in sh-mode
From: |
Francis Moreau |
Subject: |
Re: How to open a file in sh-mode |
Date: |
Thu, 14 Aug 2008 11:03:07 +0200 |
On Thu, Aug 14, 2008 at 10:16 AM, Henrik Austad <henrikau@stud.ntnu.no> wrote:
> On Thursday 14 August 2008 09:53:39 Francis Moreau wrote:
>> Hello,
>>
>> I'm trying to open a file with emacs automatically set on sh-mode.
>> The file name can't be used to guess that emacs should be in sh-mode
>> when opening it.
>>
>> So I tried:
>>
>> $ emacs -f sh-mode foo
>>
>> But that doesn't work.
>>
>> Could anybody give me some advices ?
>
> 1) which version of emacs are you using?
> 2) is it a valid-sh file? i.e. does it start with #!/bin/bash on the first
> line?
No, it's actually the file created by fc(1) to edit the bash history.
It uses the FCEDIT env variable to launch the editor it going to use.
So I'd like to set it to:
export FCEDIT="emacs -f sh-mode"
so that fc(1) uses emacs as editor in sh-mode directly.
Note that the name of the temporary file is *appended* to what you
specified in FCEDIT.
--
Francis
- Re: How to open a file in sh-mode, (continued)
- Re: How to open a file in sh-mode, Peter Dyballa, 2008/08/14
- Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
- Re: How to open a file in sh-mode, Lennart Borgman (gmail), 2008/08/14
- Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
- Re: How to open a file in sh-mode, Lennart Borgman (gmail), 2008/08/14
- Re: How to open a file in sh-mode, Peter Dyballa, 2008/08/14
- Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
Re: How to open a file in sh-mode, Henrik Austad, 2008/08/14
- Re: How to open a file in sh-mode,
Francis Moreau <=
- Re: How to open a file in sh-mode, Henrik Austad, 2008/08/14
- Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
- Re: How to open a file in sh-mode, David Hansen, 2008/08/14
- Re: How to open a file in sh-mode, Henrik Austad, 2008/08/14
- Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
- Re: How to open a file in sh-mode, Lennart Borgman (gmail), 2008/08/14
Message not availableRe: How to open a file in sh-mode, Giorgos Keramidas, 2008/08/14
Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14
Re: How to open a file in sh-mode, Giorgos Keramidas, 2008/08/14
Re: How to open a file in sh-mode, Francis Moreau, 2008/08/14