unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Devlin <spd@toadstyle.org>
To: 44933@debbugs.gnu.org
Subject: bug#44933: 27.1; Ephemeral frame selection shrinks minibuffer
Date: Sat, 28 Nov 2020 16:21:40 -0500	[thread overview]
Message-ID: <65A18F9E-3193-4DBD-84D8-4EDCA5AB95A1@toadstyle.org> (raw)

Hi folks,

Selecting a different frame ephmerally (e.g. via `with-selected-frame`
in a timer callback) shrinks the minibuffer. This is true whether or not
the minibuffer is active.

Reproduction steps:

1. Evaluate this form in the scratch buffer:

   (run-with-timer nil 13 (lambda () (with-selected-frame
   (next-frame))))

2. Evaluate this form in the scratch buffer:

   (run-with-timer nil 11 (lambda () (window-resize (minibuffer-window)
   10)))

3. Observe that the minibuffer grows and shrinks as the timers fire.

You can run some completing read command (e.g. `M-x`) to see that the
resizing happens whether or not the minibuffer is active.

This is relevant for completing read implementations that resize the
minibuffer to display a vertical list of candidates. I noticed the
behavior while using selectrum (https://github.com/raxod502/selectrum)
while I had a subprocess running under term in another frame. Since the 
`term-emulate-terminal` function selects windows in the background  
whenever the subprocess sends output, it was causing the selectrum
minibuffer to shrink.

I'm not sure what the correct behavior is here, but this was unexpected
to me. I think that if the minibuffer is active, ephemeral frame or
window selections should not affect its size. (I'm less certain about
the inactive minibuffer case, but I think the size should stay the same
there as well.)

Thanks!

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2020-08-12 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.0

Recent messages:
Beginning of buffer [5 times]
uncompressing window.el.gz...done
Making completion list...
Type C-x 1 to delete the help window, C-M-v to scroll help.
t [2 times]
Quit [3 times]
[nil 24514 47830 650446 10 (closure (t) nil (window-resize (minibuffer-window) 10)) nil nil 0]
[nil 24514 47883 629069 11 (closure (t) nil (let (... ...) (unwind-protect ... ... ...))) nil nil 0]
End of buffer [6 times]
Beginning of buffer [8 times]

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr cl-print debug backtrace cl-extra minibuf-eldef
help-fns radix-tree help-mode emacsbug message rmc puny dired
dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache
epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x seq byte-opt gv bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils linum misearch
multi-isearch jka-compr thingatpt find-func tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 59777 30679)
(symbols 48 6538 1)
(strings 32 19388 2002)
(string-bytes 1 586736)
(vectors 16 11741)
(vector-slots 8 146822 21486)
(floats 8 40 48)
(intervals 56 896 92)
(buffers 1000 16))





             reply	other threads:[~2020-11-28 21:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 21:21 Sean Devlin [this message]
2020-11-29  8:22 ` bug#44933: 27.1; Ephemeral frame selection shrinks minibuffer martin rudalics
2020-11-29 15:43   ` Sean Devlin
2020-11-30  9:04     ` martin rudalics
2020-11-30 19:32       ` Sean Devlin
2020-12-01  9:33         ` martin rudalics
2020-12-01 20:32           ` Sean Devlin
2020-12-02  7:45             ` martin rudalics
2020-12-02  7:52               ` martin rudalics
2020-12-02 18:24                 ` Sean Devlin
2020-12-12 20:23                   ` Sean Devlin
2020-12-13  7:26                     ` martin rudalics
2020-12-13 16:10                       ` Sean Devlin
2020-12-14 15:47                         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65A18F9E-3193-4DBD-84D8-4EDCA5AB95A1@toadstyle.org \
    --to=spd@toadstyle.org \
    --cc=44933@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).