From: Tim Vaughan Date: Sun, 21 Apr 2019 21:17:27 +0000 (+0200) Subject: Image rendering now working. X-Git-Tag: v1.0.0~62 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=5a6848b978627f5643fca2011212ff10c2f823e4;p=elpher.git Image rendering now working. --- diff --git a/elopher.el b/elopher.el index b40007f..eb5160c 100644 --- a/elopher.el +++ b/elopher.el @@ -195,7 +195,7 @@ 'action #'elopher-click-link 'follow-link t 'help-echo help-string)) - (?p (elopher-insert-margin "im") + ((or ?g ?p ?I) (elopher-insert-margin "im") (insert-text-button display-string 'face elopher-image-face 'elopher-node (elopher-make-node elopher-current-node @@ -219,10 +219,7 @@ (defun elopher-get-selector (address after &optional binary) "Retrieve selector specified by ADDRESS and store it in the string elopher-selector-string, then execute AFTER as the -sentinal function. - -If BINARY is non-nil, the selector is expected to return a -binary result, otherwise otherwise utf-8 is assumed." +sentinal function." (setq elopher-selector-string "") (let ((p (get-process "elopher-process"))) (if p (delete-process p))) @@ -230,9 +227,6 @@ binary result, otherwise otherwise utf-8 is assumed." :name "elopher-process" :host (elopher-address-host address) :service (elopher-address-port address) - :coding (if binary - '(utf-8 . binary) - '(utf-8 . utf-8)) :filter (lambda (proc string) (setq elopher-selector-string (concat elopher-selector-string string))) :sentinel after) @@ -297,12 +291,13 @@ binary result, otherwise otherwise utf-8 is assumed." (elopher-restore-pos)) (elopher-get-selector address (lambda (proc event) - (let ((image (create-image elopher-selector-string)) + (let ((image (create-image + (string-as-unibyte elopher-selector-string) + nil t)) (inhibit-read-only t)) (insert-image image) (elopher-restore-pos) - (elopher-set-node-content image))) - 'binary)))) + (elopher-set-node-content elopher-current-node image)))))))