下面的lisp代码用于在emacs模式行上显示图片的尺寸:
(add-hook 'image-mode-hook (lambda () "display image size on mode line." (setq mode-name (format "Image[%s](%s*%s)" image-type (car (image-size (image-get-display-property) t)) (cdr (image-size (image-get-display-property) t))))))
- 效果如下
[(Image[png](181*415))]