From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpkotta Newsgroups: gmane.emacs.help Subject: Re: sudo emacs Date: Wed, 6 Feb 2013 08:32:59 -0800 (PST) Message-ID: <0f49e2d1-6c52-4174-95c2-dfb2f7af6a21@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1360168397 14378 80.91.229.3 (6 Feb 2013 16:33:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Feb 2013 16:33:17 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: gnu.emacs.help@googlegroups.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 06 17:33:37 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1U37wF-0008TH-V0 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2013 17:33:36 +0100 Original-Received: from localhost ([::1]:57851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U37vx-0001CG-5o for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Feb 2013 11:33:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U37vk-00018j-0I for Help-gnu-emacs@gnu.org; Wed, 06 Feb 2013 11:33:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U37vg-0001jm-NO for Help-gnu-emacs@gnu.org; Wed, 06 Feb 2013 11:33:03 -0500 Original-Received: from mail-gg0-x237.google.com ([2607:f8b0:4002:c02::237]:59141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U37vg-0001jX-Ii for Help-gnu-emacs@gnu.org; Wed, 06 Feb 2013 11:33:00 -0500 Original-Received: by mail-gg0-f183.google.com with SMTP id p1so258073ggn.10 for ; Wed, 06 Feb 2013 08:32:59 -0800 (PST) X-Received: by 10.49.48.41 with SMTP id i9mr2517236qen.36.1360168379667; Wed, 06 Feb 2013 08:32:59 -0800 (PST) Original-Path: glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.97.12.233; posting-account=EwI0QQoAAADdqmqX_mVfawBNtwyks2YE Original-NNTP-Posting-Host: 70.97.12.233 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 70.97.12.233 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c02::237 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:88992 Archived-At: On Wednesday, February 6, 2013 4:06:18 AM UTC-6, drain wrote: > This somewhat downgrades root privileges, but I cannot encrypt mail witho= ut >=20 > it. Hitherto I almost never ran Emacs with sudo. >=20 >=20 >=20 > The problem is, I cannot access any files without sudo. Now all of my ini= ts >=20 > require it. >=20 >=20 >=20 > I was thinking of creating alternates. Is it possible for .emacs to be >=20 > instructed to ignore certain files and load others depending on privilege= ? >=20 >=20 >=20 > I *believe* I've seen people write code that enables Emacs to distinguish >=20 > between the OS it is running on and run the inits accordingly, etc. >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -- >=20 > View this message in context: http://emacs.1067599.n5.nabble.com/sudo-ema= cs-tp277339.html >=20 > Sent from the Emacs - Help mailing list archive at Nabble.com. You can use tramp to edit files as root (instead of finding "/home/user/fil= e", find "/sudo:root@hostname:/home/user/file"). Maybe there's a way to au= tomatically prepend the tramp sudo stuff for certain files. Take a look at= http://www.emacswiki.org/emacs/OpenWith for one possible method. You can certainly split your init file, but that seems like it's solving th= e wrong problem.