From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Update ispell-dictionary to text language Date: Sun, 21 Feb 2010 09:25:48 +0100 Message-ID: <53834A76-97B8-4F21-95C6-6754E410CD02@gmail.com> References: <87d41gkhjb.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nj78T-0005PQ-UT for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 03:25:53 -0500 Received: from [140.186.70.92] (port=45743 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nj78S-0005Ox-0i for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 03:25:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nj78R-0000ay-Ac for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 03:25:52 -0500 Received: from mail-ew0-f213.google.com ([209.85.219.213]:42630) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nj78R-0000as-69 for emacs-orgmode@gnu.org; Sun, 21 Feb 2010 03:25:51 -0500 Received: by ewy5 with SMTP id 5so1798239ewy.32 for ; Sun, 21 Feb 2010 00:25:50 -0800 (PST) In-Reply-To: <87d41gkhjb.fsf@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?S=E9bastien_Vauban?= Cc: emacs-orgmode@gnu.org Hi everyone, in the end I decided to not do this change. I am uncomfortable to =20 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=E9bastien Vauban wrote: > Hello, > > Here my proposal (and my very first self-written chunk of ELisp =20 > code) for > switching to the right language for ispell, upon reading the =20 > 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 =20= > 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-=20= > %02d") > (set (make-local-variable 'time-stamp-start) "^#\\=20 > +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 > > --=20 > S=E9bastien 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