From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.devel Subject: GUI X-FreeDesktop integration Date: Thu, 13 May 2021 23:18:25 -0400 Message-ID: <20210514031825.zcgswqzuxrkktrgs@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39613"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 To: Emacs-Devel List Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 14 05:19:26 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lhOMH-000ABH-Oh for ged-emacs-devel@m.gmane-mx.org; Fri, 14 May 2021 05:19:25 +0200 Original-Received: from localhost ([::1]:46514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhOMG-0007qR-Iy for ged-emacs-devel@m.gmane-mx.org; Thu, 13 May 2021 23:19:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhOLQ-0006NI-Mm for emacs-devel@gnu.org; Thu, 13 May 2021 23:18:32 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:47369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhOLO-0007aL-Fz for emacs-devel@gnu.org; Thu, 13 May 2021 23:18:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620962308; bh=UcTrmN1qzUz/Ac0YCLOdrlxXGL1fxd5fEx2SMsq8yyE=; h=X-UI-Sender-Class:Date:From:To:Subject; b=MOAkXES2YwMiMwah40hC+lvE11sG/ispCLd4fGeGgG+Tw5Qy+7/bT4ikLakbnnAKu suPop7Scwx6IhbYVHKniQAfG/4jhgK8mRWyJhwCA9DuzRi3f/9ooBagSaFZBwvSovg rlDXu5p3A1JZdTM1leveULsaAEX+knXJTQEkZ9S0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([96.224.230.212]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N4z6q-1lXFSR3Y1s-010rRv for ; Fri, 14 May 2021 05:18:28 +0200 Content-Disposition: inline X-Provags-ID: V03:K1:xYoT4EoHfgkQJMlE9IQSpkYywGO/3z8MLr6SR1Z+63tMAU1HL/G PH2FZCj8p4yjWw91IksfvTLJIZFJU9rOXYFw/wz6Fl9ARLupnBMz6M1rXvZJLZxVUfqLK16 Ez7jxTO8gq1DoDnfXedwnWLrTwwk47y67BRMZosMAvTQ4GF2dbsHAjhBaGq2LVrt0hCOk8k jY82uoZlLkX4wetFiR/Uw== X-UI-Out-Filterresults: notjunk:1;V03:K0:9H01RUnh/iU=:TPVGUqE44F39IdGj7oSPIK ZR5kJYhKrFDVpIKY1EGA8vCWUhZWqLUq3F99LU9xA61rvJF8Rksui5Clzqz3Qt99yAtoJeSZD CUBzFweAL3+vZTOpbZtGM6/U1+C1t+zqcsKPMIe0P2MQ8O19gu9s7XUyKlIXvfrANHEXB63Km Wen1LCdXY3zGUIt57727yKb+g/3NfHd7pZoHGO+g1+IwIm9GfG6JGIwjB/PrCAq2k96Z1V4le PTtvRIKK3G/FfQxNESmq3zIqEr4tj1LBW7ujsAfCj38a4PwR/i6Yp4UW/g8kzLFPubdcOmvjM cVUMaCox+EK+3jBqgNly0QQR0c+hXPSAniGwv0HqjBjt1+xALnjwI+GqF//myD/Z53+KgvSja D4TYoj5bFYLUC4lUINcp+V2+svRhcue7YqxRr5OxS8GD/z2Dkzx0Fv26lWYTE3R+eR3AwdHGp dKz+THg4UW1ByQz/EMOS7uhHAHxNqOTLWSnebE5kg10y1kw06/df9x+i/Wvt/8Gc2CaXcnLve +l33fiq0gluUPzshE451/+073Pq2EEB06kXBrBQ79LABMXSVfIglhvFFzgg60QsFweTx75hXP 0LbfWCUwdH3pHPHNtXqzTxRtFe8VcO5k6SSdsuYxkqMM8NRkxKuXfC19TQFYCTzWYUxjSqfAC XFzqWWo5/O2F2RArbE5RNbg7qAcNg6cr8DkKd2iU+XniRoHbXfD+R2jRhPMpZNqUoe23FzlkW mrVMD+P0Z4/aW/VyY1Cltq45ar45aaCKpFjYaWtiJoQIXb+AAZ4MG2uTWaEQf5MnmfjrEp42 Received-SPF: pass client-ip=212.227.17.21; envelope-from=boruch_baum@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269264 Archived-At: I found myself today using GUI emacs 27.1, and was surprised that it wasn't at all integrated with the (debian) linux desktop. It doesn't seem like a big deal to make part of a standard install, but in the context of 'trying to make emacs easier' it would go a long way. I never know when I post on this list whether something has already been either done or flat-out rejected sometime in the past, oh, 30 years?, but here's a simple two-step proposal to accomplish the type of integration I think *ALL* newcomers would expect when installing GUI emacs (ie. when one selects file(s) in a file manager, they are opened in Emacs). Step 1: New file: /usr/share/applications/emacsclient.desktop #+begin_src conf [Desktop Entry] Name=3DEmacsclient GenericName=3DConnect to an Emacs server X-GNOME-FullName=3DConnect to an Emacs server Encoding=3DUTF-8 Version=3D1.0 Comment=3DConnect to an Emacs server using emacsclient NoDisplay=3Dfalse Exec=3D\emacsclient -c --alternate-editor=3D"" --eval "(pick-a-suitable-na= me \"%F\")" Terminal=3Dfalse X-MultipleArgs=3Dfalse Type=3DApplication Icon=3Demacs Categories=3DOffice;Development StartupWMClass=3DEmacs StartupNotify=3Dtrue # MimeType=3D #+end_src Step 2: New function: pick-a-suitable-name #+BEGIN_SRC emacs-lisp (defun pick-a-suitable-name (&optional files) "Integrate GUI Emacs with XFreeDesktop" ;; Do optional 'stuff' ;; Do other optional 'stuff' (dolist (file (split-string (substring files 1 -1) "' '")) (find-file file)) ;; Do more optional 'stuff' ) #+END_SRC I'll cross-post this on the debian list for their own independent consider= ation. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0