emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Update ispell-dictionary to text language
Date: Sun, 21 Feb 2010 09:25:48 +0100	[thread overview]
Message-ID: <53834A76-97B8-4F21-95C6-6754E410CD02@gmail.com> (raw)
In-Reply-To: <87d41gkhjb.fsf@mundaneum.com>

Hi everyone,

in the end I decided to not do this change.  I am uncomfortable to  
link these different areas in Emacs in a way that is fixed.

Maybe you want to post your code in org-hacks.php on Worg.... ?

- Carsten

On Jan 11, 2010, at 12:27 PM, Sébastien Vauban wrote:

> Hello,
>
> Here my proposal (and my very first self-written chunk of ELisp  
> code) for
> switching to the right language for ispell, upon reading the  
> contents of the
> meta-tag `LANGUAGE'.
>
> --8<---------------cut here---------------start------------->8---
>  (defun org-switch-language ()
>    "Switch language for Org file, if a `#+LANGUAGE:' meta-tag is on  
> top 14 lines."
>    (save-excursion
>      (goto-line 15)
>      (if (re-search-backward "#\\+LANGUAGE: +\\([A-Za-z_]*\\)" 1 t)
>          (ispell-change-dictionary (match-string 1)))))
> --8<---------------cut here---------------end--------------->8---
>
> That should be hooked, such in:
>
> --8<---------------cut here---------------start------------->8---
>  (add-hook 'org-mode-hook
>            (lambda ()
>              ;; file modification date
>              (set (make-local-variable 'time-stamp-format) "%:y-%02m- 
> %02d")
>              (set (make-local-variable 'time-stamp-start) "^#\\ 
> +DATE: +")
>              (set (make-local-variable 'time-stamp-end) "$")
>
>              ;; guess language
>              (org-switch-language)
>
>              ;; flyspell mode to spell check everywhere
>              (flyspell-mode 1)))
> --8<---------------cut here---------------end--------------->8---
>
> Maybe that could become a default in Org. I think that makes sense.
>
> Comments are (more than) welcome...
>
> Best regards,
>  Seb
>
> -- 
> Sébastien Vauban
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

      parent reply	other threads:[~2010-02-21  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 11:27 Update ispell-dictionary to text language Sébastien Vauban
2010-01-11 15:31 ` Benjamin Andresen
2010-01-13 10:20   ` Sébastien Vauban
2010-01-15  7:14     ` Carsten Dominik
2010-01-15  8:55       ` Sébastien Vauban
2010-01-15 10:22         ` Torsten Wagner
2010-02-21  8:25 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53834A76-97B8-4F21-95C6-6754E410CD02@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).