|
|
Up |
|
|
  |
Author: Francis MoreauFrancis Moreau Date: Aug 14, 2008 00:53
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 ?
Thanks
--
Francis
|
| |
|
| | 7 Comments |
|
  |
Author: Sebastian KapsSebastian Kaps Date: Aug 14, 2008 01:28
// Francis Moreau writes:
> 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.
Put
,----
| # -*- mode:sh -*-
----
at the beginning of that file.
--
Ciao, Sebastian
|
| |
|
| | no comments |
|
  |
Author: XahXah Date: Aug 14, 2008 03:29
On Aug 14, 12:53 am, "Francis Moreau" gmail.com> 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.
If the file content's first line starts with “#!”, then you could use
the magic-mode-alist.
-----------------------------------
How Emacs Choose Modes
Emacs determines what mode to use primarily by 2 mechanisms, in order:
(1) Check the first line in the file, using “magic-mode-alist”. (2)
Check the file name's suffix, using “auto-mode-alist”.
The “magic-mode-alist” is a list that emacs use to match the first
line of a file with a mode. For example, if you want files that begin
with the line “ Show full article (2.26Kb) |
| no comments |
|
  |
Author: David CombsDavid Combs Date: Sep 10, 2008 18:35
>On Aug 14, 12:53 am, "Francis Moreau" gmail.com> 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.
>
>If the file content's first line starts with “#!”, then you could use
>the magic-mode-alist.
>
Xah -- question about the characters in your posts:
If I or someone sees eg a url in one of your posts, and
wants to go to that url (because you've suggested doing that,
maybe), it's a little difficult to just cut-n-paste your string,
what with all the extra control or whatever they are characters
mixed in.
|
| Show full article (2.86Kb) |
| no comments |
|
  |
Author: XahXah Date: Sep 11, 2008 15:58
David Combs wrote:
> Xah-- question about the characters in your posts:
>
> If I or someone sees eg a url in one of your posts, and
> wants to go to that url (because you've suggested doing that,
> maybe), it's a little difficult to just cut-n-paste your string,
> what with all the extra control or whatever they are characters
> mixed in.
>
> What is that stuff, why is it there, and is it really necessary
> for you to include it.
The summation sign “∑” in my sig is my and my website signet.
|
| Show full article (5.69Kb) |
| no comments |
|
  |
Author: Nikolaj SchumacherNikolaj Schumacher Date: Sep 15, 2008 09:28
> . Plain ascii, 100%% ready to be cut-n-pasted into a web-browser,
> with no edits needed.
I'm sorry. Which URL are you referring to? All the URLs I can see are
plain ASCII and can be copied without a problem.
regards,
Nikolaj Schumacher
|
| |
| no comments |
|
  |
Author: XahXah Date: Sep 15, 2008 12:09
On Sep 14, 3:35 pm, dkco...@ panix.com (David Combs) wrote:
>>David Combs wrote:
>>> Xah-- question about the characters in your posts:
>
>>> If I or someone sees eg a url in one of your posts, and
>>> wants to go to that url (because you've suggested doing that,
>>> maybe), it's a little difficult to just cut-n-paste your string,
>>> what with all the extra control or whatever they are characters
>>> mixed in.
>
>>> What is that stuff, why is it there, and is it really necessary
>>> for you to include it.
>
>>The summation sign “∑” in my sig is my and my website signet.
>
>>in the end of my sig, there's this character “☄” (unicode name
>>“comet”). It is there so that it forces groups.google.com and Apple ...
|
| Show full article (3.11Kb) |
| no comments |
|
  |
|
|
  |
Author: David CombsDavid Combs Date: Sep 22, 2008 13:17
Xah, thanks much for your explanations.
David
|
| |
| no comments |
|
|