[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cursor not positioned properly in new shell
From: |
Joe Corneli |
Subject: |
cursor not positioned properly in new shell |
Date: |
Sat, 12 Jun 2004 21:57:15 -0500 |
After running the following code snippet, the cursor is at the very
first character in the *foo* buffer. I find that this is not as
useful as it would be if the cursor was positioned at the end of the
first line in the *foo* buffer, so that input could be sent to the
*foo* shell right away from another program.
(defun foo-shell ()
(interactive)
(save-window-excursion
(shell "*foo*")))
(progn (foo-shell) (switch-to-buffer "*foo*"))
The improved behavior could be obtained by adding a
(forward-char 1)
(end-of-line)
towards the end of the definition of `shell'. Or perhaps there
is a more elegant way.
In GNU Emacs 21.3.50.4 (powerpc-apple-darwin7.2.0, X toolkit, Xaw3d scroll bars)
of 2004-04-29 on hope-of-a-stone.local
configured using `configure '--with-x' '--without-carbon'
'CFLAGS=-I/sw/include' 'CPPFLAGS=-I/sw/include' 'LDFLAGS=-L/sw/lib''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
musical-letters-mode: t
auto-image-file-mode: t
show-paren-mode: t
display-time-mode: t
mouse-wheel-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-h k C-x b C-x o M-f M-f M-f M-f M-f M-f <right> C-SPC
<C-right> M-w C-x o C-x o C-y SPC " " <left> * f o
o <up> <up> <down> <down> C-e <left> <left> <left>
* <up> <up> C-x C-e <down> <down> C-e C-x C-e C-x b
<return> <up> <up> <up> <up> C-a C-k C-k C-k <down>
<up> <backspace> <down> C-a <backspace> <up> <up> <up>
C-a C-SPC <C-right> <down> <down> C-e M-w C-SPC C-a
<up> <up> <up> <up> <up> M-w C-x b C-g M-x r e p l
<tab> <backspace> <backspace> <backspace> <backspace>
<backspace> o r <tab> <return>
Recent messages:
Loading help-fns...done
Type C-t z RET to restore the other window. C-M-v to scroll the help.
C-h C-g is undefined
Quit
Mark set [2 times]
foo-shell
#<buffer *foo*>
Mark set [2 times]
Quit
Loading emacsbug...done
- cursor not positioned properly in new shell,
Joe Corneli <=