将图像插入文本缓冲区

编程入门 行业动态 更新时间:2024-10-27 00:36:13
本文介绍了将图像插入文本缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果我放置

(插入图像(create-image/tmp/test.png)) $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ b $ ,则缓冲区中将显示图像 /tmp/test.png

整洁。但是,

  • 我不得不将最后一个括号放在一行,所以图像靠近左边一边的缓冲区。有没有办法隐藏 (插入图像...)文本?
  • 文本文件包含(插入图像...)仅文本,而不是图像。我很高兴,但有一种方法来告诉emacs 自动替换 $($)$ c $($) b他们对应的图像(文件打开后),而不需要在之后输入 Cx Ce
  • 解决方案

    看看 iimage-mode ,内联图像小模式。它包含自Emacs-23,IIRC。

    Mx iimage-mode p>

    If I place

    (insert-image (create-image "/tmp/test.png"))

    in a buffer, place the cursor after the last parenthesis and evaluate it with C-x C-e, then the image /tmp/test.png is displayed in the buffer:

    Pretty neat. But,

  • I had to put the final parenthesis on a separate line, so the image is close to the left-hand side of the buffer. Is there a way to hide the (insert-image ...) text altogether?
  • The text file contains the (insert-image ...) text only, not the image. I'm happy with that, but is there a way to tell emacs to automatically replace all the (insert-image ...) expressions by their corresponding images (after the file is opened) without me having to type C-x C-e after each one?
  • 解决方案

    Take a look at iimage-mode, the inline image minor mode. It's included since Emacs-23, IIRC.

    M-xiimage-mode

    更多推荐

    将图像插入文本缓冲区

    本文发布于:2023-07-27 02:46:31,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1219904.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:缓冲区   图像   文本

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!