* combining echo area and modeline @ 2015-08-27 15:41 Q 2015-08-27 18:17 ` Pip Cet ` (3 more replies) 0 siblings, 4 replies; 6+ messages in thread From: Q @ 2015-08-27 15:41 UTC (permalink / raw) To: emacs-devel Hello everyone, Maximize the editing area can be very desirable on netbooks and phones. In most of the times the echo area is blank, and the information on the modeline is glanced only once in a while. I am wondering if the modeline info can be displayed in the echo area whenever there is no message? Or if a hook can be added for detecting echo area changes? There is a stackexchange question on this http://emacs.stackexchange.com/questions/7563/make-use-of-an-empty-echo-area-to-display-information Thank you for your consideration! Q ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: combining echo area and modeline 2015-08-27 15:41 combining echo area and modeline Q @ 2015-08-27 18:17 ` Pip Cet 2015-08-27 18:27 ` Eli Zaretskii ` (2 subsequent siblings) 3 siblings, 0 replies; 6+ messages in thread From: Pip Cet @ 2015-08-27 18:17 UTC (permalink / raw) To: Q; +Cc: emacs-devel [-- Attachment #1.1: Type: text/plain, Size: 1297 bytes --] I think what you want is for the mini-window to shrink to zero lines. The mini-window's minimal height is currently fixed at one line: it can't be made (permanently) taller or smaller than that. Since I'm currently trying to understand the mini-window resize code anyway, here's a patch that does that. It's far from complete (in particular, mouseover on the mode line is broken) and in no way fit for inclusion, so do be careful if you decide to test it. However, having tried it, it's really annoying! IMHO, it would be much better to have the mini-window in a separate frame and auto-raise that when it's needed, possibly obstructing the modeline. On Thu, Aug 27, 2015 at 3:41 PM, Q <godblessfq@gmail.com> wrote: > Hello everyone, > > Maximize the editing area can be very desirable on netbooks and > phones. In most of the times the echo area is blank, and the > information on the modeline is glanced only once in a while. I am > wondering if the modeline info can be displayed in the echo area > whenever there is no message? Or if a hook can be added for > detecting echo area changes? > > There is a stackexchange question on this > > http://emacs.stackexchange.com/questions/7563/make-use-of-an-empty-echo-area-to-display-information > > Thank you for your consideration! > Q > > > > [-- Attachment #1.2: Type: text/html, Size: 1928 bytes --] [-- Attachment #2: 0001-Allow-minibuffer-to-shrink-to-zero-lines.patch --] [-- Type: text/x-patch, Size: 2342 bytes --] From 8eeea51c0ba68a501901db5e655f6e0cac16618e Mon Sep 17 00:00:00 2001 From: Philip <pipcet@gmail.com> Date: Thu, 27 Aug 2015 18:07:10 +0000 Subject: [PATCH] Allow minibuffer to shrink to zero lines. --- lisp/window.el | 4 ++-- src/window.c | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/window.el b/lisp/window.el index 65b4ef0..4f3daf4 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2488,8 +2488,8 @@ as small) as possible, but don't signal an error." (window-min-size root nil nil t)))) ;; Sanitize DELTA. (cond - ((<= (+ height delta) 0) - (setq delta (- (frame-char-height (window-frame window)) height))) + ((< (+ height delta) 0) + (setq delta (- height))) ((> delta min-delta) (setq delta min-delta))) diff --git a/src/window.c b/src/window.c index f6fe0cd..dd42cda 100644 --- a/src/window.c +++ b/src/window.c @@ -3710,7 +3710,7 @@ window_resize_check (struct window *w, bool horflag) `window-safe-min-height' (1) which are defined in window.el. */ return (XINT (w->new_pixel) >= (horflag ? (2 * FRAME_COLUMN_WIDTH (f)) - : FRAME_LINE_HEIGHT (f))); + : 0)); } @@ -4546,7 +4546,7 @@ shrink_mini_window (struct window *w, bool pixelwise) eassert (MINI_WINDOW_P (w)); height = pixelwise ? w->pixel_height : w->total_lines; - unit = pixelwise ? FRAME_LINE_HEIGHT (f) : 1; + unit = 0; if (height > unit) { root = FRAME_ROOT_WINDOW (f); @@ -4561,9 +4561,9 @@ shrink_mini_window (struct window *w, bool pixelwise) /* Shrink the mini-window. */ w->top_line = r->top_line + r->total_lines; - w->total_lines = 1; + w->total_lines = 0; w->pixel_top = r->pixel_top + r->pixel_height; - w->pixel_height = FRAME_LINE_HEIGHT (f); + w->pixel_height = 0; /* Enforce full redisplay of the frame. */ /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ fset_redisplay (f); @@ -4597,7 +4597,6 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini r = XWINDOW (FRAME_ROOT_WINDOW (f)); height = r->pixel_height + w->pixel_height; if (window_resize_check (r, false) - && XINT (w->new_pixel) > 0 && height == XINT (r->new_pixel) + XINT (w->new_pixel)) { block_input (); -- 2.5.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: combining echo area and modeline 2015-08-27 15:41 combining echo area and modeline Q 2015-08-27 18:17 ` Pip Cet @ 2015-08-27 18:27 ` Eli Zaretskii [not found] ` <CAOHC6G97ZrAJGu1FzF3QRux9xnmE8diaJwcOfs6=EcJodgw5Ew@mail.gmail.com> 2015-08-28 2:43 ` Michael Heerdegen 2015-08-28 21:35 ` H. Dieter Wilhelm 3 siblings, 1 reply; 6+ messages in thread From: Eli Zaretskii @ 2015-08-27 18:27 UTC (permalink / raw) To: Q; +Cc: emacs-devel > From: Q <godblessfq@gmail.com> > Date: Thu, 27 Aug 2015 15:41:00 +0000 (UTC) > > Maximize the editing area can be very desirable on netbooks and > phones. In most of the times the echo area is blank, and the > information on the modeline is glanced only once in a while. I am > wondering if the modeline info can be displayed in the echo area > whenever there is no message? Or if a hook can be added for > detecting echo area changes? Why not remove the mode line, and have the minibuffer in a separate frame? Then you will have the entire frame for yourself. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAOHC6G97ZrAJGu1FzF3QRux9xnmE8diaJwcOfs6=EcJodgw5Ew@mail.gmail.com>]
* Re: combining echo area and modeline [not found] ` <CAOHC6G97ZrAJGu1FzF3QRux9xnmE8diaJwcOfs6=EcJodgw5Ew@mail.gmail.com> @ 2015-08-27 19:41 ` Eli Zaretskii 0 siblings, 0 replies; 6+ messages in thread From: Eli Zaretskii @ 2015-08-27 19:41 UTC (permalink / raw) To: Qiang Fang; +Cc: emacs-devel > Date: Thu, 27 Aug 2015 15:31:31 -0400 > From: Qiang Fang <godblessfq@gmail.com> > > Information on the mode line is quite useful sometimes, like the > indicator for evil mode, which function mode etc. Then don't remove it. > I haven't tried making another frame for the echo area. I am not > sure how you hide the title bar and position the frame exactly on > top of the modeline, also how do you auto hide the frame when the > message is timed out? Why do you need all that? Just let that minibuffer-only frame be, obscure it by others, or even minimize it if you want -- it will be raised automatically when Emacs has something to say there. > Pip's suggestion of shrinking mini-window to zero lines doesn't > solve the problem when the echo area is poped up, mode line and > minibuffer take two lines then. You only can tweak Emacs this far. Certain portions of the display have to be there, especially if you cannot give up completely what they show. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: combining echo area and modeline 2015-08-27 15:41 combining echo area and modeline Q 2015-08-27 18:17 ` Pip Cet 2015-08-27 18:27 ` Eli Zaretskii @ 2015-08-28 2:43 ` Michael Heerdegen 2015-08-28 21:35 ` H. Dieter Wilhelm 3 siblings, 0 replies; 6+ messages in thread From: Michael Heerdegen @ 2015-08-28 2:43 UTC (permalink / raw) To: emacs-devel Hi Q, I guess one could try to misuse the "minibuffer-line" package for that. Proof of concept: --8<---------------cut here---------------start------------->8--- (require 'minibuffer-line) (setq minibuffer-line-refresh-interval 1) (advice-add 'minibuffer-line--update :before (defun my-minibuffer-line--update--copy-mode-line () (when mode-line-format (setq minibuffer-line-format mode-line-format mode-line-format nil)))) (minibuffer-line-mode +1) --8<---------------cut here---------------end--------------->8--- Note that that's a hack that has it's limitations. Regards, Michael. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: combining echo area and modeline 2015-08-27 15:41 combining echo area and modeline Q ` (2 preceding siblings ...) 2015-08-28 2:43 ` Michael Heerdegen @ 2015-08-28 21:35 ` H. Dieter Wilhelm 3 siblings, 0 replies; 6+ messages in thread From: H. Dieter Wilhelm @ 2015-08-28 21:35 UTC (permalink / raw) To: emacs-devel Q <godblessfq@gmail.com> writes: > Hello everyone, > > Maximize the editing area can be very desirable on netbooks and > phones. In most of the times the echo area is blank, and the > information on the modeline is glanced only once in a while. I am > wondering if the modeline info can be displayed in the echo area > whenever there is no message? Or if a hook can be added for > detecting echo area changes? Maybe displaying the mode line in the frame title might be interesting for you: http://bzg.fr/emacs-strip-tease.html Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-28 21:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-08-27 15:41 combining echo area and modeline Q 2015-08-27 18:17 ` Pip Cet 2015-08-27 18:27 ` Eli Zaretskii [not found] ` <CAOHC6G97ZrAJGu1FzF3QRux9xnmE8diaJwcOfs6=EcJodgw5Ew@mail.gmail.com> 2015-08-27 19:41 ` Eli Zaretskii 2015-08-28 2:43 ` Michael Heerdegen 2015-08-28 21:35 ` H. Dieter Wilhelm
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.