From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: RE: emacsclient: Different --eval for emacs as alternate editor? Date: Thu, 28 Feb 2013 08:36:40 +0000 Message-ID: <3D65E04168FA09429B823CA3FE25C4473BCF664B@EXCHMBX01.fed.cclrc.ac.uk> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362070636 12864 80.91.229.3 (28 Feb 2013 16:57:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 16:57:16 +0000 (UTC) To: , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 17:57:39 2013 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 1UB6nW-00034t-2N for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 17:57:34 +0100 Original-Received: from localhost ([::1]:39920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB6nB-0006eK-5h for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 11:57:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAyzi-0001KR-2c for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 03:37:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAyzg-000480-6V for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 03:37:38 -0500 Original-Received: from engine19-1277-3.icritical.com ([93.95.13.95]:52053) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UAyzf-00047Y-U2 for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 03:37:36 -0500 Original-Received: (qmail 17079 invoked from network); 28 Feb 2013 08:38:09 -0000 Original-Received: from localhost (127.0.0.1) by engine19-1277-3.icritical.com with SMTP; 28 Feb 2013 08:38:09 -0000 Original-Received: from engine19-1277-3.icritical.com ([127.0.0.1]) by localhost (engine19-1277-3.icritical.com [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 16440-10 for ; Thu, 28 Feb 2013 08:38:08 +0000 (GMT) Original-Received: (qmail 17029 invoked by uid 599); 28 Feb 2013 08:38:06 -0000 Original-Received: from unknown (HELO exchsmtp.stfc.ac.uk) (130.246.236.11) by engine19-1277-3.icritical.com (qpsmtpd/0.28) with ESMTP; Thu, 28 Feb 2013 08:38:06 +0000 Original-Received: from EXCHMBX01.fed.cclrc.ac.uk ([169.254.3.167]) by EXCHHUB03.fed.cclrc.ac.uk ([130.246.236.11]) with mapi id 14.01.0379.000; Thu, 28 Feb 2013 08:36:40 +0000 Thread-Topic: emacsclient: Different --eval for emacs as alternate editor? Thread-Index: AQHOEc9roZKIW2Gb/0yZPZONU2NbDZiO97dQ In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.6.32] X-Virus-Scanned: by iCritical at engine19-1277-3.icritical.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 93.95.13.95 X-Mailman-Approved-At: Thu, 28 Feb 2013 11:56:59 -0500 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:89296 Archived-At: Sorry no direct answer. I had a somewhat similar problem when trying to call "org-cycle" from a mac= ro. I wanted the equivalent behaviour of C-u C-u C-u M-x org-cycle It did not work when called non interactively. I had a fruitless attempt at= using call-interactively and ended up digging the source of org-mode to fi= nd out that under the hood it did an "show-all" which is how I solved my pr= oblem. I'd be glad to know if call-interactively is meant to solve these kind of p= roblems. Regards =09 > -----Original Message----- > From: help-gnu-emacs-bounces+ronaldo.mercado=3Ddiamond.ac.uk@gnu.org > [mailto:help-gnu-emacs-bounces+ronaldo.mercado=3Ddiamond.ac.uk@gnu.org] > On Behalf Of Florian v. Savigny > Sent: 23 February 2013 14:09 > To: help-gnu-emacs@gnu.org > Subject: emacsclient: Different --eval for emacs as alternate editor? >=20 >=20 > Hi there, >=20 > this is either a question about emacs(client) commandline invocation, > or one about bookmark.el: >=20 > I have been trying to write menu entries for Fvwm which would call > either emacsclient or emacs and would take me directy to an Emacs > bookmark. I have tried the following command line: >=20 > emacsclient -c -a emacs --eval '(bookmark-jump "name")' >=20 > This only works, however, when emacsclient does not have to call emacs > instead, i.e. only if Emacs is already running and bookmark-alist is > already set. >=20 > Basically, bookmark-jump is autoloaded, and when you call it when the > bookmark list has not been loaded yet (e.g. directly after Emacs > startup), it seems to take care of that when you call it > *interactively*. It does not do that, however, when called as above. > Thus, I conclude the trick is somehow buried in the functions used in > the (interactive ...) form of bookmark-jump, i.e., bookmark-jump does > not seem to have been designed with non-interactive use in mind. >=20 > I would think it clumsy, to say the least, to pass the following form > to --eval instead: >=20 > (progn > (bookmark-load '~/.emacs.bmk' t) ; t: OVERWRITE > (bookmark-jump "name")) >=20 > I would have to overwrite because when emacs is already running, any > newly loaded bookmarks are normally added to the list, which would > basically duplicate all the bookmarks (or worse, when this happens > several times in one session) if I did not use that argument. The > overwriting, on the other hand, would destroy any new bookmarks. So > both would be crap. >=20 > The solutions I can think of are to either 1) pass different lisp code > depending on whether emacs(server) is already running or not. (The > progn form above.) Is there a standard way of doing this? Or, 2) maybe > there is some way to tell bookmark-jump to load the default bookmark > file even when it is called non-interactively? >=20 > Can anybody help? >=20 > Thanks so much! >=20 > Florian >=20 >=20 >=20 -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom