Closed DerBeutlin closed 2 years ago
You're doing nothing wrong, apart from attempting to use code no one has used before! Would you eval the below and see if it fixes the error?
I imagine there will be all sorts of weirdness with displaying the actual image, but let's at least get the bug out of there first.
(cl-defmethod ebdb-fmt-field ((_fmt ebdb-formatter-ebdb)
(field ebdb-field-image)
_style
(record ebdb-record))
(if (display-images-p)
(progn
(require 'image)
(apply
#'propertize
" "
;; Cribbed from `insert-image'.
(list 'display (ebdb-field-image-get field record)
'rear-nonsticky '(display)
'keymap image-map)))
"<img>"))
Yes that made it work! The display works fine although the scaling is not optimal. Thanks!
Good to hear. I wonder what we can do about the scaling. Do you just mean that the image is too large/small? Or that the actual aspect ratio is off?
No the aspect ratio is fine, it's just a bit large :)
Okay good. I guess I'll give image fields a "scale" parameter, which takes either an integer for width in pixels, or a float for percentage of window width. Then just give it a reasonable default. I don't know much about image display in Emacs, so this might take me a bit.
Okay, this fix is in, along with a new option ebdb-image-additional-plist
that you can use to control image sizing. I'm going to close this for now, but if anything doesn't work right please feel free to re-open or start a new issue. Thanks.
Hi I tried adding an image to a contact using
ebdb-insert-field
-> image - find image file ? (y) -> choose file.However I get then the error
(wrong-number-of-arguments propertize 2)
and I keep getting the error whenever I do an ebdb action afterwards unless I restart emacs without saving the ebdb changes.The whole traceback is
What am I doing wrong?