help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QUESTION] Add conditional indicator to `mode-line-misc-info' not workin


From: Christopher M. Miles
Subject: [QUESTION] Add conditional indicator to `mode-line-misc-info' not working
Date: Thu, 07 Mar 2024 15:30:16 +0800
User-agent: mu4e 1.12.1; emacs 30.0.50

I added bellowing init config to my Emacs:

#+begin_src emacs-lisp
(add-to-list 'mode-line-misc-info
             '(image-mode (:eval (image-size (image-get-display-property) 
:pixels))))
#+end_src

But it's not displaying image info on mode-line when I open an image
with [M-x find-file RET /path/to/image.png RET].

I searched GitHub code for `mode-line-misc-info` examples. I don't know
what does the `image-mode` mean in upper code. Is it a condition which
only evaluate following `(:eval (image-size ...))` snippet in buffer
which major-mode is `image-mode`?

How to correctly add indicator to `mode-line-misc-info`? Please provide
some variant examples. Thanks very much.

Also the docstring of `mode-line-misc-info` is not helpful, please improve it.

My Emacs version info: GNU Emacs 30.0.50

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]