wolfram.el icon indicating copy to clipboard operation
wolfram.el copied to clipboard

Doesn't work in terminal

Open quidnu opened this issue 2 years ago • 1 comments

The code seems to only insert images and not plaintext if an image is returned by Wolfram alpha and because images don't work when in the terminal nothing is shown in that case.

Images should not be inserted when in the terminal. Plaintext should probably always be inserted (or at least have a setting).

(defun wolfram--append-subpod (subpod)
  "Appends a subpod to the current buffer."
  (let ((plaintext (car (xml-get-children subpod 'plaintext)))
        (image (car (xml-get-children subpod 'img))))
    (if (and image window-system)
        (wolfram--insert-image-from-url (xml-get-attribute image 'src)))
    (insert (format "%s\n" (car (last plaintext))))
    (insert "\n")))

I don't understand what wolfram--insert-image does (vs. Wolfram--insert-image-from-url)

quidnu avatar Nov 12 '22 00:11 quidnu