Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!cornell!uw-beaver!blake!ogccse!littlei!omepd!mipos3!nate From: nate@hobbes.intel.com (Nate Hess) Newsgroups: comp.emacs Subject: Re: How do I abort processing of .emacs? Message-ID: <3430@mipos3.intel.com> Date: 11 Jan 89 16:21:16 GMT References: <103@garnet.UUCP> Sender: news@mipos3.intel.com Reply-To: woodstock@hobbes.intel.com (Nate Hess) Distribution: na Organization: Intel Corporation, Santa Clara, CA Lines: 40 In-reply-to: randy@garnet.UUCP (Randy Orrison) In article <103@garnet.UUCP>, randy@garnet (Randy Orrison) writes: >I'm a little annoyed with the behavior of GNU emacs when I'm su'ed to >root. It reads my .emacs file (~randy/.emacs) instead of /.emacs, >which isn't too bad, though I'd prefer it read /.emacs. >I'd like to not load the backups stuff when su'ed. So, here's what I >want to do: >(if (equal (getenv "HOME") "/") > ( skip-the-rest-of-.emacs )) >How do I do the skip? (Or, is there a better way to do what I want?) What you might want to try is the function 'user-uid', which is documented as follows: user-uid: Return the effective uid of Emacs, as an integer. This suggests that you might want to try something like: (if (> (user-uid) 0) (progn )) >(P.S. someday I'm going to read the elisp programming manual and >write a function that re-formats quoted paragraphs, keeping the '> ' >at the beginning of each line, unless someone else has already done >this... hint hint) This has already been done. Go check out Gnews 2.0. It's an awesome newsreader, as well as a place to scarf some useful Elisp from. Happy Emacsing, --woodstock -- "What I like is when you're looking and thinking and looking and thinking...and suddenly you wake up." - Hobbes woodstock@hobbes.intel.com ...!{decwrl|hplabs!oliveb|amd}!intelca!mipos3!nate