GNU bug report logs - #14957
24.3.50; Flyspell language visible in mode line

Previous Next

Package: emacs;

Reported by: Sebastien Vauban <sva-news <at> mygooglest.com>

Date: Fri, 26 Jul 2013 13:01:03 UTC

Severity: wishlist

Tags: fixed

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 14957 <at> debbugs.gnu.org (full text, mbox):

From: "Sebastien Vauban" <sva-news <at> mygooglest.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 14957 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#14957: 24.3.50; Flyspell language visible in mode line
Date: Fri, 08 Nov 2013 21:46:26 +0100
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éveloppement
  :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] =>  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ème.

#+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 well
displayed in the *Messages* buffer.

See demo at http://screencast.com/t/86M9ZPl8lUx.

Any idea about the problem?

Best regards,
  Seb

-- 
Sebastien Vauban




This bug report was last modified 4 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.