emacs - 将剪贴板上的图像粘贴到 Emacs Org 模式文件而不保存它

标签 emacs screenshot org-mode

由于我使用 Emacs Org 模式作为研究日志,有时我想通过截图图像跟踪某些内容,我绝对不想保存它们。所以我想知道有什么方法可以将这些数字插入到我的组织模式文件中,就像用文字从剪贴板处理它们一样?

最佳答案

您想要的确切功能目前尚未实现,但如果您认为“绝对不想保存它们”,我会怀疑将大量图像保存到研究日志中。

无论如何,你想要的功能近年来已经在组织模式邮件列表中表达了几次 - 检查

http://comments.gmane.org/gmane.emacs.orgmode/33770

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg50862.html

第一个链接包含一些代码,用于启动屏幕截图实用程序(通过 ImageMagick)以 [唯一] 保存文件并在组织模式缓冲区中插入内联链接。

正如该线程中所述,代码经过改进并添加到 org-mode hacks 页面 - 其中有很多有用的 gem :

http://orgmode.org/worg/org-hacks.html

(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 filename
        (concat
         (make-temp-name
          (concat (buffer-file-name)
                  "_"
                  (format-time-string "%Y%m%d_%H%M%S_")) ) ".png"))
  (call-process "import" nil nil nil filename)
  (insert (concat "[[" filename "]]"))
  (org-display-inline-images))

关于emacs - 将剪贴板上的图像粘贴到 Emacs Org 模式文件而不保存它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17435995/

相关文章:

Emacs:如何让自定义了解新代码?

emacs markdown-mode 内联代码没有 <pre> 标签

c# - 鼠标交互未显示在 webdriver 屏幕截图中

emacs - 组织模式删除线颜色

emacs - 如何在组织模式下组织信息,以便将表格作为输出?

unicode - Emacs:打印 UTF-8 缓冲区

shell - Emacs 多术语作为登录 shell

css - 如何使用自定义样式在 Reactjs 中使用 html2canvas 截取 DOM 的屏幕截图

ios - iTunes Connect 截图不接受 iPad PRO 截图

emacs - Org LaTeX 预览在视网膜显示器上是模糊的