1794Re: [emacs-nxml-mode] nxhtml-mode: wrong dimensions in completed img tag
- Mar 8, 2008Thanks Niels. I have added that and uploaded it with version 1.12 of nXhtml.
> Hi Lennart,
> The function `create-image' in emacs need an absolute path, lest it
> tries and
> find an image in a sub-directory of `data-directory' and
> `x-bitmap-file-path'. Documentation as to that (bizarre!) behaviour was
> added to
> function `create-image' now in CVS:
> Image file names that are not absolute are searched for in the
> "images" sub-directory of `data-directory' and
> `x-bitmap-file-path' (in that order)..
> The function `create-image' will make a blank 30x30 image if it cannot
> find it
> relatively to said path. `image-size' will then give '(30 . 30) back as a
> result, which you use in `nxhtml-img-tag-do-also' for inserting width and
> height. So, to cut the talk: here's the fix:
> In function `nxhtml-img-tag-do-also', change
> (sizes (image-size (create-image src) t))
> (sizes (image-size (create-image (expand-file-name src)) t))
> Niels Giesen.
> http://niels.kicks-ass.org <http://niels.kicks-ass.org>
- << Previous post in topic