emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] The latest commit "f4687993c53a5339e" caused inline image preview try to convert PDF file link
@ 2020-08-17  2:19 numbchild
  2020-08-17  6:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: numbchild @ 2020-08-17  2:19 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

RT.

The latest commit "f4687993c53a5339e" added "pdf" file type into inline
image rules. This caused org-toggle-inline-image try to convert large PDF
into png images. Caused very long time suspend.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

[-- Attachment #2: Type: text/html, Size: 1070 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [BUG] The latest commit "f4687993c53a5339e" caused inline image preview try to convert PDF file link
  2020-08-17  2:19 [BUG] The latest commit "f4687993c53a5339e" caused inline image preview try to convert PDF file link numbchild
@ 2020-08-17  6:15 ` Nicolas Goaziou
  2020-08-17 10:05   ` [SOLVED] " numbchild
  2020-08-22  0:12   ` [PROBLEM] The commit "e1f09607e0" caused org-mode " numbchild
  0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2020-08-17  6:15 UTC (permalink / raw)
  To: numbchild@gmail.com; +Cc: Org-mode

Hello,

"numbchild@gmail.com" <numbchild@gmail.com> writes:

> The latest commit "f4687993c53a5339e" added "pdf" file type into inline
> image rules.

No, it doesn't. "pdf" was already in the list before this commit.

> This caused org-toggle-inline-image try to convert large PDF
> into png images. Caused very long time suspend.

You can customize the variable and remove "pdf".

Regards,
-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SOLVED] Re: [BUG] The latest commit "f4687993c53a5339e" caused inline image preview try to convert PDF file link
  2020-08-17  6:15 ` Nicolas Goaziou
@ 2020-08-17 10:05   ` numbchild
  2020-08-22  0:12   ` [PROBLEM] The commit "e1f09607e0" caused org-mode " numbchild
  1 sibling, 0 replies; 7+ messages in thread
From: numbchild @ 2020-08-17 10:05 UTC (permalink / raw)
  To: numbchild@gmail.com, Org-mode

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

Aha, I checkout that commit again, indeed, pdf exist before. Weird, When I
revert this commit. The issue is gone. This is weird. Do you have same
problem?

Hmm, I tried to pull again, Now with the latest commit. The problem is
gone. I guess I must messed something up when I debug org-link-beautify.
Anyway, It's my fault, I have not confirmed this bug before minimal emacs
config. Sorry about that. Nicolas.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Mon, Aug 17, 2020 at 2:15 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> "numbchild@gmail.com" <numbchild@gmail.com> writes:
>
> > The latest commit "f4687993c53a5339e" added "pdf" file type into inline
> > image rules.
>
> No, it doesn't. "pdf" was already in the list before this commit.
>
> > This caused org-toggle-inline-image try to convert large PDF
> > into png images. Caused very long time suspend.
>
> You can customize the variable and remove "pdf".
>
> Regards,
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 2313 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PROBLEM] The commit "e1f09607e0" caused org-mode inline image preview try to convert PDF file link
  2020-08-17  6:15 ` Nicolas Goaziou
  2020-08-17 10:05   ` [SOLVED] " numbchild
@ 2020-08-22  0:12   ` numbchild
  2020-08-22 13:03     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: numbchild @ 2020-08-22  0:12 UTC (permalink / raw)
  To: numbchild@gmail.com, Org-mode; +Cc: Emacs developers


[-- Attachment #1.1: Type: text/plain, Size: 1698 bytes --]

Because this problem involved Emacs, so I Cc Emacs mailing list too.

The problem is the commit "e1f09607e0" auto convert PDF file link in Org
Mode when toggle inline image display. This used 100% of CPU by "gs"
command.

Hi @Nicolas:

I finally figured out the reason.
I'm using the latest "master" branch source code compiled Emacs. And it add
new feature to convert possible image files.
The commit "e1f09607e0" caused this problem. I confirmed by git checkout a
commit before it. And re-eval source code, then the problem is gone. This
is because the commit added ~image-converter-file-name-extensions~ in
image-convert.el library which includes "pdf" file extension. It uses
command "gs" to convert pdf to image which use 100% of CPU.

[image: image.png]

I thinked about this problem, maybe this should modify code in Org Mode
side to exclude new ~image-converter-file-name-extensions~.

Or does anyone have better solution?

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Mon, Aug 17, 2020 at 2:15 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> "numbchild@gmail.com" <numbchild@gmail.com> writes:
>
> > The latest commit "f4687993c53a5339e" added "pdf" file type into inline
> > image rules.
>
> No, it doesn't. "pdf" was already in the list before this commit.
>
> > This caused org-toggle-inline-image try to convert large PDF
> > into png images. Caused very long time suspend.
>
> You can customize the variable and remove "pdf".
>
> Regards,
> --
> Nicolas Goaziou
>

[-- Attachment #1.2: Type: text/html, Size: 3527 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 879945 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PROBLEM] The commit "e1f09607e0" caused org-mode inline image preview try to convert PDF file link
  2020-08-22  0:12   ` [PROBLEM] The commit "e1f09607e0" caused org-mode " numbchild
@ 2020-08-22 13:03     ` Lars Ingebrigtsen
  2020-08-22 13:29       ` [SOLVED] " numbchild
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-22 13:03 UTC (permalink / raw)
  To: numbchild; +Cc: Org-mode, Emacs developers

"numbchild@gmail.com" <numbchild@gmail.com> writes:

> The commit "e1f09607e0" caused this problem. I confirmed by git
> checkout a commit before it. And re-eval source code, then the problem
> is gone. This is because the commit added
> ~image-converter-file-name-extensions~ in image-convert.el library
> which includes "pdf" file extension. It uses command "gs" to convert
> pdf to image which use 100% of CPU.

I think image-converter.el should have a list of types that it shouldn't
attempt to convert, even if the backend says that it can.  PDF/PS are
obvious things -- they aren't images, but imagemagick will offer to
display them anyway.

I'll add that to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [SOLVED] Re: [PROBLEM] The commit "e1f09607e0" caused org-mode inline image preview try to convert PDF file link
  2020-08-22 13:03     ` Lars Ingebrigtsen
@ 2020-08-22 13:29       ` numbchild
  2020-08-22 13:44         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: numbchild @ 2020-08-22 13:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Org-mode, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Thanks Lars. I will wait for new update in Emacs source code, then
re-compile Emacs.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Sat, Aug 22, 2020 at 9:03 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:

> "numbchild@gmail.com" <numbchild@gmail.com> writes:
>
> > The commit "e1f09607e0" caused this problem. I confirmed by git
> > checkout a commit before it. And re-eval source code, then the problem
> > is gone. This is because the commit added
> > ~image-converter-file-name-extensions~ in image-convert.el library
> > which includes "pdf" file extension. It uses command "gs" to convert
> > pdf to image which use 100% of CPU.
>
> I think image-converter.el should have a list of types that it shouldn't
> attempt to convert, even if the backend says that it can.  PDF/PS are
> obvious things -- they aren't images, but imagemagick will offer to
> display them anyway.
>
> I'll add that to Emacs 28.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>

[-- Attachment #2: Type: text/html, Size: 2275 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [SOLVED] Re: [PROBLEM] The commit "e1f09607e0" caused org-mode inline image preview try to convert PDF file link
  2020-08-22 13:29       ` [SOLVED] " numbchild
@ 2020-08-22 13:44         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-22 13:44 UTC (permalink / raw)
  To: numbchild; +Cc: Org-mode, Emacs developers

"numbchild@gmail.com" <numbchild@gmail.com> writes:

> Thanks Lars. I will wait for new update in Emacs source code, then re-compile
> Emacs.

The fix has been pushed already.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-22 13:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17  2:19 [BUG] The latest commit "f4687993c53a5339e" caused inline image preview try to convert PDF file link numbchild
2020-08-17  6:15 ` Nicolas Goaziou
2020-08-17 10:05   ` [SOLVED] " numbchild
2020-08-22  0:12   ` [PROBLEM] The commit "e1f09607e0" caused org-mode " numbchild
2020-08-22 13:03     ` Lars Ingebrigtsen
2020-08-22 13:29       ` [SOLVED] " numbchild
2020-08-22 13:44         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).