unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: 74467@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
	binarin@binarin.info
Subject: bug#74467: 31.0.50; org-protocol emacsclient.desktop change is not fully functional
Date: Sun, 05 Jan 2025 18:36:45 +0000	[thread overview]
Message-ID: <87r05hnm4i.fsf@localhost> (raw)
In-Reply-To: <87wmf9t9hm.fsf@>

Björn Bidar <bjorn.bidar@thaodan.de> writes:

>> -Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F
>> +Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %U
>
> Do we need the shell code here? if DISPLAY is defined emacsclient could
> shurely forward it to Emacs.

I think that reasons why sh is there have nothing to do with the issue
at hand.

> Shellcode is part of the issue.

How so?
The first message in this thread described exactly why the old version
stopped working:

    On 2023-10-03 there was a change introduced in xdg-utils
    https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=b9d3ecf8180c57dbb5ca47253898ba0553e81c60
    to more strictly follow xdg specification, and only pass URL-like
    arguments to programs that explicitly requested this by using '%u' or
    '%U' parameters.

After the above change, %F in our .desktop file prevents xdg-open from
using it for opening URIs. Any URIs, not just org-protocol and co.

So, %U should fix it, except that it will also signal to xdg-open that
Emacs can handle file:// URI as well; so we need to make sure that
file:// URIs can be opened just fine.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





  parent reply	other threads:[~2025-01-05 18:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 18:53 bug#74467: 31.0.50; org-protocol emacsclient.desktop change is not fully functional Alexey Lebedeff via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 13:12 ` Eli Zaretskii
2024-11-23 19:58   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-07 12:17   ` Eli Zaretskii
2024-12-16 19:34   ` Ihor Radchenko
2024-12-16 20:01     ` Eli Zaretskii
2024-12-16 21:07       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]       ` <87o71bgwvl.fsf@>
2024-12-17 12:15         ` Eli Zaretskii
2024-12-17 13:00           ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-28 11:37       ` Eli Zaretskii
2025-01-02 20:02         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]         ` <87zfk9q91e.fsf@>
2025-01-04 13:18           ` Eli Zaretskii
2025-01-04 22:07             ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]             ` <877c7aw7va.fsf@>
2025-01-05  6:39               ` Eli Zaretskii
2025-01-05  8:55                 ` Ihor Radchenko
2025-01-05 18:13                   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                   ` <87wmf9t9hm.fsf@>
2025-01-05 18:36                     ` Ihor Radchenko [this message]
2025-01-05 21:31                       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                       ` <87cyh1t0ag.fsf@>
2025-01-06 18:44                         ` Ihor Radchenko
2025-01-07  8:05                           ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-05 18:20                 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                 ` <87sepxt953.fsf@>
2025-01-05 19:11                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r05hnm4i.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=74467@debbugs.gnu.org \
    --cc=binarin@binarin.info \
    --cc=bjorn.bidar@thaodan.de \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).