From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Proposal: emacsclient --readonly Date: Wed, 13 Mar 2013 23:31:26 -0400 Message-ID: References: <87y5dqafcy.fsf@michael-laptop.hsd1.ma.comcast.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363231892 6177 80.91.229.3 (14 Mar 2013 03:31:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 03:31:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: michael@mauger.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 14 04:31:57 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 1UFytX-0007LY-Rt for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 04:31:55 +0100 Original-Received: from localhost ([::1]:47762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFytB-0000BY-AT for ged-emacs-devel@m.gmane.org; Wed, 13 Mar 2013 23:31:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFyt8-0000BS-Gb for emacs-devel@gnu.org; Wed, 13 Mar 2013 23:31:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFyt7-0002Rq-EI for emacs-devel@gnu.org; Wed, 13 Mar 2013 23:31:30 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:48920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFyt7-0002Rj-AU for emacs-devel@gnu.org; Wed, 13 Mar 2013 23:31:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA2IQgbBLY1hgykDpHqBXoMT X-IPAS-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA2IQgbBLY1hgykDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="4875959" Original-Received: from 206-248-162-253.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Mar 2013 23:31:26 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A87CE678BC; Wed, 13 Mar 2013 23:31:26 -0400 (EDT) In-Reply-To: <87y5dqafcy.fsf@michael-laptop.hsd1.ma.comcast.net> (michael@mauger.com's message of "Wed, 13 Mar 2013 22:23:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:157834 Archived-At: > I'd be interested in any suggestions people have on how to accomplish > this using emacsclient currently. In the absence of any ideas, I'd like > to propose the folowing patch which adds a `--readonly,-r' option to > emacsclient (and server.el) (I had originally called it --view-mode,-v but > getopt_long_only complained that it was ambiguous if abbreviated.) I think the way to do it is to change emacsclient.c so that any "--foo" arg simply gets sent to server.el. This way the addition of --readonly support can be implemented all in server.el. Then server.el should be changed to provide a hook that lets user add handling for their own --foo args so that you can even do it without changing server.el. Stefan