emacs-framebuffer

Emacs library to show images and documents in console using Linux framebuffer
Log | Files | Refs

commit 25cd084aca0e57a0a330c422da73a2cd8d1fbe95
parent ac8f9cd9c51821302c7ec7e6a7df32b4513dc99f
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 24 May 2020 18:05:40 +0200

support xpm

Diffstat:
Memacs-framebuffer.el | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -162,6 +162,9 @@ ((?3 ?6) (search-forward-regexp "^\\([0-9]+\\) \\([0-9]+\\)$") (cons (read (match-string 1)) (read (match-string 2)))))) + (t ;; xpm + (when (search-forward-regexp "\"[ ]*\\([0-9]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+\\)[ ]*") + (cons (read (match-string 1)) (read (match-string 2))))) )))) (defun framebuffer-image-file (file) @@ -185,7 +188,7 @@ (let ((f (dired-file-name-at-point))) (and (not (file-directory-p f)) (string-match - "jpe?g\\|JPE?G\\|png\\|PNG\\|bmp\\|BMP\\|gif\\|GIF\\|tiff?\\|TIFF?\\|ppm\\|PPM\\|pnm\\|PNM" + "jpe?g\\|JPE?G\\|png\\|PNG\\|bmp\\|BMP\\|gif\\|GIF\\|tiff?\\|TIFF?\\|ppm\\|PPM\\|pnm\\|PNM\\|xpm\\|XPM" (file-name-extension f))))) (defun framebuffer-image-file-dired-next (arg)