From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: emacsclient not integrated into modern window systems Date: Sat, 11 Jul 2015 05:24:56 -0700 (PDT) Message-ID: <7ad85162-928f-4dbe-ad90-5223dc8c4f72@googlegroups.com> References: <61e558ef-6edb-4fd5-af12-7fa0d470c9c4@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1436617520 16298 80.91.229.3 (11 Jul 2015 12:25:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jul 2015 12:25:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 11 14:25:20 2015 Return-path: Envelope-to: geh-help-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 1ZDtqJ-0003nd-PD for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jul 2015 14:25:19 +0200 Original-Received: from localhost ([::1]:47884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDtqJ-0004Td-8k for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jul 2015 08:25:19 -0400 X-Received: by 10.66.90.163 with SMTP id bx3mr32490866pab.28.1436617497528; Sat, 11 Jul 2015 05:24:57 -0700 (PDT) X-Received: by 10.50.66.141 with SMTP id f13mr73747igt.4.1436617497496; Sat, 11 Jul 2015 05:24:57 -0700 (PDT) Original-Path: usenet.stanford.edu!i4no831917ige.0!news-out.google.com!t2ni7218igk.0!nntp.google.com!i4no831916ige.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.94.115.119; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.94.115.119 User-Agent: G2/1.0 Injection-Date: Sat, 11 Jul 2015 12:24:57 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213312 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105599 Archived-At: On Saturday, July 11, 2015 at 5:50:12 PM UTC+5:30, Vaidheeswaran C wrote: > I am on Debian Wheezy and I can "Open With" both emacs or gnuclient. > > /usr/share/applications/gnuserv.desktop > /usr/share/applications/emacs23.desktop > > I also remember playing around with text editor alternatives sometime > back. > > https://wiki.debian.org/DebianAlternatives > > Shouldn't you raise the issue with your specific distribution? > > > On Saturday 11 July 2015 08:54 AM, Rusi wrote: > > Student of mine asked me if its possible to have emacs open from the file browser. [By default it opens with gedit] > > For 1/2 hour we tried to find properties/open-with etc to make it emacsclient > > but to no avail > > > > After a lot of struggle the best I came up with was the below steps. > > So... If installing emacs (using say apt) makes emacs an established app to open > > (some) mimetypes, why is emacsclient not setup similarly? > > > > [I realize that this question may be more suitable for ubuntu/gnome/ etc folks... > > Still thought I'd ask] > > > > ------------------------- > > 0. Put (server-start) into init.el > > Check that now 'emacsclient somefile' from a shell starts the same emacs > > > > 1. Put the following (between the --------- and ------------- ) > > into the file ~/.local/share/applications/emacs.desktop > > --------- > > [Desktop Entry] > > Name=EmacsClient > > GenericName=Text Editor > > Comment=Edit text > > 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++; > > Exec=emacsclient -n -a emacs %F > > Icon=emacs > > Type=Application > > Terminal=false > > Categories=Development;TextEditor; > > StartupWMClass=Emacs > > --------- > > > > 2. Now in file browser, click on a file you want opened in emacs and > > click properties -> open-with > > Here you should find 'EmacsClient' somewhere down. > > You can make it default > > > > Note: Between 1 and 2 you may need to reboot (actually logout of X-windows is enough) > > Thanks If you can open with emacsclient then probably some distros get it right and some dont. But can you open with emacsclient (not gnuclient)?