Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-15 Thread Frederic Santos
- Mail original -
> De: "Thomas Stenhaug" 
> À: "Frederic Santos" 
> Cc: "Kyle Meyer" , "Colin Baxter" , 
> "emacs-orgmode" 
> Envoyé: Mardi 15 Septembre 2020 15:43:29
> Objet: Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 
> (9.3.7-55-gba2405-elpa @
> /home/fsantos/.emacs.d/elpa/org-20200907/)]

> Ah, in that case
> 
>(push '("\\.pdf\\''" . emacs))
> 
> might be what you're looking for.

Very nice, many thanks Thomas ! ;) This works fine for me.
For reference, I've also posted your solution on StackExchange.

Cheers,
Frédéric



Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-15 Thread Thomas Stenhaug



Frédéric Santos  writes:


Le 2020-09-15 à 11:15:48 CEST, Thomas Stenhaug a écrit :

I recently had the same problem, on Arch Linux with Emacs 27.1. 
If you
run xdg-open from an eshell, the problem should be the same. 
It should

also go away if you replace "xdg-open" with "setsid xdg-open".

I ended up doing

  (push '("\\.pdf\\'" . "evince %s") org-file-apps)

to solve it for my case.


Hi Thomas (and others),

Thanks for your answer! This does work... in some way. In the 
sense that
it manages to open evince to read the PDF outside of Emacs; but 
this
does not restore (of course) the "normal" behavior of =C-c C-e l 
o= to

display the PDF in a dedicated Emacs buffer.

I'm also on Arch/Manjaro, this might play a role... But it's not 
a big
deal anyway (and I've actually written a simple workaround in 
Elisp to

display and revert the associated PDF in its side window).


Ah, in that case

   (push '("\\.pdf\\''" . emacs))

might be what you're looking for.


Best regards,

Thomas



Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-15 Thread Colin Baxter
> Thomas Stenhaug  writes:


> I recently had the same problem, on Arch Linux with Emacs 27.1. If
> you run xdg-open from an eshell, the problem should be the same.
> It should also go away if you replace "xdg-open" with "setsid
> xdg-open".

> I ended up doing

>   (push '("\\.pdf\\'" . "evince %s") org-file-apps)

> to solve it for my case. It would have been preferable to change
> how the default app is being resolved from "xdg-open" to "setsid
> xdg-open", but I haven't been able to.

I firgot to add that I found it necessary to get rid of the default
org-file-apps for pdf files, which I think is (was?) docview. So I use: 

#+begin_src elsp
(add-hook 'org-mode-hook
   (lambda () 
(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s"
#+end_src 

I don't like evince, sorry.

Best wishes,

Colin.




Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-15 Thread Frédéric Santos


Le 2020-09-15 à 11:15:48 CEST, Thomas Stenhaug a écrit :

> I recently had the same problem, on Arch Linux with Emacs 27.1. If you
> run xdg-open from an eshell, the problem should be the same.  It should
> also go away if you replace "xdg-open" with "setsid xdg-open".
>
> I ended up doing
>
>   (push '("\\.pdf\\'" . "evince %s") org-file-apps)
>
> to solve it for my case.

Hi Thomas (and others),

Thanks for your answer! This does work... in some way. In the sense that
it manages to open evince to read the PDF outside of Emacs; but this
does not restore (of course) the "normal" behavior of =C-c C-e l o= to
display the PDF in a dedicated Emacs buffer.

I'm also on Arch/Manjaro, this might play a role... But it's not a big
deal anyway (and I've actually written a simple workaround in Elisp to
display and revert the associated PDF in its side window).

Cheers,
Frédéric



Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-15 Thread Thomas Stenhaug
Kyle Meyer  writes:

> Colin Baxter writes:
>
>>> Frederic Santos  writes:
>>
>> > Hi everyone, After upgrading to Emacs 27, I noticed that, for any
>> > org document, =C-c C-e l o= now behaves on my computer as =C-c C-e
>> > l p=; i.e., the pdf is correctly produced, but is not displayed
>> > anymore on side window.
>>
>> > Several users (using various operating systems) confirmed the bug
>> > on StackExchange:
>> > 
>> https://emacs.stackexchange.com/questions/60379/c-c-c-e-l-o-does-not-open-the-pdf-anymore
>>
>> > Is there any simple workaround to solve that?
>>
>> Does not happen to me. I'm on emacs-27.1 and org-mode from git (version
>> 9.3.8 (release_9.3.8-777-g9c31cb). Perhaps try updating your org-mode.
>
> Thanks for checking.  And I can't trigger the issue with Emacs 27 and
> the commit reported in the subject (ba2405) on a GNU/Linux system.
>
> This goes through org-open-file, so it depends on the OS and system
> configuration.  Frederic, I'd recommend trying to tweak org-file-apps to
> see if you can land on something that displays the PDF again.
>
> And I think Nick's suggestion/question in the SE comment thread is a
> good one:
>
> It's probably not an emacs issue at all: what happens when you run
> usr/bin/xdg-open /home/fs/Documents/essai.pdf from the command line?

I recently had the same problem, on Arch Linux with Emacs 27.1. If you
run xdg-open from an eshell, the problem should be the same.  It should
also go away if you replace "xdg-open" with "setsid xdg-open".

I ended up doing

  (push '("\\.pdf\\'" . "evince %s") org-file-apps)

to solve it for my case. It would have been preferable to change how the
default app is being resolved from "xdg-open" to "setsid xdg-open", but
I haven't been able to.


Thomas



Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-14 Thread Kyle Meyer
Colin Baxter writes:

>> Frederic Santos  writes:
>
> > Hi everyone, After upgrading to Emacs 27, I noticed that, for any
> > org document, =C-c C-e l o= now behaves on my computer as =C-c C-e
> > l p=; i.e., the pdf is correctly produced, but is not displayed
> > anymore on side window.
>
> > Several users (using various operating systems) confirmed the bug
> > on StackExchange:
> > 
> https://emacs.stackexchange.com/questions/60379/c-c-c-e-l-o-does-not-open-the-pdf-anymore
>
> > Is there any simple workaround to solve that?
>
> Does not happen to me. I'm on emacs-27.1 and org-mode from git (version
> 9.3.8 (release_9.3.8-777-g9c31cb). Perhaps try updating your org-mode.

Thanks for checking.  And I can't trigger the issue with Emacs 27 and
the commit reported in the subject (ba2405) on a GNU/Linux system.

This goes through org-open-file, so it depends on the OS and system
configuration.  Frederic, I'd recommend trying to tweak org-file-apps to
see if you can land on something that displays the PDF again.

And I think Nick's suggestion/question in the SE comment thread is a
good one:

It's probably not an emacs issue at all: what happens when you run
usr/bin/xdg-open /home/fs/Documents/essai.pdf from the command line?



Re: Bug: =C-c C-e l o= does not open the pdf anymore [9.3.7 (9.3.7-55-gba2405-elpa @ /home/fsantos/.emacs.d/elpa/org-20200907/)]

2020-09-14 Thread Colin Baxter
> Frederic Santos  writes:

> Hi everyone, After upgrading to Emacs 27, I noticed that, for any
> org document, =C-c C-e l o= now behaves on my computer as =C-c C-e
> l p=; i.e., the pdf is correctly produced, but is not displayed
> anymore on side window.

> Several users (using various operating systems) confirmed the bug
> on StackExchange:
> 
https://emacs.stackexchange.com/questions/60379/c-c-c-e-l-o-does-not-open-the-pdf-anymore

> Is there any simple workaround to solve that?

Does not happen to me. I'm on emacs-27.1 and org-mode from git (version
9.3.8 (release_9.3.8-777-g9c31cb). Perhaps try updating your org-mode.

Best wishes