all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Can I preload my ~/.emacs source for editing only?
@ 2010-05-04  7:05 Bill
  2010-05-04  7:29 ` David Kastrup
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bill @ 2010-05-04  7:05 UTC (permalink / raw)
  To: help-gnu-emacs

When emacs is running I can C-x C-f to load my ~/.emacs source into a
buffer for editing. That is easy enough, but I would like to know how
to do it programmaticaly so it preloads on startup. Using (load "path-
to-dot-emacs") makes emacs protest about redundant evaluation. This
newbie just wants to edit, not evaluate.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04  7:05 Can I preload my ~/.emacs source for editing only? Bill
@ 2010-05-04  7:29 ` David Kastrup
  2010-05-04 10:07 ` Pascal J. Bourguignon
  2010-05-05 23:11 ` Steven Knight
  2 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2010-05-04  7:29 UTC (permalink / raw)
  To: help-gnu-emacs

Bill <bsagert@gmail.com> writes:

> When emacs is running I can C-x C-f to load my ~/.emacs source into a
> buffer for editing. That is easy enough, but I would like to know how
> to do it programmaticaly so it preloads on startup. Using (load "path-
> to-dot-emacs") makes emacs protest about redundant evaluation. This
> newbie just wants to edit, not evaluate.

Why do you use load then?  find-file would appear to be what you are
looking for.

-- 
David Kastrup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04  7:05 Can I preload my ~/.emacs source for editing only? Bill
  2010-05-04  7:29 ` David Kastrup
@ 2010-05-04 10:07 ` Pascal J. Bourguignon
  2010-05-04 15:16   ` jpkotta
  2010-05-05 23:11 ` Steven Knight
  2 siblings, 1 reply; 7+ messages in thread
From: Pascal J. Bourguignon @ 2010-05-04 10:07 UTC (permalink / raw)
  To: help-gnu-emacs

Bill <bsagert@gmail.com> writes:

> When emacs is running I can C-x C-f to load my ~/.emacs source into a
> buffer for editing. That is easy enough, but I would like to know how
> to do it programmaticaly so it preloads on startup. Using (load "path-
> to-dot-emacs") makes emacs protest about redundant evaluation. This
> newbie just wants to edit, not evaluate.

When you want to know what commande hides behind a keychoard, you can
use C-h k

Type C-h k C-x C-f 

and see what command is used to find a file and edit it.  

You can then insert a form using this command in your ~/.emacs, such
as:

  (find-file "~/.emacs")


The opposite of C-h k is C-h w which tells you where (to which
keychoards) a command is bound.  For example, C-h w find-file RET
displays in the minibuffer:
find-file is on <open>, C-x C-f, <menu-bar> <file> <new-file>

-- 
__Pascal Bourguignon__
http://www.informatimago.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04 10:07 ` Pascal J. Bourguignon
@ 2010-05-04 15:16   ` jpkotta
  2010-05-04 17:08     ` Pascal J. Bourguignon
  0 siblings, 1 reply; 7+ messages in thread
From: jpkotta @ 2010-05-04 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

On May 4, 5:07 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Bill <bsag...@gmail.com> writes:
> > When emacs is running I can C-x C-f to load my ~/.emacs source into a
> > buffer for editing. That is easy enough, but I would like to know how
> > to do it programmaticaly so it preloads on startup. Using (load "path-
> > to-dot-emacs") makes emacs protest about redundant evaluation. This
> > newbie just wants to edit, not evaluate.
>
> When you want to know what commande hides behind a keychoard, you can
> use C-h k
>
> Type C-h k C-x C-f
>
> and see what command is used to find a file and edit it.  
>
> You can then insert a form using this command in your ~/.emacs, such
> as:
>
>   (find-file "~/.emacs")
>
> The opposite of C-h k is C-h w which tells you where (to which
> keychoards) a command is bound.  For example, C-h w find-file RET
> displays in the minibuffer:
> find-file is on <open>, C-x C-f, <menu-bar> <file> <new-file>
>
> --
> __Pascal Bourguignon__http://www.informatimago.com

The variable `user-init-file' always points to the user's init file,
whatever it might be named.  For example, I use ~/.emacs.d/init.el
instead of ~/.emacs.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04 15:16   ` jpkotta
@ 2010-05-04 17:08     ` Pascal J. Bourguignon
  2010-05-05 20:08       ` jpkotta
  0 siblings, 1 reply; 7+ messages in thread
From: Pascal J. Bourguignon @ 2010-05-04 17:08 UTC (permalink / raw)
  To: help-gnu-emacs

jpkotta <jpkotta@gmail.com> writes:

> On May 4, 5:07 am, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> Bill <bsag...@gmail.com> writes:
>> > When emacs is running I can C-x C-f to load my ~/.emacs source into a
>> > buffer for editing. That is easy enough, but I would like to know how
>> > to do it programmaticaly so it preloads on startup. Using (load "path-
>> > to-dot-emacs") makes emacs protest about redundant evaluation. This
>> > newbie just wants to edit, not evaluate.
>>
>> When you want to know what commande hides behind a keychoard, you can
>> use C-h k
>>
>> Type C-h k C-x C-f
>>
>> and see what command is used to find a file and edit it.  
>>
>> You can then insert a form using this command in your ~/.emacs, such
>> as:
>>
>>   (find-file "~/.emacs")
>>
>> The opposite of C-h k is C-h w which tells you where (to which
>> keychoards) a command is bound.  For example, C-h w find-file RET
>> displays in the minibuffer:
>> find-file is on <open>, C-x C-f, <menu-bar> <file> <new-file>
>>
> The variable `user-init-file' always points to the user's init file,
> whatever it might be named.  For example, I use ~/.emacs.d/init.el
> instead of ~/.emacs.

What's the point,  if ~/.emacs.d still starts with a dot?
And if "~/.emacs" is mapped to the right file on all platforms by emacs?

(Otherwise, thanks for the hint, it would be good to use it in emacs
lisp libraries if need to access the init file occurs).

-- 
__Pascal Bourguignon__
http://www.informatimago.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04 17:08     ` Pascal J. Bourguignon
@ 2010-05-05 20:08       ` jpkotta
  0 siblings, 0 replies; 7+ messages in thread
From: jpkotta @ 2010-05-05 20:08 UTC (permalink / raw)
  To: help-gnu-emacs

On May 4, 12:08 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> jpkotta <jpko...@gmail.com> writes:
> > On May 4, 5:07 am, p...@informatimago.com (Pascal J. Bourguignon)
> > wrote:
> >> Bill <bsag...@gmail.com> writes:
> >> > When emacs is running I can C-x C-f to load my ~/.emacs source into a
> >> > buffer for editing. That is easy enough, but I would like to know how
> >> > to do it programmaticaly so it preloads on startup. Using (load "path-
> >> > to-dot-emacs") makes emacs protest about redundant evaluation. This
> >> > newbie just wants to edit, not evaluate.
>
> >> When you want to know what commande hides behind a keychoard, you can
> >> use C-h k
>
> >> Type C-h k C-x C-f
>
> >> and see what command is used to find a file and edit it.  
>
> >> You can then insert a form using this command in your ~/.emacs, such
> >> as:
>
> >>   (find-file "~/.emacs")
>
> >> The opposite of C-h k is C-h w which tells you where (to which
> >> keychoards) a command is bound.  For example, C-h w find-file RET
> >> displays in the minibuffer:
> >> find-file is on <open>, C-x C-f, <menu-bar> <file> <new-file>
>
> > The variable `user-init-file' always points to the user's init file,
> > whatever it might be named.  For example, I use ~/.emacs.d/init.el
> > instead of ~/.emacs.
>
> What's the point,  if ~/.emacs.d still starts with a dot?
> And if "~/.emacs" is mapped to the right file on all platforms by emacs?
>

I'd rather have everything in one directory.  At the very least it
makes completion easier because only one thing in my home starts with
".emacs".

> (Otherwise, thanks for the hint, it would be good to use it in emacs
> lisp libraries if need to access the init file occurs).
>
> --
> __Pascal Bourguignon__http://www.informatimago.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Can I preload my ~/.emacs source for editing only?
  2010-05-04  7:05 Can I preload my ~/.emacs source for editing only? Bill
  2010-05-04  7:29 ` David Kastrup
  2010-05-04 10:07 ` Pascal J. Bourguignon
@ 2010-05-05 23:11 ` Steven Knight
  2 siblings, 0 replies; 7+ messages in thread
From: Steven Knight @ 2010-05-05 23:11 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday 04 May 2010 03:05:58 Bill wrote:
> When emacs is running I can C-x C-f to load my ~/.emacs source into a
> buffer for editing. That is easy enough, but I would like to know how
> to do it programmaticaly so it preloads on startup. Using (load "path-
> to-dot-emacs") makes emacs protest about redundant evaluation. This
> newbie just wants to edit, not evaluate.
> 

Hi,

I use the following:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; open user-init-file on startup, but doesn't show the buffer
(add-hook 'emacs-startup-hook (lambda () (find-file-noselect user-init-file)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Thanks,


-- 
--------------------------------------------------------------------------------
Steven Knight  steven.knight@unh.edu
-------------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-05 23:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04  7:05 Can I preload my ~/.emacs source for editing only? Bill
2010-05-04  7:29 ` David Kastrup
2010-05-04 10:07 ` Pascal J. Bourguignon
2010-05-04 15:16   ` jpkotta
2010-05-04 17:08     ` Pascal J. Bourguignon
2010-05-05 20:08       ` jpkotta
2010-05-05 23:11 ` Steven Knight

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.