* Re: Can I turn on some minor mode on specific files?
[not found] <mailman.392.1369531227.22516.help-gnu-emacs@gnu.org>
@ 2013-05-26 1:34 ` Pascal J. Bourguignon
2013-05-26 3:39 ` Hongxu Chen
0 siblings, 1 reply; 11+ messages in thread
From: Pascal J. Bourguignon @ 2013-05-26 1:34 UTC (permalink / raw)
To: help-gnu-emacs
Hongxu Chen <leftcopy.chx@gmail.com> writes:
> Hi list,
>
> I sometimes do not need to spell check for all the text files, but
> only a few specific files on-line. So I would like the spell checker
> like flymake only turned on for these files. Is there a way to do so?
> I guess that the file-local variable might help, however I am not
> familiar with the `eval' syntax.
Just put: -*- mode:flyspell -*-
on the first or second line.
Alternatively, put:
Local Variables:
mode: flyspell
End:
within the last 512 bytes of the file.
If you want to activate it for a whole familly of files determined by
their path (eg. extension, name or directory component), you can use
auto-mode-alist.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You can take the lisper out of the lisp job, but you can't take the lisp out
of the lisper (; -- antifuchs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 1:34 ` Can I turn on some minor mode on specific files? Pascal J. Bourguignon
@ 2013-05-26 3:39 ` Hongxu Chen
2013-05-26 6:25 ` Bernardo
0 siblings, 1 reply; 11+ messages in thread
From: Hongxu Chen @ 2013-05-26 3:39 UTC (permalink / raw)
To: Pascal J. Bourguignon; +Cc: help-gnu-emacs
It works, thanks, Pascal.
Didn't realize that I could use `mode' that way. Seems that it specifies
the additional minor-mode, but it is not a variable(at least `C-h v'
cannot fetch it). So what is the mechanism?
Another question, is the local variable specified should be limited to
be within 512 bytes exactly? I haven't found the related docs yet.
"Pascal J. Bourguignon" <pjb@informatimago.com> writes:
> Hongxu Chen <leftcopy.chx@gmail.com> writes:
>
>> Hi list,
>>
>> I sometimes do not need to spell check for all the text files, but
>> only a few specific files on-line. So I would like the spell checker
>> like flymake only turned on for these files. Is there a way to do so?
>> I guess that the file-local variable might help, however I am not
>> familiar with the `eval' syntax.
>
> Just put: -*- mode:flyspell -*-
> on the first or second line.
>
>
> Alternatively, put:
>
> Local Variables:
> mode: flyspell
> End:
>
> within the last 512 bytes of the file.
>
>
>
> If you want to activate it for a whole familly of files determined by
> their path (eg. extension, name or directory component), you can use
> auto-mode-alist.
--
Regards,
Hongxu Chen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 3:39 ` Hongxu Chen
@ 2013-05-26 6:25 ` Bernardo
2013-05-26 12:33 ` Hongxu Chen
0 siblings, 1 reply; 11+ messages in thread
From: Bernardo @ 2013-05-26 6:25 UTC (permalink / raw)
To: help-gnu-emacs
>
> Another question, is the local variable specified should be limited to
> be within 512 bytes exactly? I haven't found the related docs yet.
M-: (info "(emacs)Specifying file variables")
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 6:25 ` Bernardo
@ 2013-05-26 12:33 ` Hongxu Chen
2013-05-26 12:59 ` Jambunathan K
2013-05-26 13:45 ` Pascal J. Bourguignon
0 siblings, 2 replies; 11+ messages in thread
From: Hongxu Chen @ 2013-05-26 12:33 UTC (permalink / raw)
To: bernardo.bacic; +Cc: help-gnu-emacs
But it complains:
Info-find-file: Info file emacs does not exist
I am runnning on Emacs 24.3.
Also, Pascal's advice is NOT correct since adding `mode' in the modeline
would change the major mode rather than minor modes, and the right way
is to append the following:
# Local Variables:
# eval: (flyspell-mode 1)
# End:
Bernardo <bernardo.bacic@pobox.com> writes:
>>
>> Another question, is the local variable specified should be limited to
>> be within 512 bytes exactly? I haven't found the related docs yet.
>
> M-: (info "(emacs)Specifying file variables")
>
>
--
Regards,
Hongxu Chen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 12:33 ` Hongxu Chen
@ 2013-05-26 12:59 ` Jambunathan K
2013-05-26 13:29 ` Hongxu Chen
2013-05-26 13:45 ` Pascal J. Bourguignon
1 sibling, 1 reply; 11+ messages in thread
From: Jambunathan K @ 2013-05-26 12:59 UTC (permalink / raw)
To: Hongxu Chen; +Cc: help-gnu-emacs
If you are on debian, try
sudo apt-get install emacs23-common-non-dfsg
Hongxu Chen <leftcopy.chx@gmail.com> writes:
> But it complains:
>
> Info-find-file: Info file emacs does not exist
>
> I am runnning on Emacs 24.3.
>
> Also, Pascal's advice is NOT correct since adding `mode' in the modeline
> would change the major mode rather than minor modes, and the right way
> is to append the following:
>
> # Local Variables:
> # eval: (flyspell-mode 1)
> # End:
>
> Bernardo <bernardo.bacic@pobox.com> writes:
>
>>>
>>> Another question, is the local variable specified should be limited to
>>> be within 512 bytes exactly? I haven't found the related docs yet.
>>
>> M-: (info "(emacs)Specifying file variables")
>>
>>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 12:59 ` Jambunathan K
@ 2013-05-26 13:29 ` Hongxu Chen
0 siblings, 0 replies; 11+ messages in thread
From: Hongxu Chen @ 2013-05-26 13:29 UTC (permalink / raw)
To: Jambunathan K; +Cc: help-gnu-emacs
Thanks, I can get the info page now:-)
Jambunathan K <kjambunathan@gmail.com> writes:
> If you are on debian, try
>
> sudo apt-get install emacs23-common-non-dfsg
>
>
>
> Hongxu Chen <leftcopy.chx@gmail.com> writes:
>
>> But it complains:
>>
>> Info-find-file: Info file emacs does not exist
>>
>> I am runnning on Emacs 24.3.
>>
>> Also, Pascal's advice is NOT correct since adding `mode' in the modeline
>> would change the major mode rather than minor modes, and the right way
>> is to append the following:
>>
>> # Local Variables:
>> # eval: (flyspell-mode 1)
>> # End:
>>
>> Bernardo <bernardo.bacic@pobox.com> writes:
>>
>>>>
>>>> Another question, is the local variable specified should be limited to
>>>> be within 512 bytes exactly? I haven't found the related docs yet.
>>>
>>> M-: (info "(emacs)Specifying file variables")
>>>
>>>
--
Regards,
Hongxu Chen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can I turn on some minor mode on specific files?
2013-05-26 12:33 ` Hongxu Chen
2013-05-26 12:59 ` Jambunathan K
@ 2013-05-26 13:45 ` Pascal J. Bourguignon
2013-05-26 14:20 ` Hongxu Chen
[not found] ` <mailman.411.1369578019.22516.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 11+ messages in thread
From: Pascal J. Bourguignon @ 2013-05-26 13:45 UTC (permalink / raw)
To: help-gnu-emacs
Hongxu Chen <leftcopy.chx@gmail.com> writes:
> But it complains:
>
> Info-find-file: Info file emacs does not exist
>
> I am runnning on Emacs 24.3.
>
> Also, Pascal's advice is NOT correct since adding `mode' in the modeline
> would change the major mode rather than minor modes, and the right way
> is to append the following:
You should of course put your major mode first, but you can add as many
minor modes you want:
-*- mode:text;mode:hs-minor;mode:flyspell -*-
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You can take the lisper out of the lisp job, but you can't take the lisp out
of the lisper (; -- antifuchs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Can I turn on some minor mode on specific files?
@ 2013-05-26 1:20 Hongxu Chen
0 siblings, 0 replies; 11+ messages in thread
From: Hongxu Chen @ 2013-05-26 1:20 UTC (permalink / raw)
To: help-gnu-emacs
Hi list,
I sometimes do not need to spell check for all the text files, but
only a few specific files on-line. So I would like the spell checker
like flymake only turned on for these files. Is there a way to do so?
I guess that the file-local variable might help, however I am not
familiar with the `eval' syntax.
Thanks in advance.
Regards,
Hongxu Chen
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-05-27 2:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.392.1369531227.22516.help-gnu-emacs@gnu.org>
2013-05-26 1:34 ` Can I turn on some minor mode on specific files? Pascal J. Bourguignon
2013-05-26 3:39 ` Hongxu Chen
2013-05-26 6:25 ` Bernardo
2013-05-26 12:33 ` Hongxu Chen
2013-05-26 12:59 ` Jambunathan K
2013-05-26 13:29 ` Hongxu Chen
2013-05-26 13:45 ` Pascal J. Bourguignon
2013-05-26 14:20 ` Hongxu Chen
[not found] ` <mailman.411.1369578019.22516.help-gnu-emacs@gnu.org>
2013-05-26 14:49 ` Pascal J. Bourguignon
2013-05-27 2:16 ` Hongxu Chen
2013-05-26 1:20 Hongxu Chen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.