unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Amy Templeton <amy.g.templeton@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Quite a few emacs questions
Date: Wed, 16 May 2007 17:07:51 -0400	[thread overview]
Message-ID: <87646szdco.fsf@gmail.com> (raw)
In-Reply-To: <1179276142.234222.189970@p77g2000hsh.googlegroups.com> (mowgli's message of "15 May 2007 17\:42\:22 -0700")

mowgli <knowledgeless@gmail.com> wrote:
> How to make eshell behave properly? typing Ctrl-L to clear screen
> doesn't work and outputs junk. The clear command doesn't work
> either.

CODE:
______________________________

(defun eshell/clear ()
  "Clears the eshell buffer."
  (interactive)
  (let ((inhibit-read-only t))
    (erase-buffer)))
______________________________

...works for me. Just put that function definition in your .emacs.
If you would like to test it out in your current session (I assume
this is the case), put your cursor after the *last* parenthesis
after the (erase-buffer) command and hit "C-x C-e" (to evaluate the
code). Then test it out in the eshell buffer.

> How to make eshell work like on full page? Typing any command
> scrolls half the page to top.

Could you be more specific? I'm not really sure what you mean by
this. You can go back in the eshell buffer just like any other
buffer, if that's your question.

> I'm just installing w3. Does it support frames like the links or
> elinks browsers?

I don't believe so, and neither does emacs-w3m (my browser of
choice). You might try to look into a comparison of w3 and
emacs-w3m's features before deciding on one; try googling for each
one.

> When using X, how to change the default font used by emacs? It's
> extremely small.

CODE:
_________________________________________________________________

(if window-system
      (set-default-font
      "-adobe-courier-medium-r-*-*-14-*-100-100-*-*-iso10646-1"))
_________________________________________________________________

...would do this, assuming you wanted that particular font. Enter
your font of choice.

> How do you add these to .emacs?

I'll take these one at a time...

> M-x color-theme xyz

CODE:
_________________

(color-theme-xyz)
_________________ 

An M-x command uses the full name of the command, so what you put
in your .emacs should match what you enter with M-x. However, I
would suggest doing it this way:

CODE:
________________________

(if window-system
      (color-theme-xyz))
________________________

...because that way, if you start it in a terminal your colors
won't be all messed up. If you wanted, you could add a second part
to the if statement that would make it use a different color theme
(instead of no color theme) if you weren't using emacs in an X
window.

CODE:
_______________________________________________

(if window-system
      (color-theme-xyz)
  (color-theme-your-favorite-for-the-terminal))
_______________________________________________

> M-x font-lock-mode

(global-font-lock-mode 1)

> M-x shell-script-mode

Entering this in your .emacs would not, I think, have the effect
you're looking for. Correct me if I'm wrong, but are you looking to
start shell-script-mode on certain types of files or on certain
individual files? If so, you might be more interested in something
like this:

CODE:
_____________________________________________________

(add-to-list 'auto-mode-alist '("\\.ses" . ses-mode))
_____________________________________________________

...inserting, of course, the file or file ending you wanted instead
of ".ses" and the mode you wanted instead of "ses-mode."

> M-x set-variable visible-bell true

CODE:
_____________________

(setq visible-bell t)
_____________________

setq is the command to set one or more variables.

> M-x highlight-current-line-globally

CODE:
_____________________________

(highlight-current-line-on t)
_____________________________

...will turn it on. Passing it an argument of nil (instead of t)
will turn it off again if it gets on your nerves.

> I have put the cyclebuffer-forward and cyclebuffer-backward in
> .emacs but it doesn't seem to work since M-N and M-B are already
> emacs keys. How to tell emacs to use it for the cyclebuffer
> commands and not interpret it the default way?

I'd suggest just binding them to keys that you don't use. As far as
I can tell, M-n is not globally set to anything. M-b is, but it
would probably make more sense to your fingers to use M-p (which is
globally not defined) instead, since C-n and C-p are already
associated (next and previous line, respectively). So you could
do...

CODE:
__________________________________________________

(global-set-key (kbd "M-n") 'cyclebuffer-forward)
(global-set-key (kbd "M-p") 'cyclebuffer-backward)
__________________________________________________

...in your .emacs (and eval them the same was as with the first
command I suggested). That should make it work.

Amy

-- 
One planet is all you get.

  parent reply	other threads:[~2007-05-16 21:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  0:42 Quite a few emacs questions mowgli
2007-05-16  7:05 ` Tassilo Horn
2007-05-17  0:23   ` mowgli
2007-05-17  9:22     ` Tassilo Horn
2007-05-17 12:03       ` David Kastrup
2007-05-19 21:21       ` Ian J Cottee
2007-05-17  9:30     ` Daniel Jensen
2007-05-16 21:07 ` Amy Templeton [this message]
2007-05-16 21:58   ` Peter Dyballa
2007-05-17  0:43     ` knowledge less
2007-05-17  8:42       ` Peter Dyballa
     [not found]   ` <mailman.751.1179353187.32220.help-gnu-emacs@gnu.org>
2007-05-17  7:01     ` mowgli
     [not found] ` <mailman.749.1179349827.32220.help-gnu-emacs@gnu.org>
2007-05-17 19:33   ` mowgli
2007-05-17 19:53     ` Lowell Gilbert
2007-05-17 20:35     ` Tyler Smith
2007-05-17 21:50       ` mowgli
2007-05-18  0:08         ` Tyler Smith
2007-05-18  0:27           ` mowgli
2007-05-18  0:56             ` Tyler Smith
2007-05-18  7:18               ` Thien-Thi Nguyen
2007-05-18  8:26                 ` mowgli
2007-05-18 19:34                   ` Dieter Wilhelm
2007-05-22  4:38                   ` Xavier Maillard
2007-05-18  0:33           ` mowgli
2007-05-19 11:46     ` mowgli
2007-05-19 12:56       ` Lennart Borgman (gmail)
     [not found]       ` <mailman.855.1179579415.32220.help-gnu-emacs@gnu.org>
2007-05-22  9:50         ` mowgli
2007-05-22 10:53           ` Lennart Borgman (gmail)
2007-05-22 21:45           ` Xavier Maillard
     [not found]           ` <mailman.969.1179831210.32220.help-gnu-emacs@gnu.org>
2007-05-23  0:58             ` mowgli
2007-05-23  9:26               ` Lennart Borgman (gmail)
2007-05-23 21:36                 ` Allan Gottlieb
2007-05-23 21:40                   ` Lennart Borgman (gmail)
2007-05-23 22:26                     ` Allan Gottlieb
     [not found] <mailman.1043.1179871359.32220.help-gnu-emacs@gnu.org>
2007-05-23  0:50 ` mowgli
2007-05-23  0:59 ` mowgli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87646szdco.fsf@gmail.com \
    --to=amy.g.templeton@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).