X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elopher.el;h=eb5160ce90040f70b5d387601ccf79d42f42177b;hp=b40007f69cf7a6b888c69ca91d74d0c7b5bc7326;hb=5a6848b978627f5643fca2011212ff10c2f823e4;hpb=1e2de704ced6c5ea7fa93ddea8eebf9c9f11186c 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)))))))