[comp.emacs] questions about gnuemacs

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (01/29/88)

warsaw@cme-durer.ARPA writes:
   1) Is there an online method to find out what version of gnu I'm
   running?  How can I get all the changes to give me the current
   new-and-improved? 

M-x emacs-version.

You'll have to FTP a current distribution from
prep.ai.mit.edu:/u/emacs, or UUCP a copy of it from osu-cis.  For
osu-cis, see periodic posting of instructions in comp.sources.d.

   3) How do I get a file to set it's mode automatically when I visit it?
   For example, I have a file that is created using outline-mode and I
   always have to set the mode when I visit it during a new session.

You can force a file to have a particular mode by including comments
in the file describing its mode.  This is documented in the GNU Emacs
Manual, section 28.2.4 [Local Variables in Files].  You can get it in
"info" mode by 
	C-h i			Call info mode.
	m Emacs			Go to Emacs-related info.
	m Customization		Select Customization-related topics.
	m Variables		Variables for customization.
	m File Variables	You're there.

   Also, postnews calls gnu as my default editor and I'd like it to set
   the mode of the temp file to Text Fill automatically.  How can I do
   this?

You can do things ~/.emacs with the auto-mode-alist which defines what
file patterns get what modes.  Look in loaddefs.el in the lisp
directory for Emacs.
-=-
Karl

jr@LF-SERVER-2.BBN.COM (John Robinson) (02/01/88)

>> You can do things ~/.emacs with the auto-mode-alist which defines what
>> file patterns get what modes.  Look in loaddefs.el in the lisp
>> directory for Emacs.

And don't forget:

  (setq-default major-mode 'text-mode)

or whatever, which picks up all files outside of auto-mode-alist.

/jr
jr@bbn.com or jr@bbn.uucp

wombat@ccvaxa.UUCP (02/05/88)

Another way around the ^M appearing when using rlogin problem is to put
the following into your .login file (assuming you use csh):

# Don't want echoing and do want newline conversion if running through
# an emacs window from another machine.
if ($term == 'emacs') then
     stty -echo nl
     echo "NL on and local echoing off" ;
endif

tower@bu-cs.BU.EDU (Leonard H. Tower Jr.) (02/09/88)

X-UUCP-Path: ..!harvard!bu-cs!tower


In article <57600006@ccvaxa> wombat@ccvaxa.UUCP writes:
|
|Another way around the ^M appearing when using rlogin problem is to put
|the following into your .login file (assuming you use csh):
|
|# Don't want echoing and do want newline conversion if running through
|# an emacs window from another machine.
|if ($term == 'emacs') then
|     stty -echo nl
|     echo "NL on and local echoing off" ;
|endif

A better file would be ~/.emacs_csh (see the Manual or Info Mode (node
path Emacs/Shell/Interactive Shell).  Save some time on each login.

enjoy -len

Ram-Ashwin@cs.yale.edu (Ashwin Ram) (02/09/88)

In article <57600006@ccvaxa>, wombat@ccvaxa writes:
> Another way around the ^M appearing when using rlogin problem is to put
> the following into your .login file (assuming you use csh):
> [csh code deleted]

It would be more portable to write a simple emacs-lisp filter for the shell
process (but I don't know which is more efficient).  The following should do
the job:

----------------------------------------------------------------------------
(defun shell-filter (proc string)
   (save-excursion
      (set-buffer (process-buffer proc))
      (goto-char (point-max))
      (let ((old-max (point)))
         (insert string)
         (subst-char-in-region old-max (point) ?\^m ?\ )))
   (if (eq (process-buffer proc) (current-buffer))
       (goto-char (point-max))))

(set-process-filter (get-buffer-process "*shell*") 'shell-filter)
----------------------------------------------------------------------------

-- Ashwin Ram --

ARPA:    Ram-Ashwin@cs.yale.edu
UUCP:    {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin
BITNET:  Ram@yalecs