From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?G=C4=B3s?= Hillenius Newsgroups: gmane.emacs.bugs Subject: bug#38314: No /usr/share/applications mailto presence Date: Tue, 11 Aug 2020 15:18:17 +0200 Organization: Using Emacs' Org Mode Message-ID: <87d03x5nja.fsf@hillenius.net> References: <87tv6xnnds.8.fsf@jidanni.org> <87zhgoqby5.fsf@gnus.org> <87lfs7sajc.8.fsf@jidanni.org> <87r21ypzj9.fsf@gnus.org> <87v9r8b4go.5.fsf@jidanni.org> <871rttfrod.fsf@gnus.org> <87sgd0c4xt.fsf@gnus.org> <87mu38c4tm.fsf@gnus.org> <87sgct5oko.fsf@hillenius.net> <87h7t9wcx1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29264"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 38314@debbugs.gnu.org Cancel-Lock: sha1:YFspxauz1om198ZWRtospqnaaxg= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 11 15:19:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5UBO-0007WY-Si for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Aug 2020 15:19:14 +0200 Original-Received: from localhost ([::1]:47910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5UBN-000103-Uj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Aug 2020 09:19:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5UBC-0000zT-Cl for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 09:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5UBC-0002sI-26 for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 09:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5UBB-0004wJ-UF for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 09:19:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87tv6xnnds.8.fsf@jidanni.org> Resent-From: =?UTF-8?Q?G=C4=B3s?= Hillenius Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Aug 2020 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159715191118948 (code B ref -1); Tue, 11 Aug 2020 13:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2020 13:18:31 +0000 Original-Received: from localhost ([127.0.0.1]:38943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5UAg-0004vY-UZ for submit@debbugs.gnu.org; Tue, 11 Aug 2020 09:18:31 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5UAe-0004vQ-RB for submit@debbugs.gnu.org; Tue, 11 Aug 2020 09:18:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5UAe-0000s8-LX for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 09:18:28 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:58770 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5UAb-0002op-VI for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 09:18:27 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1k5UAY-0006R4-Jw for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2020 15:18:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Operating-System: Debian GNU/Linux Sid X-Homepage: http://www.hillenius.net/ X-GPG-Fingerprint: 340F F9A4 8F6C 18FD D032 0C33 ABA1 CB30 E997 A3AF Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/11 08:55:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184645 Archived-At: On 11 August 2020 15:05 Lars Ingebrigtsen, wrote: > Gijs Hillenius writes: > >> The sample file uses: >> Exec=emacs -f message-mailto %u >> >> Would this work as well? >> Exec=/usr/bin/emacsclient.emacs-snapshot -f message-mailto >> >> I'll experiment with this once it is included in the next snapshot for Debian. > > Hm. No, it won't work, because -f in emacsclient means: > > -f, --server-file=FILENAME > use TCP configuration file FILENAME for communication. This can > also be specified via the EMACS_SERVER_FILE environment vari‐ > able. > > So I think that would be > > emacsclient -e (message-mailto) %u > > ? > > Or does the Emacs -f thing hide under a different option in emacsclient? > > Hm, no, that doesn't work, obviously, because message-mailto expects the > %u in command-line-args-left, and that's not the case here. > > So it's > > emacsclient -e '(message-mailto-1 \"%u\")' > > which has major problems with string interpolation and would be very > fragile. > > Would it make sense to add something to emacsclient/emacs-server to help > in this use case? > > So a new switch, like "-E", which means "emulate as far as possible > 'emacs -f'": > > emacsclient -E message-mailto %u > > In emacs-server, this would bind command-line-args-left to the remaining > parameters, and then funcall the function. > > I'm kinda surprised that emacsclient doesn't have something like this > already? I currently use this as my emacs-mailto-handler: /usr/bin/emacsclient.emacs-snapshot -c --eval "(browse-url-mail \"$@\")"