News for hackers. Stuff that matters.
Re:Org-mode 9.4 is out. Can you help? by tomerbd on Monday September 14, 2020 @01:35PM (#24472791)
Can you copy and paste an image into org mode? In many of my document/notes I find that I to copy and paste images into my documents like I take a screenshot and then paste..
Re:Org-mode 9.4 is out. Can you help? by zzamboni on Monday September 14, 2020 @03:51PM (#24474329)
Yes, with the org-download module (https://github.com/abo-abo/org-download). I have some additional configuration to paste a screenshot (asking for a filename) using a keybinding. Here is my config: https://github.com/zzamboni/dot-doom/blob/master/doom.org#ca...
Re:Org-mode 9.4 is out. Can you help? by WhatIsDukkha on Monday September 14, 2020 @01:51PM (#24473016)
There are plenty of ways to do it -

https://github.com/abo-abo/org-download

Re:Org-mode 9.4 is out. Can you help? by proxygeek on Monday September 14, 2020 @01:47PM (#24472954)
If you use it on Windows and have Itfanview installed, here's is how you can do it to copy paste images from clipboard using C-c-s

(defun my-org-screenshot () "Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file." (interactive) (setq screenshot_dir ".\\images\\") (setq tilde-buffer-filename (replace-regexp-in-string "/" "\\" (buffer-name) t t)) (setq filename (concat (make-temp-name (concat screenshot_dir tilde-buffer-filename ;; attempt to make irfanview approach work "_" (format-time-string "%Y%m%d_%H%M%S_")) ) ".png")) (insert (concat "[[file:" filename "]]")) (org-display-inline-images))

(global-set-key "\C-cs" 'my-org-screenshot)

Re:Org-mode 9.4 is out. Can you help? by boogies on Monday September 14, 2020 @02:15PM (#24473282)
Could you indent your Lisp by four spaces for formatting?

    (Like this)
Re:Org-mode 9.4 is out. Can you help? by dan-robertson on Monday September 14, 2020 @02:49PM (#24473643)
On HN you only indent two spaces to turn on monospace.

Here is the lisp with formatting:

  (defun my-org-screenshot ()
    "Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file."
    (interactive)
    (setq screenshot_dir ".\\images\\")
    (setq tilde-buffer-filename
          (replace-regexp-in-string "/" "\\" (buffer-name) t t))
    (setq filename
          (concat
            (make-temp-name
              (concat screenshot_dir
                      tilde-buffer-filename ;; attempt to make irfanview approach work
                      "_"
                      (format-time-string "%Y%m%d_%H%M%S_")))
            ".png"))
    (insert (concat "[[file:" filename "]]"))
    (org-display-inline-images))
Re:Org-mode 9.4 is out. Can you help? by vz8 on Monday September 14, 2020 @02:38PM (#24473525)
Did you mean Irfanview?

Thanks for the tip. Mostly emacsing via X, but good to know.

Re:Org-mode 9.4 is out. Can you help? by tobbe2064 on Monday September 14, 2020 @02:00PM (#24473120)
I just jumped to emacs from vim last week and this was one of the reasons, yes it is possible to display images!

I wa salso curios about org-roam but I'm letting it sitt for a while

Re:Org-mode 9.4 is out. Can you help? by hpoe on Monday September 14, 2020 @01:41PM (#24472872)
No, org mode is text based; however what you can do is link to an image, and then when you publish the org mode file as html, or pdf or whatever it will get interpolate and appear as though it had been pasted in.

At least that has been my experience a more seasoned orger can correct my ignorance if I do err.

Re:Org-mode 9.4 is out. Can you help? by ycombinete on Monday September 14, 2020 @01:50PM (#24473006)
Org mode supports inline images. See more here: https://stackoverflow.com/questions/27129338/inline-images-i...