Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Unix and Linux reviews > Editors > Emacs > [flyspell] set dictionary via file variables




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [flyspell] set dictionary via file variables  
Petrik Galvosas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-02-06 12:12 PM

I like to select the dictionary for flyspell on a per file basis (I
frequently open different files using different languages and it is
tedious to always do "M-x ispell-change-dictionary RET
desired_local_dictionary RET"). So my first attempt was (in a LaTeX
File):

%%% Local Variables:
%%% mode: latex
%%% ispell-dictionary "german8"
%%% End:

This does not work but there is no error message either. Other flavors
like

%%% Local Variables:
%%% mode: latex
%%% ispell-dictionary: german8
%%% End:

do not work either.

Does anyone have a clue what can be done in this case?

Thanks in advance
Petrik






[ Post a follow-up to this message ]



    Re: [flyspell] set dictionary via file variables  
Reiner Steib


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-02-06 12:12 PM

On Mon, Oct 02 2006, Petrik Galvosas wrote:

> %%% Local Variables:
> %%% mode: latex
> %%% ispell-dictionary "german8"
> %%% End:
>
> This does not work but there is no error message either.

Try `ispell-local-dictionary'.  The correct syntax is with colon and
quotes (because it's a string value):

%%% ispell-local-dictionary: "german8"

Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





[ Post a follow-up to this message ]



    Re: [flyspell] set dictionary via file variables  
Petrik Galvosas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-02-06 06:13 PM

At Mon, 02 Oct 2006 12:32:49 +0200,
Reiner Steib wrote:
>
> Try `ispell-local-dictionary'.  The correct syntax is with colon and
> quotes (because it's a string value):
>
> %%% ispell-local-dictionary: "german8"

Thanks so much. It works, only one needs to switch one time to another
buffer. I.e. directly after loading the file the local dictionary is
still default ("english" in my case). However after visiting another
buffer and returning ispell switches to "german8". I can live with
that.

Petrik








[ Post a follow-up to this message ]



    Re: [flyspell] set dictionary via file variables  
Felix E. Klee


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-05-06 12:15 AM

At Mon, 02 Oct 2006 11:47:53 +0200,
Petrik Galvosas wrote:
> Does anyone have a clue what can be done in this case?

I set the local dictionary outside of the variables section - probably
explained somewhere in the flyspell documentation.  An example:

Local Variables:
mode:text
mode:flyspell
fill-column:79
End:
Local IspellDict: german8
LocalWords: Klee CreateNewMajorMode Esc wc

--
Felix E. Klee






[ Post a follow-up to this message ]



    Re: [flyspell] set dictionary via file variables  
Reiner Steib


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-05-06 12:15 AM

On Wed, Oct 04 2006, Felix E. Klee wrote:

> I set the local dictionary outside of the variables section - probably
> explained somewhere in the flyspell documentation.

I don't find anything related in the manual.

[...]
> End:
> Local IspellDict: german8

I didn't know about this.  The doc string of `ispell-local-dictionary'
says that "Local IspellDict:" has the same effect as my suggestion:

,----[ <f1> v ispell-local-dictionary RET ]
| ispell-local-dictionary is a variable defined in `ispell'.
| [...]
|
| Setting `ispell-local-dictionary' to a value has the same effect as
| calling M-x ispell-change-dictionary with that value.  This variable
| is automatically set when defined in the file with either
| `ispell-dictionary-keyword' or the Local Variable syntax.
`----

,----[ <f1> v ispell-dictionary-keyword RET ]
| ispell-dictionary-keyword is a variable defined in `ispell'.
| Its value is
| "Local IspellDict: "
|
| Documentation:
| The keyword for a local dictionary to use.
| The keyword must be followed by a valid dictionary name, defined in
| `ispell-local-dictionary-alist' or `ispell-dictionary-alist'.
| When multiple occurrences exist, the last keyword
| definition is used.
`----

Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:25 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

Back To The Top
Home | Usercp | Faq | Register