[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: A few Emacs newbie questions, need oldbie answers :) (fwd)
From: |
Kevin Rodgers |
Subject: |
Re: Fwd: A few Emacs newbie questions, need oldbie answers :) (fwd) |
Date: |
Mon, 26 Apr 2004 12:05:29 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Deboo wrote:
> I'm using debian linux and the lisp files are in
> /usr/share/emacs/site-lisp directory. Some files here are names
> xxxx-el, some just xxxx, and some as xxxx.el, whereas some
> others as xxxx.elc . I don't understand lisp or programming so I dont
> know what is the difference, but could I move this directory to
> my home directory and inform emacs somehow that this directory
> is in my home dir?
The convention is that Emacs Lisp files are named .el and byte-compiled
Emacs Lisp files are named .elc. Anything is in your site-lisp
directory is, well, unconventional.
You could move those files to your home directory with the mv or cp and
rm commands, and then inform Emacs like this:
(setq load-path (cons "~" load-path))
...
> Well, I researched on this one a bit. I read the info docs and
> saw emacs-goodies-el has a cycle-buffer-forward and
> cycle-buffer-backward commands and we can bind these to M-N and
> M-P in .emacs, according to the info, but when I do this and
> start emacs, I get errors pointing me to these lines. When I
> remove the macros, emacs starts okay. Can anything be done so
> that these bindings work?
You would have to show us what you put in your .emacs file and exactly
what error was reported.
...
> How would I put this in .emacs so emacs always has word-wrap on?
> Would this be a nice thing to do?
Try this and see if you like it:
(add-hook 'text-mode-hook 'turn-on-auto-fill)
...
> I found another way to do it. Putting "-*- todoo -*-" on first
> line ( or second line if the first contains #!/bin/sh), and then
> opening any such file, would automatically put the file in that
> mode. I tried using two modes instead of one but that didn't
> have any success.
Each buffer is in exactly 1 major mode. You can turn on additional
minor modes via the major mode's hook variable, e.g. the text-mode-hook
variable and the turn-on-auto-fill function above.
...
> Why does Emacs load all files in to the scratch buffer? If it's a file,
> and we've modified it, emacs asks us to save it before quitting but
> doesn't ask any such thing if we've typed in to the scratch buffer.
> How to autosave the scratch buffer? Sometimes I jot down something useful,
> in to the scratch buffer when there's no time to think of a filename etc.
"auto-save" means something specific in Emacs. What you want to do is
to associate the *scratch* buffer with a file. Since your .emacs file
is executed in the *scratch* buffer, try this:
(set-visited-file-name "~/.scratch")
...
> How to print from emacs, in color (with background, foreground and
> syntax-highlight colors)?
M-x ps-print-buffer-with-faces (also available on the File menu bar,
under Postscript Print Buffer).
--
Kevin Rodgers