From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#14957: 24.3.50; Flyspell language visible in mode line Date: Tue, 17 Sep 2013 18:47:50 +0200 Message-ID: <87wqmfz96x.fsf@web.de> References: <86y58teatq.fsf@missioncriticalit.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379436560 21177 80.91.229.3 (17 Sep 2013 16:49:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2013 16:49:20 +0000 (UTC) Cc: Sebastien Vauban , 14957@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 17 18:49:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VLySm-0002KO-BB for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Sep 2013 18:49:20 +0200 Original-Received: from localhost ([::1]:42485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLySl-0000D6-OA for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Sep 2013 12:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLySb-0000Cr-W3 for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 12:49:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLySU-00021d-Mq for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 12:49:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLySU-00021Z-JP for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VLySU-0003AV-5y for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2013 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14957 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14957-submit@debbugs.gnu.org id=B14957.137943648312109 (code B ref 14957); Tue, 17 Sep 2013 16:49:02 +0000 Original-Received: (at 14957) by debbugs.gnu.org; 17 Sep 2013 16:48:03 +0000 Original-Received: from localhost ([127.0.0.1]:44388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLyRW-00039E-T5 for submit@debbugs.gnu.org; Tue, 17 Sep 2013 12:48:03 -0400 Original-Received: from mout.web.de ([212.227.15.14]:57230) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLyRU-00038i-RG for 14957@debbugs.gnu.org; Tue, 17 Sep 2013 12:48:01 -0400 Original-Received: from drachen.dragon ([90.186.181.59]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MV4hR-1VPfju35tl-00YTk6 for <14957@debbugs.gnu.org>; Tue, 17 Sep 2013 18:47:54 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 26 Jul 2013 10:21:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:twvPuhPNXCV2ZaumJrq5rguNA8RoOOCbZ/57cOi6tUsgPudhovs bE7S6v67kjwp6LYP4fMTo6pTb8fDZINC8cpPR/DPZXgKMAjh5dQwHMCgz41jDd02NCXHxgm cbb3Ct7IlEHO1r/vfXh5l6xL7Zi9YkUdMxceUVzdusEOh0D2iqxN8jCXBQDp1qLwDGeM8UU FQ0kScw8NzM/mXEMhTCEQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78491 Archived-At: Hi Stefan, some comments: > > I think it'd be great to see the language next to "Fly" in the mode > > line. For example, something such as "Fly[FR]" or "Fly[EN]". > > That'd be nice, especially if we make it active so that you can right > click on it to select another language. > Patches very welcome. I think this should not be restricted to flyspell, I also want to know the current dictionary before doing M-$ (`ispell-word'), for example. For that purpose, I just add ,---------------------------------------------------------------------- | (:eval | (let ((dict (and (featurep 'ispell) | (or ispell-local-dictionary | ispell-dictionary)))) | (and dict | (concat " " | (propertize (substring dict 0 2) | 'face 'mode-line-shadow))))) `---------------------------------------------------------------------- to `mode-line-format' (`mode-line-shadow' just shows it in gray). About right clicking to select another language: I think most people would want a handy command to toggle between two or three dictionaries they frequently use. For example, I'm a native German speaker. When composing an Email, I want to be able to switch between German and English dict with one key - everything else is annoying. I _never_ need any other dict. Maybe that's what most people would want to use? I use this code for that: --8<---------------cut here---------------start------------->8--- (setq-default flyspell-default-dictionary "american") (defun my-ispell-toggle-dictionary () (interactive) "Toggle local dictionary between German and American." (require 'ispell) (pcase (or ispell-local-dictionary ispell-dictionary) (`"american" (ispell-change-dictionary "deutsch-alt8")) (_ (ispell-change-dictionary "american"))) (force-mode-line-update)) (defun my-flyspell-toggle-dictionary () "Toggle local dictionary. Turn on `flyspell-mode' if off." (interactive) (my-ispell-toggle-dictionary) (ignore-errors (when flyspell-mode (flyspell-buffer)))) --8<---------------cut here---------------end--------------->8--- Regards, Michael.