all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Mauger <michael@mauger.com>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Proposal: emacsclient --readonly
Date: Sat, 30 Mar 2013 16:03:42 -0700 (PDT)	[thread overview]
Message-ID: <1364684622.32042.YahooMailNeo@web160906.mail.bf1.yahoo.com> (raw)
In-Reply-To: <1364392041.32259.YahooMailNeo@web160906.mail.bf1.yahoo.com>

>>  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	other threads:[~2013-03-30 23:03 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
2013-03-27  2:33             ` Stefan Monnier
2013-03-27 13:47               ` Michael Mauger
2013-03-30 23:03                 ` Michael Mauger [this message]
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

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

  git send-email \
    --in-reply-to=1364684622.32042.YahooMailNeo@web160906.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.