Displaying remote images in Org-mode
In one of my previous posts, I explained how a remote python process can be setup in an org-mode documents. Therefore, allowing you to offload any large compute to a remote server.
However, in the previous post, I mentioned how I was unable to get
images created as a result of a remote process (i.e. plotting with
matplotlib) to display inline. My workaround was just to visit the
remote file in a separate buffer using
C-c C-o. But today, I chanced
upon this stackoverflow answer that exactly solves my issue.
Unbeknownst to me, there is an variable that specifies how org-mode
should handle remote paths. This variable, aptly named
org-display-remote-inline-images (perhaps I should have searched in
emacs's variable list for some combination of these keywords), can be
skip (which ignores any remote paths), to
which will display the image inline!
This is the documentation for this variable.
org-display-remote-inline-images is a variable defined in ‘org.el’. Its value is ‘skip’ How to display remote inline images. Possible values of this option are: skip Don’t display remote images. download Always download and display remote images. cache Display remote images, and open them in separate buffers for caching. Silently update the image buffer when a file change is detected.
By setting this variable appropriately, working with a remote process in org-mode is just as it is with a local process – seamless.