Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue #21

Closed
cflavio opened this issue Mar 7, 2020 · 6 comments
Closed

Compatibility issue #21

cflavio opened this issue Mar 7, 2020 · 6 comments
Labels
question Further information is requested

Comments

@cflavio
Copy link

cflavio commented Mar 7, 2020

Hi! I am using mini-modeline (it is awesome). But, when I use it with mode-line-stats, I get this error (and I can't see it in the modeline):

mini-modeline: (error Invalid format operation %%$)

Emacs 25.2.2 here, I am using the last version on MELPA (pkg-info-package-version says 20200306.1000). Thank you!

@kiennq
Copy link
Owner

kiennq commented Mar 7, 2020

Thank you, can you try with toggle error on and see if there's any error pop up?
Also the content of *Message* would help too.

And if possible, the minimal config that can produce the issue.

@kiennq kiennq added the question Further information is requested label Mar 8, 2020
@cflavio
Copy link
Author

cflavio commented Mar 8, 2020

Hi! This is a minimal config that seems to replicate the issue:

(package-initialize)
(setq debug-on-error t)
(require 'mini-modeline)
(mini-modeline-mode t)

Here is *Messages*:

Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50mu4e.el (source)...done
Loading /etc/emacs/site-start.d/50pylint.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [6 times]
Mark set
next-line: End of buffer [15 times]
next-line: End of bufferError during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [5 times]
mwheel-scroll: Beginning of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
mwheel-scroll: Beginning of buffer [2 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [30 times]
next-line: End of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
next-line: End of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [4 times]
Truncate long lines disabled
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [14 times]
Mark set [2 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [27 times]
next-line: End of buffer [3 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
next-line: End of buffer [14 times]
Saved text from "Debugger entered--Lisp error: (error "In"
mini-modeline: (error Invalid format operation %%$)
mini-modeline: (error Invalid format operation %%$)
mini-modeline: (error Invalid format operation %%$)
mini-modeline: (error Invalid format operation %%$)
mini-modeline: (error Invalid format operation %%$)
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [13 times]
mwheel-scroll: Beginning of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
mwheel-scroll: Beginning of buffer [8 times]
mwheel-scroll: Beginning of bufferError during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
previous-line: Beginning of buffer [3 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
previous-line: Beginning of buffer [7 times]
Mark activated
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [32 times]
next-line: End of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
next-line: End of buffer [11 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [6 times]
mwheel-scroll: Beginning of buffer [5 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [22 times]
mwheel-scroll: Beginning of buffer [2 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [18 times]
mwheel-scroll: End of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
mwheel-scroll: Beginning of buffer
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [7 times]
Mark set [2 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil) [15 times]
next-line: End of buffer [4 times]
Error during redisplay: (eval (mini-modeline-msg)) signaled (wrong-type-argument arrayp nil)
next-line: End of buffer [7 times]

Here is the debug:

Debugger entered--Lisp error: (error "Invalid format operation %%$")
  format("%%s %%%1$d.%1$ds" 23)
  mini-modeline--multi-lr-render("For information about GNU Emacs and the GNU system, type C-h C-a." #("U:%%-  *GNU Emacs*  Top L1    (Fundamental Minimode)" 0 1 (local-map (keymap (mode-line keymap (mouse-3 . #[(e) "\302\30!\211@\262!r\304\216\305	@\306\"\210\307\310!+\207" [e save-selected-window--state internal--before-with-selected-window event-start #[nil "\30!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord call-interactively set-buffer-file-coding-system] 3 nil "e"]) (mouse-1 . #[(e) "\304\30!\211@\262!r\306\216\307	@\310\"\210\n\205
                                         \205\311
                                                 !+\207" [e save-selected-window--state enable-multibyte-characters buffer-file-coding-system internal--before-with-selected-window event-start #[nil "\30!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord describe-coding-system] 3 nil "e"]))) mouse-face mode-line-highlight help-echo mode-line-mule-info-help-echo) 1 2 (mouse-face mode-line-highlight keymap (keymap (mode-line keymap (mouse-1 . mode-line-change-eol))) help-echo "End-of-line style: Unix-style LF\nmouse-1: Cycle") 2 3 (mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . mode-line-toggle-read-only))) help-echo mode-line-read-only-help-echo) 3 4 (mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . mode-line-toggle-modified))) help-echo mode-line-modified-help-echo) 4 5 (help-echo #[(window _object _point) "\303\304\30!r\306\216\307	@\310\"\210\n;\203$\311\n!\203\312\202\313\nP\202%\314+\"\207" [window save-selected-window--state default-directory format "%s" internal--before-with-selected-window #[nil "\30!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord file-remote-p "Current directory is remote: " "Current directory is local: " "Current directory is nil"] 5] mouse-face mode-line-highlight) 7 18 (local-map (keymap (header-line keymap (mouse-3 . mode-line-next-buffer) (down-mouse-3 . ignore) (mouse-1 . mode-line-previous-buffer) (down-mouse-1 . ignore)) (mode-line keymap (mouse-3 . mode-line-next-buffer) (mouse-1 . mode-line-previous-buffer))) mouse-face mode-line-highlight help-echo "Buffer name\nmouse-1: Previous buffer\nmouse-3: Next buffer" face mode-line-buffer-id) 18 19 (local-map (keymap (header-line keymap (mouse-3 . mode-line-next-buffer) (down-mouse-3 . ignore) (mouse-1 . mode-line-previous-buffer) (down-mouse-1 . ignore)) (mode-line keymap (mouse-3 . mode-line-next-buffer) (mouse-1 . mode-line-previous-buffer))) mouse-face mode-line-highlight help-echo "Buffer name\nmouse-1: Previous buffer\nmouse-3: Next buffer" face mode-line-buffer-id) 20 23 (help-echo "Size indication mode\nmouse-1: Display Line and Column Mode Menu" mouse-face mode-line-highlight local-map (keymap (mode-line keymap (down-mouse-1 keymap (column-number-mode menu-item "Display Column Numbers" column-number-mode :help "Toggle displaying column numbers in the mode-line" :button (:toggle . column-number-mode)) (line-number-mode menu-item "Display Line Numbers" line-number-mode :help "Toggle displaying line numbers in the mode-line" :button (:toggle . line-number-mode)) "Toggle Line and Column Number Display")))) 23 25 (help-echo "Line Number\nmouse-1: Display Line and Column Mode Menu" mouse-face mode-line-highlight local-map (keymap (mode-line keymap (down-mouse-1 keymap (column-number-mode menu-item "Display Column Numbers" column-number-mode :help "Toggle displaying column numbers in the mode-line" :button (:toggle . column-number-mode)) (line-number-mode menu-item "Display Line Numbers" line-number-mode :help "Toggle displaying line numbers in the mode-line" :button (:toggle . line-number-mode)) "Toggle Line and Column Number Display")))) 25 26 (help-echo "Line Number\nmouse-1: Display Line and Column Mode Menu" mouse-face mode-line-highlight local-map (keymap (mode-line keymap (down-mouse-1 keymap (column-number-mode menu-item "Display Column Numbers" column-number-mode :help "Toggle displaying column numbers in the mode-line" :button (:toggle . column-number-mode)) (line-number-mode menu-item "Display Line Numbers" line-number-mode :help "Toggle displaying line numbers in the mode-line" :button (:toggle . line-number-mode)) "Toggle Line and Column Number Display")))) 31 42 (help-echo "Major mode\nmouse-1: Display major mode menu\nmouse-2: Show help for major mode\nmouse-3: Toggle minor modes" mouse-face mode-line-highlight local-map (keymap (mode-line keymap (down-mouse-3 keymap (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button (:toggle . abbrev-mode)) (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button (:toggle . auto-fill-function)) (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button (:toggle bound-and-true-p auto-revert-mode)) (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable (buffer-file-name) :button (:toggle bound-and-true-p auto-revert-tail-mode)) (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button (:toggle bound-and-true-p flyspell-mode)) (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button (:toggle . font-lock-mode)) (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button (:toggle bound-and-true-p glasses-mode)) (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button (:toggle bound-and-true-p hide-ifdef-mode)) (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button (:toggle bound-and-true-p highlight-changes-mode)) (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button (:toggle bound-and-true-p outline-minor-mode)) (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button (:toggle . overwrite-mode)) "Minor Modes") (mouse-2 . describe-mode) (down-mouse-1 menu-item "Menu Bar" ignore :filter #[(_) "\300 \207" [mouse-menu-major-mode-map] 1])))) 42 51 (local-map (keymap (header-line keymap (down-mouse-3 keymap (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button (:toggle . abbrev-mode)) (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button (:toggle . auto-fill-function)) (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button (:toggle bound-and-true-p auto-revert-mode)) (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable (buffer-file-name) :button (:toggle bound-and-true-p auto-revert-tail-mode)) (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button (:toggle bound-and-true-p flyspell-mode)) (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button (:toggle . font-lock-mode)) (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button (:toggle bound-and-true-p glasses-mode)) (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button (:toggle bound-and-true-p hide-ifdef-mode)) (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button (:toggle bound-and-true-p highlight-changes-mode)) (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button (:toggle bound-and-true-p outline-minor-mode)) (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button (:toggle . overwrite-mode)) "Minor Modes")) (mode-line keymap (down-mouse-3 keymap (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button (:toggle . abbrev-mode)) (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button (:toggle . auto-fill-function)) (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button (:toggle bound-and-true-p auto-revert-mode)) (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable (buffer-file-name) :button (:toggle bound-and-true-p auto-revert-tail-mode)) (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button (:toggle bound-and-true-p flyspell-mode)) (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button (:toggle . font-lock-mode)) (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button (:toggle bound-and-true-p glasses-mode)) (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button (:toggle bound-and-true-p hide-ifdef-mode)) (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button (:toggle bound-and-true-p highlight-changes-mode)) (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button (:toggle bound-and-true-p outline-minor-mode)) (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button (:toggle . overwrite-mode)) "Minor Modes") (mouse-2 . mode-line-minor-mode-help) (down-mouse-1 . mouse-minor-mode-menu))) help-echo "Minor mode\nmouse-1: Display minor mode menu\nmouse-2: Show help for minor mode\nmouse-3: Toggle minor modes" mouse-face mode-line-highlight)))
  mini-modeline-display(#<window 4 on  *Minibuf-0*>)
  run-hook-with-args(mini-modeline-display #<window 4 on  *Minibuf-0*>)
  redisplay--pre-redisplay-functions((#<window 4 on  *Minibuf-0*> #<window 3 on *GNU Emacs*>))
  apply(redisplay--pre-redisplay-functions (#<window 4 on  *Minibuf-0*> #<window 3 on *GNU Emacs*>))
  #[128 "\300\301\"\210\300\302\"\207" [apply redisplay--pre-redisplay-functions ignore nil] 4 nil nil]((#<window 4 on  *Minibuf-0*> #<window 3 on *GNU Emacs*>))
  redisplay_internal\ \(C\ function\)()

Thanks!

@kiennq
Copy link
Owner

kiennq commented Mar 9, 2020

Can you upgrade to latest version and try again?
Show me the debug log too. Thanks.

@cflavio
Copy link
Author

cflavio commented Mar 9, 2020

Thanks, it works! Now there aren't errors in the log. Anyway, mode-line-stats is not visible with mini-modeline (it is visible only in the buffer's modeline). Thank you very much!

@kiennq
Copy link
Owner

kiennq commented Mar 19, 2020

@cflavio I stopped trimming mode line, can you check if your mini-modeline-r-format or mini-modeline-l-format is set to contain mode-line-stats item?

@cflavio
Copy link
Author

cflavio commented Mar 19, 2020

It works, thank you!

@kiennq kiennq closed this as completed Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants