From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Hofert Newsgroups: gmane.emacs.help Subject: Re: Mac terminal.app: starting emacs, possibly as sudo Date: Mon, 17 Oct 2011 09:34:22 +0200 Message-ID: <9C6F07E1-F15F-444D-B7D3-72C431393461@math.ethz.ch> References: <300A41B7-78F8-422C-BF95-6FFEF947E79A@math.ethz.ch> <18107B2C-4BE2-40D9-90C5-02BCD0CF0DEF@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1318836878 2788 80.91.229.12 (17 Oct 2011 07:34:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2011 07:34:38 +0000 (UTC) Cc: Emacs help To: Peter Dyballa , Perry Smith Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 09:34:30 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RFhiP-0005gi-Nm for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 09:34:30 +0200 Original-Received: from localhost ([::1]:46882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhiP-0001pq-7U for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 03:34:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhiK-0001ph-Fc for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:34:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFhiJ-0001Mw-DP for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:34:24 -0400 Original-Received: from edge10.ethz.ch ([82.130.75.186]:28944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFhiJ-0001Mj-2l for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 03:34:23 -0400 Original-Received: from CAS10.d.ethz.ch (172.31.38.210) by edge10.ethz.ch (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 17 Oct 2011 09:34:17 +0200 Original-Received: from [192.168.1.221] (129.132.146.66) by cas10.d.ethz.ch (172.31.38.210) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 17 Oct 2011 09:34:20 +0200 In-Reply-To: <18107B2C-4BE2-40D9-90C5-02BCD0CF0DEF@Web.DE> X-Mailer: Apple Mail (2.1251.1) X-Originating-IP: [129.132.146.66] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.130.75.186 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82583 Archived-At: Dear Perry, Dear Peter, thanks a lot for helping. I tried sudo /Applications/Emacs.app/Contents/MacOS/bin/emacs and I am = indeed root in the shell :-)=20 There are some things that are strange, though: Option/Alt is not Meta = anymore, so when I wanted to start a shell with M-x ... I obtained a "=3D"= symbol (or rather, an "approximate" symbol). I realized that ESC is now = Meta.=20 =3D> Are there any other significant changes I should be aware of? =3D> Is it possible to get the same/similar behavior as in the GUI, = maybe through simply redefining root's .emacs and .emacs.d as my own? = (bad practice?) Well, maybe I should rethink the whole process: When do I want to open = emacs as root? =46rom time to time, I open a file and modify it. When I = try to save it, I get the read-only warning. This means I would like to = be su to modify this file. It's probably best to just open it with C-x = C-f /sudo::path-to-file... But by closing and reopening all my = modifications to the file are lost. How can one avoid this? Cheers, Marius On 2011-10-17, at 01:43 , Peter Dyballa wrote: >=20 > Am 17.10.2011 um 00:26 schrieb Marius Hofert: >=20 >> 1) How can I have the new emacs version opened when typing "emacs" in = the terminal?=20 >=20 > Either reorder PATH or use the whole path to the executable! Or use a = shell alias... >=20 >> 2) Is it possible to start emacs in "sudo mode", so starting emacs = via "sudo emacs" in the terminal (and then being root when opening a = shell from within emacs)? >=20 > It won't work with the NS and "AppKit" variants (do you know of any = "native" mac OS X GUI application that you can launch with sudo and then = runs with elevated privileges?), it works with the X client and also = without windowing system (in terminal). >=20 > -- > Mit friedvollen Gr=FC=DFen >=20 > Pete >=20 > If all else fails read the instructions. > - Donald Knuth >=20