Subject: Re: bug#26432: Acknowledgement (image-dired: Adding support for PDF thumbnails.)

From: Keith David Bershatsky <[email-masked]>
Date: Wed, 23 Oct 2019 20:27:43 -0700

The attached proof concept patch applies to the master branch as of 10/23/2019 bearing commit 53e7a763dd16509d90418bdf14d161db13271ea3.

I spent a couple of hours today fiddling around with a current version of image-dired.el, but I was not able to figure out how to get feature 26432 to work properly.  My problems had something do with the need for a return value from image-dired-create-thumb and the old way of doing things processed subprocesses consecutively using call-process, whereas the current way of doing things uses start-process and run-at-time ....  After unsuccessfully spinning my wheels, I went ahead and reverted the relevant functions in image-dired to where it was several years ago so that I could still use call-process and get a return value from image-dired-create-thumb; e.g., things like:

  (not (= 0 (image-dired-create-thumb file thumb-name)))

and

  (not (= 0 (image-dired-create-thumb curr-file thumb-name)))

I performed the following tests after applying the attached patch:

M-x image-dired:  On a directory containing a few PDF, PNG, JPG files.

M-x image-dired-dired-toggle-marked-thumbs:  In a dired-mode buffer containing a few PDF, PNG, JPG files.

In an *image-dired* buffer, move the cursor to different images and watch the files selection change in the corresponding dired-mode buffer.

In an *image-dired* buffer, press the enter key on an image and watch an *image-dired-display-image* buffer open with a larger image.

I understand that the Emacs development team would prefer a patch that uses the current system of start-process and run-at-time; however, that would likely take me several more hours to figure out.  In terms of me signing Emacs copyright papers and so forth, I would be happy to do that whenever the Emacs development team feels that I have a contribution that rises to a programming level worthy of Emacs.  At this time, my proof concept patch is far from being ready for production ....

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [10-23-2019 03:03:29] <23 Oct 2019 12:03:29 +0200>
> From: Lars Ingebrigtsen <[email-masked]>
> To: Keith David Bershatsky <[email-masked]>
> Cc: Drew Adams <[email-masked]>, [email-masked], Glenn Morris <[email-masked]>
> Subject: Re: bug#26432: Acknowledgement (image-dired: Adding support for PDF thumbnails.)
> 
> Keith David Bershatsky <[email-masked]> writes:
> 
> > Thank you Lars and Glenn for looking into tracker #26432.  I would be
> > pleased to look at this again in the coming days and see what changes
> > I made to the functions at issue to enable this particular feature.
> > My guess is that I only added a few lines of code to existing
> > functions.
> 
> Did you make any progress here?