Such functionality is provied by packages:
With point in the thumbnail buffer, you can type RET (image-dired-display-thumbnail-original-image) to display a sized version of it in another window. This sizes the image to fit the window.
It uses ImageMagick's convert command.
You can also use image-dired-external-viewer to avoid ...
It is possible with a little code. I would define a new link like this:
(let ((img (expand-file-name
(concat (md5 path) "." (file-name-extension path))
(if (file-exists-p img)
(url-copy-file path img)
As someone who just had this problem, I found another solution: auto-image-file-mode. What it does is automatically make sure the file is in image mode instead of binary, so enable both that and auto-revert-mode and everything works as expected. Emacs 24.4.1
I used the source code in lisp/image-mode.el to write this up. Calling this function in any image buffer will resize it to fit to width or height depending on the image and window height/width ratios.
You do need these 2 things for this function to work:
Your emacs needs to have been compiled with Imagemagick.
By default libjpeg loader is used to ...
Based on what happens behind the scenes when you call iimage-mode, you can define a function that takes care of displaying images for you, and have Emacs run this function every time you issue an echo command in Eshell:
(defun iimage-mode-refresh (command args)
(when (string= command "echo")
(let ((image-path (cons default-directory iimage-mode-image-...
This is controlled by the variable auto-mode-alist, which you can modify by adding the following line to your emacs init file:
(add-to-list 'auto-mode-alist '("\\.pdb$" . text-mode))
The "\\.pdb$" part is a regular expression that matches files ending in pdb. The part after the period is the mode you want to use instead of the default.
Others will no doubt mention packages that are made specifically for handling images. This answer, about some more general features, might nevertheless help.
Dired+ provides a few enhancements regarding image files.
Most of these require standard library image-dired.el. One of them, command diredp-do-display-images, which displays all of the marked image ...
You don't provide much information about what you are doing or what you are seeing. Try to give a step-by-step recipe, preferably starting from emacs -Q, and say what you expect versus what you see.
Does manually reverting the buffer work (M-x revert-buffer, after setting the current buffer to the image buffer)? If so, then investigate what is different ...
Based on itsjeyd's answer I advised eshell/cat to display images when an argument is the filename of an image file supported by iimage-mode.
(defun my/iimage-mode-refresh--eshell/cat (orig-fun &rest args)
"Display image when using cat on it."
(let ((image-path (cons default-directory iimage-mode-image-search-path)))
(dolist (arg args)
I tried opening a png in emacs, enabling auto-revert-mode and then from a shell, copying another image over it and then replacing that file with a copy of the original png.
What I found is that the file is sometimes updated to the new files binary contents, but not the rendered content. If it opens the binary content, try using C-c C-c to convert it to an ...
Not within the Org buffer itself, as far as I know.
If you export to HTML, however, links to images will be converted into images.
If the description is a file name or URL that points to an image, HTML export (see HTML export) will inline the image as a clickable button. If there is no description at all and the link points to an image, that image will ...
You're misinterpreting the STRING parameter here. The docs state it's a string used as the before-string property with an image on top of it. Therefore, if you do (put-image (create-image "image.gif") (point) "Some image"), "Some image" would be displayed before point weren't it for the image layered on top of it which visually replaces that text. You can ...
It is not possible AFAICT out of the box. I did something similar here: http://kitchingroup.cheme.cmu.edu/blog/2016/03/21/Displaying-image-overlays-on-image-filenames-in-Emacs/ and modified tooltips on a link here http://kitchingroup.cheme.cmu.edu/blog/2015/11/23/Improving-org-ref-cite-links-with-tooltips/. They might give you some hints on how to get what ...
Let bound coding-system-for-read to raw-text or no-conversion in function starting the process for getting png data. This will instruct emacs to treat the process output as raw bytes.
Looking at your code in github it seems the puml-preview starts the planetuml process, change its definition as follows
(defun puml-preview ()
Two methods would be useful to you image-transform-fit-to-width and image-transform-set-scale, you can use these two functions inside a image-mode-hook to setup the display like you want based on the file. You can get the file extension by using file-name-extension on buffer-file-name.
Here is an implementation:
(defun my-image-mode-setup ()
(when (and (...
About your first question:
What is the logic behind this remapping? If it's there, I'm guessing it must be somehow useful, despite that the original mapping to recenter is normally so sacred to emacs users.
You should have a look at the description of iimage-recenter:
Re-draw images and recenter.
The "re-draw images" part is not covered by recenter-...
Resizing images only works for images types supported by the imagemagick-library.
The function imagemagick-types returns a list of these types.
EDIT: Input M-: (setq val (imagemagick-types)) RET and C-h v val RET to check what the function returns.
If the value of val is nil imagemagick is not enabled and you are out of luck. If the value is a list look ...
diredp-toggle-find-file-reuse-dir does not prevent you from opening multiple Dired buffers for different directories (e.g. subdirs). It should be irrelevant here, but you might want to describe just what you are doing, step by step.
With multiple Dired buffers open, you can mark files (and subdirs) in any of them. with Dired+ (which you are apparently using),...
The function in question is image-mode, and this seems to do what you want (if a little inelegantly):
(defun my/image-unwanted-message-p (msg &rest objects)
"Return non-nil if MSG is unwanted.
For these purposes, a MSG is unwanted if (after formatting) it is
exactly the string \"Type C-c C-c to view the image as text.\"."
(let ((msg (apply #'format (...
image-transform-set-scale may be what you are looking for. However it requires Emacs to be compiled with Imagemagick support.
There is also a commented out image-transform-mode in image-mode.el labeled "Not yet implemented."