From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/9484 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.gnus.user Subject: Changing ispell dictionary Date: Fri, 10 Aug 2007 16:51:44 +0200 Message-ID: <87mywzqw73.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186766190 8454 80.91.229.12 (10 Aug 2007 17:16:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2007 17:16:30 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri Aug 10 19:16:28 2007 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IJY66-0005qw-D4 for gegu-info-gnus-english@m.gmane.org; Fri, 10 Aug 2007 19:16:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJY65-0004q1-Md for gegu-info-gnus-english@m.gmane.org; Fri, 10 Aug 2007 13:16:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 34 Original-NNTP-Posting-Host: 84.134.111.8 Original-X-Trace: quimby.gnus.org 1186757354 9709 84.134.111.8 (10 Aug 2007 14:49:14 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 10 Aug 2007 14:49:14 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:qBaxCtMTbKQ6UPFThG5h1RaUO78= Original-Xref: shelby.stanford.edu gnu.emacs.gnus:79672 X-Mailman-Approved-At: Fri, 10 Aug 2007 13:15:21 -0400 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:9484 Archived-At: Hi, I am looking for an efficient way to change the ispell dictionary based on the newsgroup or mail recipients I'm posting/mailing to. The Manual says in section 5.4, "Mail and Post": ,---- | If you want to change the `ispell' dictionary based on what group | you're in, you could say something like the following: | | (add-hook 'gnus-select-group-hook | (lambda () | (cond | ((string-match | "^de\\." (gnus-group-real-name gnus-newsgroup-name)) | (ispell-change-dictionary "deutsch")) | (t | (ispell-change-dictionary "english"))))) `---- This does not work, unfortunately. It will only change the dictionary _local_ in the summary buffer, but not in the buffer for the message I am going to compose. Right now I work around this by using (ispell-change-dictionary "deutsch" 1) to change the global dictionary instead, but I find this suboptimal. Does somebody have a bright idea how to automatically change the local dictionary in the message buffer (assuming that a newsgroup or mail recipient is known; of course it cannot be guessed if I just type C-x m outside of Gnus)? There are various *message-*hook variables and I don't know which to choose. Cheers, Sven