1. Frank Fischer
  2. evil
  3. Issues
Issue #228 resolved

evil-refresh-mode-line cannot handle propertized global-mode-string

Georgi Valkov
created an issue

Function evil-refresh-mode-line fails when given a propertized global-mode-string such as:

#("\"maildir:/INBOX\"" 0 16 (face mu4e-title-face))

The associated error message is:

Wrong type argument: listp, #("\"maildir:/INBOX\"" 0 16 (face mu4e-title-face))

Comments (5)

  1. Frank Fischer repo owner

    Improve mode-line handling

    The mode line tag of evil can now be customised to arbitrary positions within mode-line-format'. The variableevil-mode-line-format' can be used to specify this position, the default remains unchanged. The implementation of evil-refresh-mode-line' is now more robust and does not useglobal-mode-string' anymore.

    This fixes #228.

    → <<cset 2216ca64350a>>

  2. Abdó Roig-Maranges

    I don't think the error reported in this issue is completely fixed.

    I still get an error like this

    setq: Wrong type argument: listp, #("    <     Calendar     ? info / o other / . today
    Fri, Dec 14, 2012      >" 4 5 (help-echo "mouse-1: previous month" mouse-face
    mode-line-highlight keymap (keymap (mode-line keymap (mouse-1 . 
    calendar-scroll-right)))) 23 29 (help-echo "mouse-1: read Info on Calendar" 
    mouse-face mode-line-highlight keymap (keymap (mode-line keymap (mouse-1 .
    calendar-goto-info-node)))) 32 39 (help-echo "mouse-1: choose another month"
    mouse-face mode-line-highlight keymap (keymap (mode-line keymap (mouse-1 . 
    calendar-other-month)))) 42 49 (help-echo "mouse-1: go to today's date" 
    mouse-face mode-line-highlight keymap (keymap (mode-line keymap (mouse-1 .
    calendar-goto-today)))) 77 78 (keymap (keymap (mode-line keymap (mouse-1 . 
    calendar-scroll-left))) mouse-face mode-line-highlight help-echo 
    "mouse-1: next month"))

    when opening a calendar view in org-mode.

    The offending piece of evil is the line:

    (setq mode-line-format (delq 'evil-mode-line-tag mode-line-format))

    on evil-refresh-mode-line (evil-core.el). Not sure why mode-line-format is not a list and how to resolve this though...

  3. Frank Fischer repo owner

    Update mode-line-format only if it is a list.

    `mode-line-format' may also be a string or a symbol. In these cases we do not really know where to put Evil's state indicator, so we leave it out.

    This addresses issue #228.

    → <<cset 8e161f44aee3>>

  4. Log in to comment