application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY"But instead, org opens the script file using /bin/less, not emacs.
diffI no longer observe the misbehavior described in #2 and #4. Instead, org works as expected, like it does with #5, and opens the script file in emacs, not /bin/less.
8701c8700
< (_ org-file-apps-gnu)))
---
> ('org-file-apps-gnu)))
It's possible my elpa is FUBAR. I will uninstall, rm .elc, re-install, and re-compile org 9.5.3 when I get a chance.
On 5/16/22 6:08 AM, Craig STCR wrote:
OK, I'll take a look as you suggested as soon as I can.
So the form in 9.5.2 was a bug?
The problem I encounter with the new form in 9.5.3 is that when opening a shell script -- no file extension, e.g. /home/user/myscript -- 9.5.2 would consult mailcap and open the script in Emacs. The mailcap entry is:
application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY"But with the new form in 9.5.3, /home/user/myscript is opened by /bin/less, not emacs. I assume mailcap is not consulted. Which does not work well. These behaviors are only for org. Outside of org, emacs behaves correctly.
I'll take a look as you suggested as soon as I can.
Thanks, Ihor.
On 5/16/22 4:33 AM, Ihor Radchenko wrote:
Craig STCR <craig.stcr1@gmail.com> writes:9.5.3 does not return org-file-apps-gnu because org-file-apps-gnu is not quoted. Should be (and was in 9.5.2): 'org-file-apps-gnu but in 9.5.3 it is: _ org-file-apps-gnuPlease try to run the following form: (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) ('org-file-apps-gnu)) ;; => nil and then (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) (_ org-file-apps-gnu)) ;; => ((remote . emacs) (system . mailcap) (t . mailcap)) The second case is returning a list, which org--file-default-apps supposed to return. The previous behaviour was erroneous. You may refer to M-x describe-function <RET> pcase <RET> to understand the code. Please, provide more details on the actual error you ran into. The change in the org--file-default-apps is not a bug. Best, Ihor