[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fast emacs?
From: |
Richard Riley |
Subject: |
Re: Fast emacs? |
Date: |
Sun, 02 Aug 2009 22:34:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
David Kastrup <dak@gnu.org> writes:
> kj <socyl@987jk.com.invalid> writes:
>
>> For ***years*** I've been looking for a solution to this problem,
>> and I'm truly amazed that I have yet to find it: how to get a
>> fast-starting version of emacs. The problem is that I have a big
>> .emacs file and a big Emacs desktop, which means that my Emacs takes
>> forever to start. This is fine most of the time, but occasionally
>> I want a fast-starting emacs session (e.g. when I run "sudo emacs"
>> to edit a superuser-owned config file),
>
> C-x C-f /sudo::/etc/fstab RET
I use this which is great. Open the file in normal mode, and then C-x
C-r to switch to root privs.
,----
| (defun find-alternative-file-with-sudo ()
| "Open current buffer as root!"
| (interactive)
| (when buffer-file-name
| (find-alternate-file
| (concat "/sudo:root@localhost:"
| buffer-file-name))))
|
| (global-set-key (kbd "C-x C-r") 'find-alternative-file-with-sudo)
`----
- Re: Fast emacs?, David Kastrup, 2009/08/02
- Re: Fast emacs?,
Richard Riley <=