unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Devlin <spd@toadstyle.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 44933@debbugs.gnu.org
Subject: bug#44933: 27.1; Ephemeral frame selection shrinks minibuffer
Date: Sat, 12 Dec 2020 15:23:17 -0500	[thread overview]
Message-ID: <3C983E15-33B0-47B1-BDF1-10FD049AEF64@toadstyle.org> (raw)
In-Reply-To: <27E5B1BA-BD49-493D-8E12-CE42B1AD3E2F@toadstyle.org>

[-- Attachment #1: Type: text/plain, Size: 1945 bytes --]

Hi Martin,

Thanks for waiting on this update.

I instrumented the code in a couple key places and then exercised the bug. Attached is the log showing what happened.

Basically, I put two calls to my log function around the window selection in ’term-emulate-terminal and one inside ‘window—resize-root-window-vertically. Next, I opened a term window running a script that prints some output every few seconds. I had one frame running the script under term, and I selected a second frame and invoked some completing read command. As before, the minibuffer window shrank when the script printed some output.

You can find the start of each entry by searching for the regexp “^>>>>”. I wasn’t sure what to include in each entry, but I printed the selected frame, the selected window, that window’s buffer, and a backtrace. I can easily add more information and run the experiment again, if there’s something else you’d like to see.

Thanks!



> On Dec 2, 2020, at 1:24 PM, Sean Devlin <spd@toadstyle.org> wrote:
> 
> Hi Martin,
> 
> Thanks for all the helpful info!
> 
>> On Dec 2, 2020, at 2:52 AM, martin rudalics <rudalics@gmx.at> wrote:
>> 
>>> I forgot to say that _all_ normal mini window resizing goes through
>>> 'window--resize-root-window-vertically' in window.el.  So it will
>>> probably suffice to instrument just that function (in an already running
>>> Emacs only, else you have to rebuild because window.el is preloaded) and
>>> don't have to tinker with C code at all.
>> 
>> Imprecise again: The above covers only the automatic resizing triggered
>> by redisplay (which is what we are interested in).  Manual resizing the
>> minibuffer window is done in 'window--resize-mini-window' (also in
>> window.el) so if such manual resizing may happen in between you have to
>> instrument that as well.
> 
> I see, I’ll take a look at these functions. Thanks!
> 
>> 
>> martin


[-- Attachment #2.1: Type: text/html, Size: 1478 bytes --]

[-- Attachment #2.2: redisplay-minibuffer.log --]
[-- Type: application/octet-stream, Size: 108016 bytes --]

>>>> term-emulate-window before selection
selected frame: #<frame  *Minibuf-1* 0x7ffa290daa30>
selected window: #<window 4 on  *Minibuf-1*>
selected window buffer:  *Minibuf-1*
  backtrace()
  (let ((standard-output (get-buffer-create "*redisplay-minibuffer-log*"))) (princ (format ">>>> %s\n" msg)) (princ (format "selected frame: %s\n" (selected-frame))) (princ (format "selected window: %s\n" (selected-window))) (princ (format "selected window buffer: %s\n" (window-buffer (selected-window)))) (backtrace) (princ "\n\n\n"))
  my/redisplay-minibuffer-log("term-emulate-window before selection")
  (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1))))
  (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (if (eq (window-buffer win) (process-buffer proc)) (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))))
  (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win)))
  (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or ... ...)) (and (eq scroll ...) (not ...))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p ... win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not ...))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win))))
  (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> ... ...) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let (... ... ...) (when ... ... ... ... ... ... ... ...) (pcase-exhaustive ... ... ... ... ... ... ... ... ...) (unless ... ...) (if ... ... ...)))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq ... ...) (let ... ... ... ... ... ...)) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark ...)) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))))
  (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)))
  (save-current-buffer (set-buffer (process-buffer proc)) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  (with-current-buffer (process-buffer proc) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  term-emulate-terminal(#<process something> "something\15\n")
  read-from-minibuffer("Find file: " nil (keymap (9 . selectrum-insert-current-candidate) (10 . selectrum-submit-exact-input) (C-M-backspace . backward-kill-sexp) (27 keymap (115 keymap (114 . selectrum-prescient-toggle-regexp) (112 . selectrum-prescient-toggle-prefix) (108 . selectrum-prescient-toggle-literal) (105 . selectrum-prescient-toggle-initialism) (102 . selectrum-prescient-toggle-fuzzy) (97 . selectrum-prescient-toggle-anchored)) (67108991 . backward-kill-sexp)) (remap keymap (previous-matching-history-element . selectrum-select-from-history) (kill-ring-save . selectrum-kill-ring-save) (end-of-buffer . selectrum-goto-end) (beginning-of-buffer . selectrum-goto-beginning) (minibuffer-beginning-of-buffer . selectrum-goto-beginning) (scroll-up-command . selectrum-next-page) (scroll-down-command . selectrum-previous-page) (exit-minibuffer . selectrum-select-current-candidate) (next-line-or-history-element . selectrum-next-candidate) (previous-line-or-history-element . selectrum-previous-candidate) (next-line . selectrum-next-candidate) (previous-line . selectrum-previous-candidate) (minibuffer-keyboard-quit . abort-recursive-edit) (keyboard-quit . abort-recursive-edit)) keymap (remap keymap (previous-matching-history-element . selectrum-select-from-history)) (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (111 . embark-act) (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history)
  selectrum-read("Find file: " #f(compiled-function (input) #<bytecode -0x186c65d337d41520>) :default-candidate "~/tmp/" :initial-input "~/tmp/" :history file-name-history :require-match nil :may-modify-candidates t :minibuffer-completion-table read-file-name-internal :minibuffer-completion-predicate file-exists-p)
  selectrum--completing-read-file-name("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  apply(selectrum--completing-read-file-name ("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil))
  #f(compiled-function (&rest args) #<bytecode -0x5bf689d9cc60469>)("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/")
  read-file-name-default("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  selectrum-read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
  command-execute(find-file)



>>>> window--resize-root-window-vertically
selected frame: #<frame  *Minibuf-1* 0x7ffa290daa30>
selected window: #<window 4 on  *Minibuf-1*>
selected window buffer:  *Minibuf-1*
  backtrace()
  (let ((standard-output (get-buffer-create "*redisplay-minibuffer-log*"))) (princ (format ">>>> %s\n" msg)) (princ (format "selected frame: %s\n" (selected-frame))) (princ (format "selected window: %s\n" (selected-window))) (princ (format "selected window buffer: %s\n" (window-buffer (selected-window)))) (backtrace) (princ "\n\n\n"))
  my/redisplay-minibuffer-log("window--resize-root-window-vertically")
  window--resize-root-window-vertically(#<window 3 on *redisplay-minibuffer-log*> 70 t)
  select-window(#<window 10 on *something*>)
  (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1))))
  (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (if (eq (window-buffer win) (process-buffer proc)) (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))))
  (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win)))
  (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or ... ...)) (and (eq scroll ...) (not ...))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p ... win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not ...))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win))))
  (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> ... ...) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let (... ... ...) (when ... ... ... ... ... ... ... ...) (pcase-exhaustive ... ... ... ... ... ... ... ... ...) (unless ... ...) (if ... ... ...)))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq ... ...) (let ... ... ... ... ... ...)) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark ...)) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))))
  (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)))
  (save-current-buffer (set-buffer (process-buffer proc)) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  (with-current-buffer (process-buffer proc) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  term-emulate-terminal(#<process something> "something\15\n")
  read-from-minibuffer("Find file: " nil (keymap (9 . selectrum-insert-current-candidate) (10 . selectrum-submit-exact-input) (C-M-backspace . backward-kill-sexp) (27 keymap (115 keymap (114 . selectrum-prescient-toggle-regexp) (112 . selectrum-prescient-toggle-prefix) (108 . selectrum-prescient-toggle-literal) (105 . selectrum-prescient-toggle-initialism) (102 . selectrum-prescient-toggle-fuzzy) (97 . selectrum-prescient-toggle-anchored)) (67108991 . backward-kill-sexp)) (remap keymap (previous-matching-history-element . selectrum-select-from-history) (kill-ring-save . selectrum-kill-ring-save) (end-of-buffer . selectrum-goto-end) (beginning-of-buffer . selectrum-goto-beginning) (minibuffer-beginning-of-buffer . selectrum-goto-beginning) (scroll-up-command . selectrum-next-page) (scroll-down-command . selectrum-previous-page) (exit-minibuffer . selectrum-select-current-candidate) (next-line-or-history-element . selectrum-next-candidate) (previous-line-or-history-element . selectrum-previous-candidate) (next-line . selectrum-next-candidate) (previous-line . selectrum-previous-candidate) (minibuffer-keyboard-quit . abort-recursive-edit) (keyboard-quit . abort-recursive-edit)) keymap (remap keymap (previous-matching-history-element . selectrum-select-from-history)) (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (111 . embark-act) (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history)
  selectrum-read("Find file: " #f(compiled-function (input) #<bytecode -0x186c65d337d41520>) :default-candidate "~/tmp/" :initial-input "~/tmp/" :history file-name-history :require-match nil :may-modify-candidates t :minibuffer-completion-table read-file-name-internal :minibuffer-completion-predicate file-exists-p)
  selectrum--completing-read-file-name("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  apply(selectrum--completing-read-file-name ("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil))
  #f(compiled-function (&rest args) #<bytecode -0x5bf689d9cc60469>)("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/")
  read-file-name-default("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  selectrum-read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
  command-execute(find-file)



>>>> term-emulate-window after selection
selected frame: #<frame *something* 0x7ffa2b5fead8>
selected window: #<window 10 on *something*>
selected window buffer: *something*
  backtrace()
  (let ((standard-output (get-buffer-create "*redisplay-minibuffer-log*"))) (princ (format ">>>> %s\n" msg)) (princ (format "selected frame: %s\n" (selected-frame))) (princ (format "selected window: %s\n" (selected-window))) (princ (format "selected window buffer: %s\n" (window-buffer (selected-window)))) (backtrace) (princ "\n\n\n"))
  my/redisplay-minibuffer-log("term-emulate-window after selection")
  (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1))))
  (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (if (eq (window-buffer win) (process-buffer proc)) (progn (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))))
  (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p (point-max) win)))) (save-excursion (goto-char (point-max)) (recenter -1)))))
  (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or (eq scroll ...) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p (point) win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not (pos-visible-in-window-p ... win)))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win)))
  (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) (and (eq selected win) (or ... ...)) (and (eq scroll ...) (not ...))) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not (pos-visible-in-window-p ... win)) (recenter -1))) (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc)) (or term-scroll-snap-to-bottom (not ...))) (save-excursion (goto-char (point-max)) (recenter -1))))) (not (eq win last-win))))
  (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> ... ...) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let (... ... ...) (when ... ... ... ... ... ... ... ...) (pcase-exhaustive ... ... ... ... ... ... ... ... ...) (unless ... ...) (if ... ... ...)))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq ... ...) (let ... ... ... ... ... ...)) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark ...)) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)) (internal--after-save-selected-window save-selected-window--state))))
  (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny (match-string 1 str))) (ctl-params-end (and funny (match-end 1))) (ctl-end (if funny (match-end 0) (setq funny ...) (if funny ... ...) (1+ str-length)))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string (substring str i funny) locale-coding-system t)) (when (= funny str-length) (let (... ...) (while ... ...) (when ... ... ... ... ...))) (let ((old-column ...) (old-point ...) columns) (unless term-suppress-hard-newline (while ... ... ... ... ... ... ... ...)) (insert decoded-substring) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not ...) (let ... ... ... ...)) (when term-insert-mode (let ... ... ... ...)) (put-text-property old-point (point) 'font-lock-face term-current-face)) (when (eq (term-current-column) term-width) (term-move-columns -1) (setq term-do-line-wrapping (point))) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let (...) (term-move-to-column ...))) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless (and term-kill-echo-list ...) (term-down 1 t))) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function (decode-coding-string ... locale-coding-system t))) (27 (pcase (aref str ...) (91 ...) (68 ... ...) (77 ...) (55 ... ...) (56 ...) (99 ...) (65 ...))) ((or 0 14 15 'nil) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if (> ... 0) (setq term-terminal-undecoded-bytes ...) (if ... ... ... ...) (goto-char ...)) (make-local-variable 'term-pager-old-filter) (setq term-pager-old-filter (process-filter proc)) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or (= ... save-marker) (eq scroll t) (eq scroll ...) (and ... ...) (and ... ...)) (when term-scroll-snap-to-bottom (goto-char term-home-marker) (recenter 0)) (goto-char (process-mark proc)) (if (not ...) (recenter -1))) (when (and term-scroll-show-maximum-output (>= ... ...) (or term-scroll-snap-to-bottom ...)) (save-excursion (goto-char ...) (recenter -1))))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))
  (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params (and funny ...)) (ctl-params-end (and funny ...)) (ctl-end (if funny ... ... ... ...))) (when (> funny i) (when term-do-line-wrapping (term-down 1 t) (term-move-to-column 0) (setq term-do-line-wrapping nil)) (setq decoded-substring (decode-coding-string ... locale-coding-system t)) (when (= funny str-length) (let ... ... ...)) (let (... ... columns) (unless term-suppress-hard-newline ...) (insert decoded-substring) (setq term-current-column ... columns ...) (when ... ...) (when term-insert-mode ...) (put-text-property old-point ... ... term-current-face)) (when (eq ... term-width) (term-move-columns -1) (setq term-do-line-wrapping ...)) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and (<= ctl-end str-length) (aref str i)) (9 (let ... ...)) (13 (term-vertical-motion 0) (setq term-current-column term-start-line-column)) (10 (unless ... ...)) (8 (term-move-columns -1)) (7 (beep t)) (26 (funcall term-command-function ...)) (27 (pcase ... ... ... ... ... ... ... ...)) ((or 0 14 15 ...) nil)) (unless (eq term-do-line-wrapping (point)) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn (if ... ... ... ...) (make-local-variable ...) (setq term-pager-old-filter ...) (set-process-filter proc term-pager-filter) (setq i str-length)) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let ((scroll term-scroll-to-bottom-on-output)) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when (or ... ... ... ... ...) (when term-scroll-snap-to-bottom ... ...) (goto-char ...) (if ... ...)) (when (and term-scroll-show-maximum-output ... ...) (save-excursion ... ...)))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process (current-buffer)))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil)))
  (save-current-buffer (set-buffer (process-buffer proc)) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  (with-current-buffer (process-buffer proc) (let* ((i 0) funny decoded-substring save-point save-marker win (inhibit-read-only t) (buffer-undo-list t) (selected (selected-window)) last-win (str-length (length str))) (save-selected-window (when (marker-buffer term-pending-delete-marker) (delete-region term-pending-delete-marker (process-mark proc)) (set-marker term-pending-delete-marker nil)) (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) (setf term-vertical-motion (if (eq (window-buffer) (current-buffer)) 'vertical-motion 'term-buffer-vertical-motion)) (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction (when (and (> (point-max) (process-mark proc)) (term-in-line-mode)) (narrow-to-region (point-min) (process-mark proc))) (when term-log-buffer (princ str term-log-buffer)) (when term-terminal-undecoded-bytes (setq str (concat term-terminal-undecoded-bytes str)) (setq str-length (length str)) (setq term-terminal-undecoded-bytes nil)) (while (< i str-length) (setq funny (string-match term-control-seq-regexp str i)) (let ((ctl-params ...) (ctl-params-end ...) (ctl-end ...)) (when (> funny i) (when term-do-line-wrapping ... ... ...) (setq decoded-substring ...) (when ... ...) (let ... ... ... ... ... ... ...) (when ... ... ...) (setq term-current-column nil) (setq i funny)) (pcase-exhaustive (and ... ...) (9 ...) (13 ... ...) (10 ...) (8 ...) (7 ...) (26 ...) (27 ...) (... nil)) (unless (eq term-do-line-wrapping ...) (setq term-do-line-wrapping nil)) (if (term-handling-pager) (progn ... ... ... ... ...) (setq i ctl-end))))) (when (>= (term-current-row) term-height) (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) (when (stringp decoded-substring) (term-watch-for-password-prompt decoded-substring)) (when save-point (goto-char save-point) (set-marker save-point nil)) (when (and term-pending-frame (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) (setq term-pending-frame nil)) (setq win selected) (while (window-minibuffer-p win) (setq win (next-window win nil t))) (setq last-win win) (while (progn (setq win (next-window win nil t)) (when (eq (window-buffer win) (process-buffer proc)) (let (...) (my/redisplay-minibuffer-log "term-emulate-window before selection") (select-window win) (my/redisplay-minibuffer-log "term-emulate-window after selection") (when ... ... ... ...) (when ... ...))) (not (eq win last-win)))) (when (> term-buffer-maximum-size 0) (save-excursion (goto-char (process-mark (get-buffer-process ...))) (forward-line (- term-buffer-maximum-size)) (beginning-of-line) (delete-region (point-min) (point)))) (set-marker save-marker nil))) (when (get-buffer-window (current-buffer)) (redisplay)))
  term-emulate-terminal(#<process something> "something\15\n")
  read-from-minibuffer("Find file: " nil (keymap (9 . selectrum-insert-current-candidate) (10 . selectrum-submit-exact-input) (C-M-backspace . backward-kill-sexp) (27 keymap (115 keymap (114 . selectrum-prescient-toggle-regexp) (112 . selectrum-prescient-toggle-prefix) (108 . selectrum-prescient-toggle-literal) (105 . selectrum-prescient-toggle-initialism) (102 . selectrum-prescient-toggle-fuzzy) (97 . selectrum-prescient-toggle-anchored)) (67108991 . backward-kill-sexp)) (remap keymap (previous-matching-history-element . selectrum-select-from-history) (kill-ring-save . selectrum-kill-ring-save) (end-of-buffer . selectrum-goto-end) (beginning-of-buffer . selectrum-goto-beginning) (minibuffer-beginning-of-buffer . selectrum-goto-beginning) (scroll-up-command . selectrum-next-page) (scroll-down-command . selectrum-previous-page) (exit-minibuffer . selectrum-select-current-candidate) (next-line-or-history-element . selectrum-next-candidate) (previous-line-or-history-element . selectrum-previous-candidate) (next-line . selectrum-next-candidate) (previous-line . selectrum-previous-candidate) (minibuffer-keyboard-quit . abort-recursive-edit) (keyboard-quit . abort-recursive-edit)) keymap (remap keymap (previous-matching-history-element . selectrum-select-from-history)) (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . minibuffer-keyboard-quit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (111 . embark-act) (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history)
  selectrum-read("Find file: " #f(compiled-function (input) #<bytecode -0x186c65d337d41520>) :default-candidate "~/tmp/" :initial-input "~/tmp/" :history file-name-history :require-match nil :may-modify-candidates t :minibuffer-completion-table read-file-name-internal :minibuffer-completion-predicate file-exists-p)
  selectrum--completing-read-file-name("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  apply(selectrum--completing-read-file-name ("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil))
  #f(compiled-function (&rest args) #<bytecode -0x5bf689d9cc60469>)("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/tmp/" file-name-history "~/tmp/")
  read-file-name-default("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  selectrum-read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion nil nil)
  read-file-name("Find file: " nil "/Users/spd/tmp/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
  command-execute(find-file)

[-- Attachment #2.3: Type: text/html, Size: 5910 bytes --]

  reply	other threads:[~2020-12-12 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 21:21 bug#44933: 27.1; Ephemeral frame selection shrinks minibuffer Sean Devlin
2020-11-29  8:22 ` 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 [this message]
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=3C983E15-33B0-47B1-BDF1-10FD049AEF64@toadstyle.org \
    --to=spd@toadstyle.org \
    --cc=44933@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).