[comp.emacs] Help. Whimper, Whimper...

nat%DRAO.NRC.CA@VM.TCS.TULANE.EDU (Natalie Prowse) (11/07/90)

Hi. I'm new to this list, so please don't flame.  I have the list of commonly
asked questions, but it IS old, and might well be out of date.  I am trying to
modify a copy of the edt.el file to tailor emacs to look like our site-specific
version of EVE-PLUS.  I know, I know, this is a unix-based group, but I am
trying to tailor it for our users so that they will have less trouble moving to
unix.  (We are gradually moving away from VMS).  Anyway, I am about 90%
there...(and I don't even know LISP or have an emacs programmers manual!).
Kludge, Kludge, but it works. If I can convince them that it is painless to
move to emacs (the only other alternative is VI (barf)), then I can gradually
work them into some really neat features of emacs, like buffer-menu, dired, and
UNDO!!!!  I put a plea out on info-vax, to see if someone had already done
this, but the response was marginal.  I received some interesting mock-lisp
code (I took me along while to figure out that it was not compatible with
e-lisp) but I couldn't use it, even after conversion, because it calls functions
which simply don't exist in our version of emacs.  So I cannibalized it,
with the help of mlsupport.el... I should mention, we have loaded only the
bare-minimum emacs due to space requirements, so we don't have directories
like emacs/databases ....

Enough background.
3 questions (for now):

1.) How do I get the screen to refresh (C-l) after loading emacs, so that the
user doesn't have to? (On my Vaxstation, I can do an 'rlogin' to the U*ix-based
Decstation, but the window gets all scrambled on entry to emacs.  A C-l fixes
it, but it would be nice if I could get it to do that automatically.)  I tried
putting a call (recenter 1), on the last line of my .emacs file, but it doesn't
appear to have any effect...

2.) I have managed to make a rough approximation of eve-plus's capability to
map top-row numeric keys to buffers - for rapid switching between multiple
buffers. (For those who have never used it, PF1-number will take you to a
buffer mapped to that numeric key.  Under eve-plus, you could not kill a buffer
without killing them all.  Under emacs, (Yay!) you can.  If there is no buffer
mapped to that particular key, the user is prompted for the name of the file.)
What I am trying to do is map a file loaded by a command line argument, into
the first buffer mapping. I tried (setq buff-assgn-1 buffer-file-name) at the
end of my .emacs file, but it sets buff-assgn-1 to nil.  When I subsequently
try to use my mapping function, the string= comparison barfs because the string
is nil. (it looks for "" in the comparison).  How do I find out the name of the
current buffer, AFTER emacs is loaded up, ie. WHERE and HOW should I look for
the name, and should I do it in my local version of edt.el, or in my .emacs
file?  Also, short of parsing the command-line-args list, is there some way to
get all the names of files that might be loaded at the intiation of emacs - ie,
if someone loads *.c, there might be several files and it would be nice if I
could map each one to a top-row buffer key...

3.) I am trying to create the equivalent of the EVE 'fill-paragraph' function.
I can set left-margin, and fill-column, and then I mark-paragraph,
fill-paragraph, and exchange-point-and-mark, so that the cursor moves to the
end of the paragraph...  But when I execute fill-paragraph, everything is still
left-justified to column 1, (instead of 5  or whatever I set left-margin to) .
I know left margin is set correctly, because I checked it with C-h v, and it
says: left-margin's value is 5 Also, if I set a left margin, I expect that
every time I hit a carriage return, it should go to the margin on the new line,
NOT the start of a new line, as it currently does now. How do I fix that?

Well, I guess that's it for now.  Thanks in advance,.  Please e-mail to me
directly, as I have only just asked to be added to the CDNnet re-distribution
of this list, and it may take a while before I actually start receiving
discussion-group mail....

-Natalie

==================

Natalie Prowse
Dominion Radio Astrophysical Observatory,        nat@drao.nrc.ca
National Research Council,                       (604) 497-5321
Penticton, BC, Canada

nat%DRAO.NRC.CA@VM.TCS.TULANE.EDU (Natalie Prowse) (11/07/90)

Thanks to all who have responded so far.  I thought I should post
a special thank-you to Mark Jungman for the suggestion about refreshing the
screen on entry to emacs. The answer was (redraw-display) as the last
line in my .emacs file :-) (recenter) on its own DID NOT WORK... :-(

Also thank-you to 'rsw@cs.brown.edu'  for the paragraph fill functions!

Off to guild my lily... 8-}
-Natalie