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 10:29:05 +0200 Message-ID: References: <300A41B7-78F8-422C-BF95-6FFEF947E79A@math.ethz.ch> <18107B2C-4BE2-40D9-90C5-02BCD0CF0DEF@Web.DE> <9C6F07E1-F15F-444D-B7D3-72C431393461@math.ethz.ch> <87pqhwt51v.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1318840167 23778 80.91.229.12 (17 Oct 2011 08:29:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2011 08:29:27 +0000 (UTC) Cc: Emacs help To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 10:29:24 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 1RFiZW-0001nh-Bg for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 10:29:22 +0200 Original-Received: from localhost ([::1]:53165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFiZS-000286-Pl for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Oct 2011 04:29:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFiZK-00027s-RW for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 04:29:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFiZI-0001k9-Qr for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 04:29:10 -0400 Original-Received: from edge10.ethz.ch ([82.130.75.186]:34395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFiZI-0001k4-Kn for help-gnu-emacs@gnu.org; Mon, 17 Oct 2011 04:29:08 -0400 Original-Received: from CAS12.d.ethz.ch (172.31.38.212) by edge10.ethz.ch (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 17 Oct 2011 10:29:03 +0200 Original-Received: from [192.168.1.221] (129.132.146.66) by CAS12.d.ethz.ch (172.31.38.212) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 17 Oct 2011 10:29:06 +0200 In-Reply-To: <87pqhwt51v.fsf@gmx.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:82586 Archived-At: Dear Michael, 1) thanks a lot, that will definitely be useful in the future! 2) Concerning my last question: Is there any harm in "replacing" = /usr/bin/emacs by /Applications/Emacs.app/Contents/MacOS/Emacs? This way = one can easily use "sudo emacs" or "emacs -Q"... and start the GUI emacs = with these features. Cheers, Marius On 2011-10-17, at 10:07 , Michael Albinus wrote: > Marius Hofert writes: >=20 >> Dear Perry, Dear Peter, >=20 > Hi, >=20 >> 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? >=20 > If you edit file /a/b/c and you cannot save it because it is owned by > root, you could save it by "C-x C-w /sudo::/a/b/c". >=20 >> Cheers, >>=20 >> Marius >=20 > Best regards, Michael.