Probably too late to go into 21.0 now, but has anybody else noticed
this problem? Start with '-vanilla' to get the default auto-show
options, then do something that prints a reasonably long prompt in the
minibuffer (e.g. ^X^R, Om in Gnus or similar). Type or complete a
long file name... nothing happens when the cursor reaches the
right-hand end of the minibuffer, and you will be typing blind. The
minibuffer does not scroll horizontally until a lot more text has been
typed.
I think what is happening is that auto-show-make-point-visible is not
taking account of the prompt at the beginning of the line, therefore
the minibuffer does not scroll horizontally until the cursor is that
far beyond the right of its window. Unfortunately the current
minibuffer prompt or its length doesn't seem to be available at Lisp
level, so I have added a new function 'minibuffer-prompt-offset' to
make the prompt length available to auto-show. This fixes the
minibuffer scrolling problem, but if there is a better solution I'd be
interested to hear...
Patch originally developed on 20.4, but can be applied to 21.0.67 with
no problems. (Sorry for the context diffs, but Solaris patch doesn't
understand unified). ChangeLog entries can follow if this is accepted.
*** src/minibuf.c.orig Sun Jul 13 23:42:49 1997
--- src/minibuf.c Mon Dec 21 07:50:04 1998
***************
*** 651,656 ****
--- 651,670 ----
}
#endif /* 0 */
+
+ DEFUN ("minibuffer-prompt-offset", Fminibuffer_prompt_offset, 0, 0, 0, /*
+ Return the combined display width of the minibuffer prompt and preprompt.
+ */
+ ())
+ {
+ int width = 0;
+
+ if (STRINGP(Vminibuf_prompt)) width += XSTRING_LENGTH(Vminibuf_prompt);
+ if (STRINGP(Vminibuf_preprompt)) width += XSTRING_LENGTH(Vminibuf_preprompt);
+ return make_int (width);
+ }
+
+
/************************************************************************/
/* echo area */
***************
*** 915,920 ****
--- 929,936 ----
DEFSUBR (Fminibuffer_prompt);
DEFSUBR (Fminibuffer_prompt_width);
#endif
+ DEFSUBR (Fminibuffer_prompt_offset);
+
DEFSUBR (Fset_minibuffer_preprompt);
DEFSUBR (Fread_minibuffer_internal);
*** lisp/auto-show.el.orig Mon Jun 30 00:12:53 1997
--- lisp/auto-show.el Fri Dec 18 07:40:03 1998
***************
*** 167,172 ****
--- 167,177 ----
(if (> scroll 0)
2 1))) ;how wide window is on the screen
(right-col (+ scroll w-width)))
+
+ (if (and (fboundp 'minibuffer-prompt-offset)
+ (eq (selected-window) (active-minibuffer-window)))
+ (setq col (+ col (minibuffer-prompt-offset))))
+
(if (and (< col auto-show-show-left-margin-threshold)
(< col (window-width))
(> scroll 0))
--
Jonathan Marten, ESG Engineer Network Systems Slough, UK
jonathan.marten(a)uk.sun.com Sun Microsystems 01753 566797
Show replies by date