emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: [QUESTION] why there is a horizontal line in middle of text-pro


From: Christopher M. Miles
Subject: Re: Fwd: [QUESTION] why there is a horizontal line in middle of text-property displayed image?
Date: Sat, 01 Oct 2022 20:45:15 +0800
User-agent: mu4e 1.8.9; emacs 29.0.50

Ihor Radchenko <yantar92@gmail.com> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>   2. install package =[M-x package-install RET org-link-beautify RET]=
>
> Hmm. Can you also reproduce without org-link-beautify?

I replaced step 5 with step 6 by extracting the logic code of
org-link-beautify, but I found it does not have center-line. That's
really weird.

  1. =$ emacs -Q=
  2. install package =[M-x package-install RET org-link-beautify RET]=
  3. load the package =[M-x load-library org-link-beautify RET]=
  4. open an Org file which has content which has a "file:" link to a video 
file (You can replace
     the video file link as yours) :
     #+begin_src org
     ,* headline 1

     link [[file:~/Downloads/3veEPJrQrV1EtpH9.mp4]]
     #+end_src
  5. enable minor mode =[M-x org-link-beautify-mode RET]=. This mode will auto 
thumbnail for video
     file and display it with /text-property/.
  6. reproduce without org-link-beautify

     #+begin_src emacs-lisp
     (let ((start (point))
           (end (save-excursion (forward-word) (point))))
       (org-link-beautify--add-overlay-marker start end)
       (put-text-property
        start end
        'display (create-image "~/Downloads/.thumbnails/3veEPJrQrV1EtpH9.png" 
nil nil :ascent 'center :max-height 512))
       (make-local-variable 'image-map)
       (define-key image-map (kbd "<mouse-1>") 'org-open-at-point))
     #+end_src

  7. The displayed thumbnail on link has a center-line.
  8. But open the generated thumbnail image file 
=file:.thumbnails/3veEPJrQrV1EtpH9.png= with external
     program, it does not have this center-line.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]