Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!hao!husc6!mit-eddie!ncifcrf.UUCP!randy From: randy@ncifcrf.UUCP Newsgroups: comp.emacs Subject: Modifying point automatically on editing file 'x' Message-ID: <8707131938.AA05076@ncifcrf.ncifcrf.uucp> Date: Mon, 13-Jul-87 16:38:46 EDT Article-I.D.: ncifcrf.8707131938.AA05076 Posted: Mon Jul 13 16:38:46 1987 Date-Received: Tue, 14-Jul-87 07:11:47 EDT Sender: daemon@eddie.MIT.EDU Lines: 31 I have a question for the assembled intellects of the net. I want to have point moved to a specific point within a file automatically upon editing the given file (specifically to the end of the first line). I thought I could do this through a modification of auto-mode-alist, but apparently modifications to point are not effective when called through this mechanism. Specifically, I created a function 'mh-compose-mode which put me into Text mode, set the fill prefix, moved to the beginning of the buffer and then to the end of the line. I then cons'ed '("draft" . mh-compose-mode) to auto-mode-alist and setq'd the result to auto-mode-alist again in my .emacs file. I'm sure I got the basic technique of modifying auto-mode-alist right, because I end up in text mode with the fill prefix set appropriately. However, point is at the beginning of the buffer, not the end of the first line. This is obviously a minor problem (a single keystroke puts me where I want to be) but I got curious as to why my method didn't work. Checking the source (files.el) indicate the the auto-mode-alist function is called after the file is found, so it's not a simple case of manipulating point on an empty scratch buffer. Anybody hacked gnumacs enough to know what's up? Thanks for any and all replies. -- Randy Smith Randy Smith @ NCI Supercomputer Facility c/o PRI, Inc. PO Box B, Bldng. 430 Phone: (301) 698-5660 Frederick, MD 21701 Uucp: ...!seismo!elsie!ncifcrf!randy