From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#23141: 25.1.50; emacsclient.desktop Date: Tue, 29 Mar 2016 12:10:00 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459246288 7417 80.91.229.3 (29 Mar 2016 10:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2016 10:11:28 +0000 (UTC) To: 23141@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 12:11:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akqcE-0007rW-Dh for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 12:11:14 +0200 Original-Received: from localhost ([::1]:45643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqcD-0002uz-Lp for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2016 06:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqc7-0002qy-Uh for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:11:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akqc1-0003M5-Vk for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:11:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqc1-0003M1-S2 for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akqc1-00072e-Ou for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Helmut Eller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Mar 2016 10:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145924622326993 (code B ref -1); Tue, 29 Mar 2016 10:11:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2016 10:10:23 +0000 Original-Received: from localhost ([127.0.0.1]:42867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akqbO-00071J-Fr for submit@debbugs.gnu.org; Tue, 29 Mar 2016 06:10:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akqbN-000715-7C for submit@debbugs.gnu.org; Tue, 29 Mar 2016 06:10:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akqbE-00030m-Uq for submit@debbugs.gnu.org; Tue, 29 Mar 2016 06:10:16 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqbE-00030i-R4 for submit@debbugs.gnu.org; Tue, 29 Mar 2016 06:10:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqbA-0001Mv-Uo for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:10:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akqb5-0002tB-0l for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:10:08 -0400 Original-Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akqb4-0002t1-R2 for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 06:10:02 -0400 Original-Received: by mail-wm0-x241.google.com with SMTP id i204so2093836wmd.0 for ; Tue, 29 Mar 2016 03:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=nMl7oyZrN8HBy3s9A7gGr8X+Q9GYB4LRdx+J15w9L8M=; b=hyTJTsTFiRIRKMazvgA5nnHfNbHzp5zhlgHhOt5m3FR6hI8hbhJrF+INP43jtPfUzh 8BEctHCw2mwOVXp0RLT3oWgS+5qFotVV9R46j99NhQ7FJQHK5ZbAdidlfpWKRQA0zqyj /sco51mte/jwx0wtzOEaS7Nbhl7gUL3IcO284SfpxEeGXqNTFNkHtlx3X3si9Gxqxgx/ 3hzoPkbV9JDsRhIp8LqlvJAfNfon4BQrodZHuwGsTvyWtPsBf6Jixp9nwKbX9gpZha4p WgoEfObSQ6Vs5+8N7V9MwcRMx0jg0kPT2Mzwb8+tv89zwmwgRauFPE8w1wQlf/fT6c0N /7CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=nMl7oyZrN8HBy3s9A7gGr8X+Q9GYB4LRdx+J15w9L8M=; b=Td34Rtyp0VvdEdqlF1DBR/ttmlNQ441ihquS2oJPXVpQvB4P0Wu19k5P+fDv9u4ipf DNv3wFRgObdaan0VRu1VpPIrloWKEMhR0t/LMCQtAWiRSHoEc//AuDJmM+kuVZURsiO9 Q4HTml3p/Qqxxt5DPktxZTyF5CNKIRqJEYAtaU14o1h+7oE9PY5PhiUcgC0RJEt4StSf gutg/Ff4nKl53BJXOwHGsWay9ucP2kPObAKtdGfny7xM+bklLZx55cN3Dgc6uJR2pwe4 mOZ9JM6kUqSy4Hgue/9OC2ZSFLoa1Uk/TI2kfmVtUoSyjmhgjQgwukP2VHAcvbZk2eLK iYCA== X-Gm-Message-State: AD7BkJJK/62c3ijZKXrx9plh1ospVIST/+UeWxRD6syU+1WIcGry4Us8PSWKWeJBYC7tXw== X-Received: by 10.28.179.84 with SMTP id c81mr15171836wmf.13.1459246202089; Tue, 29 Mar 2016 03:10:02 -0700 (PDT) Original-Received: from ix (dial-190218.pool.broadband44.net. [212.46.190.218]) by smtp.gmail.com with ESMTPSA id av3sm28614226wjc.44.2016.03.29.03.10.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 03:10:01 -0700 (PDT) Original-Received: from helmut by ix with local (Exim 4.84) (envelope-from ) id 1akqb2-0000oo-AK for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2016 12:10:00 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115693 Archived-At: It would be useful to have a emacsclient.desktop file, because that makes it possible to use emacsclient with docks/panels or the "Open with" menu in some file managers. Emacs already comes with emacs.desktop file, but that starts a new Emacs process every time. The emacsclient.desktop should use an existing Emacs if there is one or start a new Emacs if there is none. I created my own emacsclient.desktop (see below) but I think many people would like something like that and it would be more efficient to ship a good emacsclient.desktop with Emacs. My version uses two (perhaps not so obvious) tricks: 1) the "-a emacs" part starts a new Emacs if no existing Emacs process can be found 2) adding +0 makes it possible to start emacsclient without file argument. Emacs will then switch to the scratch buffer. [Desktop Entry] Name=Emacsclient Comment=Tells a running Emacs to visit a file Exec=emacsclient -a emacs --no-wait +0 %F Icon=emacs24 Terminal=false MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; Type=Application Categories=Utility;Development;TextEditor;