From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: Proposal: emacsclient --readonly Date: Tue, 26 Mar 2013 19:02:07 -0700 (PDT) Message-ID: <1364349727.76978.YahooMailNeo@web160905.mail.bf1.yahoo.com> References: <87zjxtq304.fsf@michael-laptop.hsd1.ma.comcast.net> <1364142142.92134.YahooMailNeo@web160904.mail.bf1.yahoo.com> <1364266566.22342.YahooMailNeo@web160905.mail.bf1.yahoo.com> Reply-To: Michael Mauger NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1364349733 24818 80.91.229.3 (27 Mar 2013 02:02:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Mar 2013 02:02:13 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 27 03:02:40 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UKfhG-00031C-Lt for ged-emacs-devel@m.gmane.org; Wed, 27 Mar 2013 03:02:38 +0100 Original-Received: from localhost ([::1]:43953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKfgs-0004Mf-PE for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2013 22:02:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKfgn-0004Lh-RD for emacs-devel@gnu.org; Tue, 26 Mar 2013 22:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKfgm-0003xU-Og for emacs-devel@gnu.org; Tue, 26 Mar 2013 22:02:09 -0400 Original-Received: from nm21-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.137]:45836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKfgm-0003xH-4q for emacs-devel@gnu.org; Tue, 26 Mar 2013 22:02:08 -0400 Original-Received: from [98.139.212.151] by nm21.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2013 02:02:07 -0000 Original-Received: from [98.139.215.250] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2013 02:02:07 -0000 Original-Received: from [127.0.0.1] by omp1063.mail.bf1.yahoo.com with NNFMP; 27 Mar 2013 02:02:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 315353.76496.bm@omp1063.mail.bf1.yahoo.com Original-Received: (qmail 95025 invoked by uid 60001); 27 Mar 2013 02:02:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1364349727; bh=PPTWeYQ4vPRb43+GASzzQX+bN16cG9XrkJgdTrL4X0c=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BYSiJZeLBz7wxl/j8GJIuB+pThifcY20sY/hYQNV7LtkqW2LCffmQNiIKrfqvTFAa+np/N/com7xr2FyX4K6KTjekriGO/au7Tg+SnvF+Mw1JquxK2eFasBez1Sh8FR93xtVQMkmee8Z9etH3QwCpuVI9xJKUTjDSPoAvrN+Y7o= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Z9sR0KIcTAfzzsb95g0JKoRrdxvgUbBkoD7+2iMQlRGVYFkQ1pPNBQXoEkiriQnwldPL5tMjbpwmPAAWQLGVEr1uRC0LOv2depY8Sb6NUcmC+KJ9vFmjqtkP0ZOOzUrD9/eIaUZvu9p365aergOJeO9cyZU2H1EkH994nYPeNd8=; X-YMail-OSG: qfmpOPEVM1kBw7cYhiwfkoUXMKxwcNEodCvkoTlV5R0005q rjJN48Lq8ZlYtx3WGA2VYqUGg_fnfDm75UEcmr_CviNgDYBSgm6v5_l99lqN _TmgmbuZ.QFMv9whUEQDqhCDoRIHJIZoN2G017QWv4LYH6tv_93fzuJcw0dF zNl0PfcWgMaj6eIjys8irBJ9vBrk8j8449gYfueOLpHw_7Win.WW6GkzRBNs 9p7fYKU0MulSLZSZ84zxjtoeA6cQhm6q.1MjBl.lctQoyJ9DtH3NaXe3b2U3 6xqR._iJV.CR_hFRezEcT7coH38x45J5.hKe114iIpFHf1GBw_hcZHqBlPB4 PJsTrktuxEqes1I3KyYO2R5sg334VIpP.YA6A6Xxgxv6.EqGwzCJBp73KX7Z 5CZTtf5uBsIqhxR0TzpiRCT5xxCULNZqWvLnLpXEtTjFPxifyY9hdRm4nGae m2J5PJ6uonquHX1lHw5K2BsFinEBB.pqY0AsxjDLsdn72WSp8oNGdG6.nIL8 mKcY- Original-Received: from [98.216.52.54] by web160905.mail.bf1.yahoo.com via HTTP; Tue, 26 Mar 2013 19:02:07 PDT X-Rocket-MIMEInfo: 002.001, PiBGcm9tOiBTdGVmYW4gTW9ubmllciA8bW9ubmllckBpcm8udW1vbnRyZWFsLmNhPgoKPgo.PiAgTXkgZ3Vlc3MgaXMgdGhhdCB0aGUgc2VydmVyLWN1c3RvbS1vcHRpb24tZnVuY3Rpb24gd291bGQgc2NhbiB0aGUKPj4gIGluY29taW5nIGxpc3Qgb2Ygb3B0aW9ucyBmb3IgdGhlIC1ub3dhaXQgZW50cnkgYmVjYXVzZSB0aGF0IHdpbGwKPj4gIGRldGVybWluZSBvdXIgZXhpdCBhY3Rpb24uCj4gCj4gSG1tLi4uIHdoeSBkbyB3ZSBjYXJlIGFib3V0IC1ub3dhaXQ_Cj7CoAoKSWYgdGhlcmUgaXMgYW4gZW1hY3MBMAEBAQE- X-RocketYMMF: mmaug X-Mailer: YahooMailWebService/0.8.139.530 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 98.139.213.137 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158257 Archived-At: > From: Stefan Monnier =0A=0A>=0A>> My guess is = that the server-custom-option-function would scan the=0A>> incoming list o= f options for the -nowait entry because that will=0A>> determine our exit = action.=0A> =0A> Hmm... why do we care about -nowait?=0A>=A0=0A=0AIf there = is an emacsclient waiting for us to finish, then we have to call=0Aserver-b= uffer-done.=0A=0A> But I think your design is too narrowly constrained by t= he needs you see=0A> now.=A0 I think we should aim for a design that could = at least accommodate=0A> some of the features currently hard-coded such as = --eval.=0A> =0A> Ideally it should also accommodate something like "--diff = FILE1 FILE2"=0A> which would call `diff' on the two files and might even be= made to=0A> accept "--diff FILE1 FILE2 FILE3" to do a 3-way merge.=0A>=A0= =0A=0A=A0Okay at least we're sorta on the same page. =A0I had been thinking= about=0A--diff at one point and the issues got very messy fast. =A0So here= 's my=0Athinking, let me know if you think I should continue:=0A=0AIn the C= code, if there are any unrecognized options they will be sent over=A0=0Aas= a -custom option followed by the non-option parameters as -args=0A=0AOn th= e server side, the elisp will call the handler for each -custom option=A0= =0Aand=A0pass the args along with it. =A0The handler can pull off the args = it needs. =A0=0AIf=A0there are any arguments left over, then they will be p= assed either to=A0=0A--eval or=A0treated as files.=0A=0AThe other required = change will be to break out some of the file=A0processing=0Aso that the log= ic can be reused in custom options.=A0=0A=0A* file-name generation=0A=0A* v= isit a file=0A=0AThis will make the change more complex but won't really al= ter the=A0=0Abehavior,=A0just refactor it so it's more useful to custom opt= ions.=0A=0AI should have a prototype in a day or two, unless you think I'm = still=A0=0Amissing=A0the mark.=0A=0A-- Michael