From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.bugs Subject: bug#14957: 24.3.50; Flyspell language visible in mode line Date: Fri, 08 Nov 2013 21:46:26 +0100 Organization: Sebastien Vauban Message-ID: <86a9hevcyl.fsf@somewhere.org> References: <86y58teatq.fsf@missioncriticalit.com> <87wqmfz96x.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383944113 24407 80.91.229.3 (8 Nov 2013 20:55:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Nov 2013 20:55:13 +0000 (UTC) Cc: 14957-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Fri Nov 08 21:55:18 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 1Vet5J-0008DX-Ka for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2013 21:55:17 +0100 Original-Received: from localhost ([::1]:49124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vet5J-00049b-Bd for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2013 15:55:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vet1e-00033z-Qa for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Fri, 08 Nov 2013 15:55:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VesxK-0002Y6-V0 for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Fri, 08 Nov 2013 15:51:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VesxK-0002Y0-RN for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Fri, 08 Nov 2013 15:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VesxK-0006vv-Iv for bug-gnu-emacs-mXXj517/zsQ@public.gmane.org; Fri, 08 Nov 2013 15:47:02 -0500 X-Loop: help-debbugs-mXXj517/zsQ@public.gmane.org Resent-From: "Sebastien Vauban" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs-mXXj517/zsQ@public.gmane.org Resent-Date: Fri, 08 Nov 2013 20:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs-mXXj517/zsQ@public.gmane.org X-GNU-PR-Message: followup 14957 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14957-submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org id=B14957.138394360826630 (code B ref 14957); Fri, 08 Nov 2013 20:47:02 +0000 Original-Received: (at 14957) by debbugs.gnu.org; 8 Nov 2013 20:46:48 +0000 Original-Received: from localhost ([127.0.0.1]:42379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vesx5-0006vR-Re for submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Fri, 08 Nov 2013 15:46:48 -0500 Original-Received: from dd5e0353a.access.telenet.be ([213.224.53.58]:31806 helo=mail.missioncriticalit.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vesx0-0006v4-Lb for 14957-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org; Fri, 08 Nov 2013 15:46:46 -0500 Original-Received: from MUNDANEUM.i-did-not-set--mail-host-address--so-tickle-me (unknown [10.10.4.62]) by mail.missioncriticalit.com (Postfix) with ESMTPS id 15B715008AF; Fri, 8 Nov 2013 21:49:10 +0100 (CET) X-Url: Under construction... X-Archive: encrypt In-Reply-To: <87wqmfz96x.fsf-S0/GAf8tV78@public.gmane.org> (Michael Heerdegen's message of "Tue, 17 Sep 2013 18:47:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit-ubl+/3LiMTaZdePnXv/OxA@public.gmane.org X-Mailman-Version: 2.1.15 Precedence: list X-Spam-Score: 0.7 (/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs-mXXj517/zsQ@public.gmane.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-mXXj517/zsQ@public.gmane.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.bugs:80157 Archived-At: Hi Michael, Michael Heerdegen wrote: >>> 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). I have the following minimal Emacs configuration file: --8<---------------cut here---------------start------------->8--- (setq ispell-dictionary "francais") ;; spelling checker program (setq ispell-program-name "aspell") (message "<<< Before add-to-list >>>") (add-to-list 'mode-line-format '(:eval (let ((dict (and (featurep 'ispell) (or ispell-local-dictionary ispell-dictionary)))) (and dict (concat " [" (propertize (substring dict 0 2) 'face 'mode-line-highlight) "]")))) t) (message "<<< After add-to-list >>>") ;; enable on-the-fly spell checking (add-hook 'text-mode-hook (lambda () (flyspell-mode 1))) ;; prevent flyspell from finding mistakes in the code (add-hook 'prog-mode-hook (lambda () ;; `ispell-comments-and-strings' (flyspell-prog-mode))) --8<---------------cut here---------------end--------------->8--- And I open the following Org file: --8<---------------cut here---------------start------------->8--- #+TITLE: ECM pour Flyspell #+Time-stamp: <2013-11-08> #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en * D=C3=A9veloppement :PROPERTIES: :CATEGORY: Dev :END: ** DONE Engager firme de relations publiques :mail: DEADLINE: <2013-02-14 Thu> :LOGBOOK: CLOCK: [2013-02-05 Tue 09:00]--[2013-02-05 Tue 10:11] =3D> 1:11 - State "TODO" -> "STRT" [2013-02-05 Tue 17:48] - State "TODO" -> "STRT" [2013-08-19 Mon 15:16] :END: ** TODO Appeler Laura pour bug dans le code shell :phone: Le bout de code suivant a un probl=C3=A8me. #+begin_src sh wher command #+end_src --8<---------------cut here---------------end--------------->8--- I expect to see the language indicator, but it is not displayed in the mode-line. Checking the value of `mode-line-format', it seems that the code to support= it has not been added to that variable!? Though, that code has been executed, as messages before and after it are we= ll displayed in the *Messages* buffer. See demo at http://screencast.com/t/86M9ZPl8lUx. Any idea about the problem? Best regards, Seb --=20 Sebastien Vauban