From: "Christopher M. Miles" <numbchild@gmail.com>
To: Emacs Help <help-gnu-emacs@gnu.org>
Subject: [QUESTION] Add conditional indicator to `mode-line-misc-info' not working
Date: Thu, 07 Mar 2024 15:30:16 +0800 [thread overview]
Message-ID: <65e96d12.170a0220.932f6.0c8f@mx.google.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next reply other threads:[~2024-03-07 7:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 7:30 Christopher M. Miles [this message]
2024-03-07 14:54 ` [QUESTION] Add conditional indicator to `mode-line-misc-info' not working Stefan Monnier via Users list for the GNU Emacs text editor
2024-03-07 15:13 ` On manuals and the Intertubes [was: Add conditional indicator to `mode-line-misc-info'] " tomas
2024-03-07 15:34 ` Eric S Fraga
2024-03-07 15:43 ` [OFFTOPIC] Re: On manuals and the Intertubes " Stefan Monnier via Users list for the GNU Emacs text editor
2024-03-07 17:07 ` Eric S Fraga
2024-03-07 22:56 ` Stefan Monnier via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65e96d12.170a0220.932f6.0c8f@mx.google.com \
--to=numbchild@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).