From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Amy Templeton Newsgroups: gmane.emacs.help Subject: Re: Quite a few emacs questions Date: Wed, 16 May 2007 17:07:51 -0400 Message-ID: <87646szdco.fsf@gmail.com> References: <1179276142.234222.189970@p77g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179349352 2604 80.91.229.12 (16 May 2007 21:02:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 21:02:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 16 23:02:29 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HoQdd-00025s-6v for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 23:02:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoQle-0000p2-86 for geh-help-gnu-emacs@m.gmane.org; Wed, 16 May 2007 17:10:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoQlN-0000kp-KS for help-gnu-emacs@gnu.org; Wed, 16 May 2007 17:10:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoQlJ-0000dC-S2 for help-gnu-emacs@gnu.org; Wed, 16 May 2007 17:10:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoQlJ-0000d6-MW for help-gnu-emacs@gnu.org; Wed, 16 May 2007 17:10:21 -0400 Original-Received: from an-out-0708.google.com ([209.85.132.245]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HoQdH-00085a-Nb for help-gnu-emacs@gnu.org; Wed, 16 May 2007 17:02:03 -0400 Original-Received: by an-out-0708.google.com with SMTP id c17so93583anc for ; Wed, 16 May 2007 14:02:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:to:subject:references:from:x-now-playing:microsoft:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=EChEhucr2GssW2WxhVp3XVf1kUNJy3FRfh/qtA6X3kjvsDh2oGoHFb3IFU18/lVy9p6WivHlTbIk6zXX7ENomJnYD969F8BdOQip04B5ZGT+9L2mGEMa8xNn/ZcbdVDLETuHVZIYTyJFgTNxKHqeXlq85mp+D6lEWzStfRN7BzQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:to:subject:references:from:x-now-playing:microsoft:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=KEEmkZLqTO2GyrePl7zqv9clYv2ONakqRtqWf/kpr3JvKZTtuhiz1JxM1NdMd1ciMsxAdUuIWgJ8e0UOR1PnECV4ZkIqZcHO5xXMHmeIY+oK6fsfxzasEFKldY6NIXHWd5FH5jVDpXLhFTvTEzezTGnHKB+GFpCIIYYKleXWrZ4= Original-Received: by 10.100.11.7 with SMTP id 7mr6762049ank.1179349322506; Wed, 16 May 2007 14:02:02 -0700 (PDT) Original-Received: from localhost ( [132.162.245.20]) by mx.google.com with ESMTP id c30sm1730097ana.2007.05.16.14.02.00; Wed, 16 May 2007 14:02:02 -0700 (PDT) X-Now-Playing: Nothing playing right now Microsoft: Making the world a better place... for Microsoft. In-Reply-To: <1179276142.234222.189970@p77g2000hsh.googlegroups.com> (mowgli's message of "15 May 2007 17\:42\:22 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44049 Archived-At: mowgli 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.