emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: emacsclient --readonly


From: Michael Mauger
Subject: Re: Proposal: emacsclient --readonly
Date: Sat, 30 Mar 2013 16:03:42 -0700 (PDT)

>>  I'm not sure I understand right, but it doesn't sound like it's 

>>  going a direction I like: I'd like to reduce the difference between
>>  the C-level command line argument vector received by 
>> emacsclient and the list of strings received by server.el.
>>  

I'm giving up.  Without a significant rewrite of emacsclient.c
and server.el, I don't see your vision of custom options coming
to fruition.  

I am running a local edit similar to the second version I sent
to the mailing list that supports --readonly, --diff, --merge, 
and a little more invasive patch that implements passing a 
default Tramp prefix to allow a remote editor to open the 
local file.

The patch I use has:

* separate handlers for each option with built-in
parsing and validation of a single option argument

* a hook for handling each non-option parameter of emacsclient
to alter the filename before the filename is opened

* a hook to replace the default open action of each file arg

* a hook to handle each buffer that gets opened; similar to
`server-visit-hook' but called later once all server setup is
complete and dedicated to custom options.

* a final hook at the end of the file args to validate the overall
server state before control is passed to the user.

* allows custom options to be defined, maintained and installed
independently of each other without a point of contact beyond 
server.el (this is important for me since the custom features
I implement at home differ from those I might use at a client
site.)

As I tried to implement the simplified parsing that was proposed
but encountered the existing server processing which lacks the 
structure to implement the requested features.  The patch
that I am using takes advantage of several new hooks that allow
the new functionality to be inserted into the existing processing 
model.

The challenge for me will now be for me to keep my patch in sync.

-- Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]