unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Mauger <michael@mauger.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Proposal: emacsclient --readonly
Date: Tue, 26 Mar 2013 19:02:07 -0700 (PDT)	[thread overview]
Message-ID: <1364349727.76978.YahooMailNeo@web160905.mail.bf1.yahoo.com> (raw)
In-Reply-To: <jwvr4j2gw4t.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>

>
>>  My guess is that the server-custom-option-function would scan the
>>  incoming list of options for the -nowait entry because that will
>>  determine our exit action.
> 
> Hmm... why do we care about -nowait?
> 

If there is an emacsclient waiting for us to finish, then we have to call
server-buffer-done.

> But I think your design is too narrowly constrained by the needs you see
> now.  I think we should aim for a design that could at least accommodate
> some of the features currently hard-coded such as --eval.
> 
> Ideally it should also accommodate something like "--diff FILE1 FILE2"
> which would call `diff' on the two files and might even be made to
> accept "--diff FILE1 FILE2 FILE3" to do a 3-way merge.
> 

 Okay at least we're sorta on the same page.  I had been thinking about
--diff at one point and the issues got very messy fast.  So here's my
thinking, let me know if you think I should continue:

In the C code, if there are any unrecognized options they will be sent over 
as a -custom option followed by the non-option parameters as -args

On the server side, the elisp will call the handler for each -custom option 
and pass the args along with it.  The handler can pull off the args it needs.  
If there are any arguments left over, then they will be passed either to 
--eval or treated as files.

The other required change will be to break out some of the file processing
so that the logic can be reused in custom options. 

* file-name generation

* visit a file

This will make the change more complex but won't really alter the 
behavior, just refactor it so it's more useful to custom options.

I should have a prototype in a day or two, unless you think I'm still 
missing the mark.

-- Michael



  reply	other threads:[~2013-03-27  2:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87zjxtq304.fsf@michael-laptop.hsd1.ma.comcast.net>
     [not found] ` <jwv38vlpnpl.fsf-monnier+emacs@gnu.org>
2013-03-24 16:22   ` Proposal: emacsclient --readonly Michael Mauger
2013-03-25 13:15     ` Stefan Monnier
2013-03-26  2:56       ` Michael Mauger
2013-03-26 13:10         ` Stefan Monnier
2013-03-27  2:02           ` Michael Mauger [this message]
2013-03-27  2:33             ` Stefan Monnier
2013-03-27 13:47               ` Michael Mauger
2013-03-30 23:03                 ` Michael Mauger
2013-09-27 18:22 Rüdiger Sonderfeld
  -- strict thread matches above, loose matches on Subject: below --
2013-03-14  2:23 michael
2013-03-14  2:45 ` W. Greenhouse
2013-03-14  3:31 ` Stefan Monnier
2013-03-24  3:45   ` Michael Mauger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364349727.76978.YahooMailNeo@web160905.mail.bf1.yahoo.com \
    --to=michael@mauger.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).