From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse) Newsgroups: gmane.emacs.devel Subject: Re: Proposal: emacsclient --readonly Date: Thu, 14 Mar 2013 02:45:38 +0000 Message-ID: <87a9q6g0ml.fsf@riseup.net> 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 1363229156 14530 80.91.229.3 (14 Mar 2013 02:45:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 02:45:56 +0000 (UTC) To: emacs-devel-mXXj517/zsQ@public.gmane.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Mar 14 03:46:21 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 1UFyBR-0004mX-1c for ged-emacs-devel@m.gmane.org; Thu, 14 Mar 2013 03:46:21 +0100 Original-Received: from localhost ([::1]:39351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFyB4-0007HL-KT for ged-emacs-devel@m.gmane.org; Wed, 13 Mar 2013 22:45:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFyAz-0007HD-9H for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 13 Mar 2013 22:45:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFyAw-000358-M8 for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 13 Mar 2013 22:45:53 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFyAw-00034n-8S for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 13 Mar 2013 22:45:50 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UFyBF-0004bv-Lp for emacs-devel-mXXj517/zsQ@public.gmane.org; Thu, 14 Mar 2013 03:46:09 +0100 Original-Received: from ks35731.kimsufi.com ([213.251.185.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Mar 2013 03:46:09 +0100 Original-Received: from wgreenhouse by ks35731.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Mar 2013 03:46:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: ks35731.kimsufi.com X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:45p4Vsb9QmCJUAZTWrNRG1gJjhQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel-mXXj517/zsQ@public.gmane.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-mXXj517/zsQ@public.gmane.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.devel:157831 Archived-At: michael-ntT3PcgARwzQT0dZR+AlfA@public.gmane.org writes: > As distraction to our toddler temper-tantrum, I'd like to propose a > new feature for emacsclient. > > I use emacsclient to open files frequently and I generally immediately > do M-x view-mode once the frame pops up. I'd like to be able to open > the file directly in view-mode when I invoke emacsclient. > > 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'm eager to hear any suggestions people might have to do this without > changing emacsclient. Or maybe this is a reason to add a more generic > feature to emacsclient to enable/disable modes after a file is opened. > > > > -- > Michael R. Mauger - FSF Member #4247 - Emacs sql.el Maintainer Without changing emacsclient, my approach would be the slightly unintuitive/user-hostile emacsclient --eval '(view-file "path/to/file")' -- Regards, WGG