all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
       [not found] ` <20190922122354.5232A207FC@vcs0.savannah.gnu.org>
@ 2019-10-30 14:19   ` Robert Pluim
  2019-10-30 14:45     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2019-10-30 14:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>>>>> On Sun, 22 Sep 2019 08:23:54 -0400 (EDT), larsi@gnus.org (Lars Ingebrigtsen) said:

    Lars> branch: master
    Lars> commit 8542f666023931f85817f590926cc3e9bc992b68
    Lars> Author: Lars Ingebrigtsen <larsi@gnus.org>
    Lars> Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Lars>     Automatically rotate images in image-mode based on Exif data
    
    Lars>     * lisp/image-mode.el (image-toggle-display-image): Get the
    Lars>     orientation from the Exif data, if any.

So I attempted to visit a PNG file from emacs, and got a buffer
containing the image data, and the following in *Messages*

    Cannot display image: ((app1 (cdr (assq 65505 (exif--parse-jpeg)))))

Itʼs unclear to me whether emacs should be able to display PNG
natively here. (featurep 'png) is nil, but this is on macOS, which
allegedly has builtin support for PNG. In any case Iʼm not expecting
an error message about exif data.

Robert



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 14:19   ` master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data Robert Pluim
@ 2019-10-30 14:45     ` Lars Ingebrigtsen
  2019-10-30 16:15       ` Robert Pluim
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 14:45 UTC (permalink / raw)
  To: emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

> So I attempted to visit a PNG file from emacs, and got a buffer
> containing the image data, and the following in *Messages*
>
>     Cannot display image: ((app1 (cdr (assq 65505 (exif--parse-jpeg)))))
>
> Itʼs unclear to me whether emacs should be able to display PNG
> natively here. (featurep 'png) is nil, but this is on macOS, which
> allegedly has builtin support for PNG. In any case Iʼm not expecting
> an error message about exif data.

I'm unable to reproduce this error -- viewing png images works fine for
me.

Could you post a backtrace?  The easiest is probably to say

M-: (image-toggle-display-image)

in the .png buffer.

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



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 14:45     ` Lars Ingebrigtsen
@ 2019-10-30 16:15       ` Robert Pluim
  2019-10-30 16:18         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2019-10-30 16:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

>>>>> On Wed, 30 Oct 2019 15:45:09 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:

    Lars> Robert Pluim <rpluim@gmail.com> writes:
    >> So I attempted to visit a PNG file from emacs, and got a buffer
    >> containing the image data, and the following in *Messages*
    >> 
    >> Cannot display image: ((app1 (cdr (assq 65505 (exif--parse-jpeg)))))
    >> 
    >> Itʼs unclear to me whether emacs should be able to display PNG
    >> natively here. (featurep 'png) is nil, but this is on macOS, which
    >> allegedly has builtin support for PNG. In any case Iʼm not expecting
    >> an error message about exif data.

    Lars> I'm unable to reproduce this error -- viewing png images works fine for
    Lars> me.

    Lars> Could you post a backtrace?  The easiest is probably to say

    Lars> M-: (image-toggle-display-image)

Debugger entered--Lisp error: (error "The buffer is not in Image mode")
  signal(error ("The buffer is not in Image mode"))
  error("The buffer is not in Image mode")
  image-toggle-display-image()
  eval((image-toggle-display-image) t)
  eval-expression((image-toggle-display-image) nil nil 127)
  funcall-interactively(eval-expression (image-toggle-display-image) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

which is a whole different error (although the modeline says
"(Fundamental Image)"

Robert



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 16:15       ` Robert Pluim
@ 2019-10-30 16:18         ` Lars Ingebrigtsen
  2019-10-30 16:26           ` Robert Pluim
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 16:18 UTC (permalink / raw)
  To: emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

>     Lars> Could you post a backtrace?  The easiest is probably to say
>
>     Lars> M-: (image-toggle-display-image)
>
> Debugger entered--Lisp error: (error "The buffer is not in Image mode")
>   signal(error ("The buffer is not in Image mode"))
>   error("The buffer is not in Image mode")

Uhm...  try (setq major-mode 'image-mode) first or something?

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



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 16:18         ` Lars Ingebrigtsen
@ 2019-10-30 16:26           ` Robert Pluim
  2019-10-30 16:45             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2019-10-30 16:26 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

>>>>> On Wed, 30 Oct 2019 17:18:36 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:

    Lars> Robert Pluim <rpluim@gmail.com> writes:
    Lars> Could you post a backtrace?  The easiest is probably to say
    >> 
    Lars> M-: (image-toggle-display-image)
    >> 
    >> Debugger entered--Lisp error: (error "The buffer is not in Image mode")
    >> signal(error ("The buffer is not in Image mode"))
    >> error("The buffer is not in Image mode")

    Lars> Uhm...  try (setq major-mode 'image-mode) first or something?

Uhm, yes, of course. Bit of a senior moment there :-)

Debugger entered--Lisp error: (invalid-function (app1 (cdr (assq 65505 (exif--parse-jpeg)))))
  (app1 (cdr (assq 65505 (exif--parse-jpeg))))()
  exif-parse-buffer()
  image-toggle-display-image()
  eval((image-toggle-display-image) t)
  eval-expression((image-toggle-display-image) nil nil 127)
  funcall-interactively(eval-expression (image-toggle-display-image) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 16:26           ` Robert Pluim
@ 2019-10-30 16:45             ` Lars Ingebrigtsen
  2019-10-30 16:56               ` Robert Pluim
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-30 16:45 UTC (permalink / raw)
  To: emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

>     Lars> Uhm...  try (setq major-mode 'image-mode) first or something?
>
> Uhm, yes, of course. Bit of a senior moment there :-)
>
> Debugger entered--Lisp error: (invalid-function (app1 (cdr (assq 65505
> (exif--parse-jpeg)))))
>   (app1 (cdr (assq 65505 (exif--parse-jpeg))))()
>   exif-parse-buffer()

I think you may have a build error -- it sounds like exif.el was
compiled in an Emacs that didn't have when-let ;;;###autoloaded.

Try deleting exif.elc, or say "make bootstrap" and see whether the bug
goes away.

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



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 16:45             ` Lars Ingebrigtsen
@ 2019-10-30 16:56               ` Robert Pluim
  2019-10-30 19:35                 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2019-10-30 16:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

>>>>> On Wed, 30 Oct 2019 17:45:29 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:

    Lars> Robert Pluim <rpluim@gmail.com> writes:
    Lars> Uhm...  try (setq major-mode 'image-mode) first or something?
    >> 
    >> Uhm, yes, of course. Bit of a senior moment there :-)
    >> 
    >> Debugger entered--Lisp error: (invalid-function (app1 (cdr (assq 65505
    >> (exif--parse-jpeg)))))
    >> (app1 (cdr (assq 65505 (exif--parse-jpeg))))()
    >> exif-parse-buffer()

    Lars> I think you may have a build error -- it sounds like exif.el was
    Lars> compiled in an Emacs that didn't have when-let ;;;###autoloaded.

    Lars> Try deleting exif.elc, or say "make bootstrap" and see whether the bug
    Lars> goes away.

That was it. Compiling exif.el complained about when-let being
undefined, so I did 'make -C lisp autoloads', and now emacs displays
PNG fine. Sorry for the noise.

Robert



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

* Re: master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data
  2019-10-30 16:56               ` Robert Pluim
@ 2019-10-30 19:35                 ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2019-10-30 19:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> Sorry for the noise.

FWIW, I love that meta-noise,


        Stefan




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

end of thread, other threads:[~2019-10-30 19:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190922122352.13822.75583@vcs0.savannah.gnu.org>
     [not found] ` <20190922122354.5232A207FC@vcs0.savannah.gnu.org>
2019-10-30 14:19   ` master 8542f66 2/3: Automatically rotate images in image-mode based on Exif data Robert Pluim
2019-10-30 14:45     ` Lars Ingebrigtsen
2019-10-30 16:15       ` Robert Pluim
2019-10-30 16:18         ` Lars Ingebrigtsen
2019-10-30 16:26           ` Robert Pluim
2019-10-30 16:45             ` Lars Ingebrigtsen
2019-10-30 16:56               ` Robert Pluim
2019-10-30 19:35                 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.