all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* display-buffer-use-some-frame
@ 2018-10-28 18:37 martin rudalics
  2018-12-11 19:31 ` display-buffer-use-some-frame Stephen Leake
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2018-10-28 18:37 UTC (permalink / raw)
  To: emacs-devel, Stephen Leake

Sorry for returning to this after more than three years.  Somehow your
final installation must have slipped under the carpet here.  As it
stands 'display-buffer-use-some-frame' has the following deficencies:

- The first sentence of the doc-string doesn't fit on a whole line.

- The line

          (window (and frame (get-lru-window frame nil (cdr (assq 'inhibit-same-window alist))))))

   is too long.

- In the call

           (window--display-buffer
            buffer window 'frame alist display-buffer-mark-dedicated)

   you should write 'reuse instead of 'frame.  The latter means that a
   new frame has been made but you just reuse an existing window.  I
   noticed this because I made the same error in (an undocumented part
   of) 'display-buffer-in-child-frame'.

Please fix these on the release branch.  Also, I wonder why you call
'frame-first-window' here:

                            (not (window-dedicated-p
                                  (or
                                   (get-lru-window frame)
                                   (frame-first-window frame)))))

It's nowhere used in the rest of the function.  What am I missing?

Thank you, martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-10-28 18:37 display-buffer-use-some-frame martin rudalics
@ 2018-12-11 19:31 ` Stephen Leake
  2018-12-12  8:31   ` display-buffer-use-some-frame martin rudalics
  2018-12-23 18:23   ` display-buffer-use-some-frame Stephen Leake
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Leake @ 2018-12-11 19:31 UTC (permalink / raw)
  To: emacs-devel

Finally getting back to this.

martin rudalics <rudalics@gmx.at> writes:

> - The first sentence of the doc-string doesn't fit on a whole line.
>
> - The line
>
>          (window (and frame (get-lru-window frame nil (cdr (assq 'inhibit-same-window alist))))))
>
>   is too long.

I see you've fixed these, thanks.

> - In the call
>
>           (window--display-buffer
>            buffer window 'frame alist display-buffer-mark-dedicated)
>
>   you should write 'reuse instead of 'frame.  The latter means that a
>   new frame has been made but you just reuse an existing window.  I
>   noticed this because I made the same error in (an undocumented part
>   of) 'display-buffer-in-child-frame'.

I'll fix this after the test below.

> Also, I wonder why you call
> 'frame-first-window' here:
>
>                            (not (window-dedicated-p
>                                  (or
>                                   (get-lru-window frame)
>                                   (frame-first-window frame)))))

I don't remember. I'll test for a while without it.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-11 19:31 ` display-buffer-use-some-frame Stephen Leake
@ 2018-12-12  8:31   ` martin rudalics
  2018-12-23 18:23   ` display-buffer-use-some-frame Stephen Leake
  1 sibling, 0 replies; 8+ messages in thread
From: martin rudalics @ 2018-12-12  8:31 UTC (permalink / raw)
  To: Stephen Leake, emacs-devel

 >> - In the call
 >>
 >>            (window--display-buffer
 >>             buffer window 'frame alist display-buffer-mark-dedicated)
 >>
 >>    you should write 'reuse instead of 'frame.  The latter means that a
 >>    new frame has been made but you just reuse an existing window.  I
 >>    noticed this because I made the same error in (an undocumented part
 >>    of) 'display-buffer-in-child-frame'.
 >
 > I'll fix this after the test below.

Fine.

 >> Also, I wonder why you call
 >> 'frame-first-window' here:
 >>
 >>                             (not (window-dedicated-p
 >>                                   (or
 >>                                    (get-lru-window frame)
 >>                                    (frame-first-window frame)))))
 >
 > I don't remember. I'll test for a while without it.

Please do that.

Thanks, martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-11 19:31 ` display-buffer-use-some-frame Stephen Leake
  2018-12-12  8:31   ` display-buffer-use-some-frame martin rudalics
@ 2018-12-23 18:23   ` Stephen Leake
  2018-12-23 19:07     ` display-buffer-use-some-frame martin rudalics
  2018-12-23 22:19     ` display-buffer-use-some-frame Stefan Monnier
  1 sibling, 2 replies; 8+ messages in thread
From: Stephen Leake @ 2018-12-23 18:23 UTC (permalink / raw)
  To: emacs-devel

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> martin rudalics <rudalics@gmx.at> writes:
>
>> - In the call
>>
>>           (window--display-buffer
>>            buffer window 'frame alist display-buffer-mark-dedicated)
>>
>>   you should write 'reuse instead of 'frame.  The latter means that a
>>   new frame has been made but you just reuse an existing window.  I
>>   noticed this because I made the same error in (an undocumented part
>>   of) 'display-buffer-in-child-frame'.
>
> I'll fix this after the test below.

Committed in emacs-26

>> Also, I wonder why you call
>> 'frame-first-window' here:
>>
>>                            (not (window-dedicated-p
>>                                  (or
>>                                   (get-lru-window frame)
>>                                   (frame-first-window frame)))))
>
> I don't remember. I'll test for a while without it.

No problems with the testing. get-lru-window never returns a dedicated
window, so this can be simplified to:

  (let* ((predicate
          (or (cdr (assq 'frame-predicate alist))
              (lambda (frame)
                (and (not (eq frame (selected-frame)))
                     (get-lru-window frame)))))
                     
Committed in emacs-26

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-23 18:23   ` display-buffer-use-some-frame Stephen Leake
@ 2018-12-23 19:07     ` martin rudalics
  2018-12-23 22:19     ` display-buffer-use-some-frame Stefan Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: martin rudalics @ 2018-12-23 19:07 UTC (permalink / raw)
  To: Stephen Leake, emacs-devel

 > Committed in emacs-26

OK.

 > No problems with the testing. get-lru-window never returns a dedicated
 > window, so this can be simplified to:
 >
 >    (let* ((predicate
 >            (or (cdr (assq 'frame-predicate alist))
 >                (lambda (frame)
 >                  (and (not (eq frame (selected-frame)))
 >                       (get-lru-window frame)))))
 >
 > Committed in emacs-26

Thanks.  AFAICT the changes are innocuous.  But next time please
contact Eli before committing to Emacs 26.

Thanks again, martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-23 18:23   ` display-buffer-use-some-frame Stephen Leake
  2018-12-23 19:07     ` display-buffer-use-some-frame martin rudalics
@ 2018-12-23 22:19     ` Stefan Monnier
  2018-12-24  8:13       ` display-buffer-use-some-frame martin rudalics
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2018-12-23 22:19 UTC (permalink / raw)
  To: emacs-devel

> No problems with the testing. get-lru-window never returns a dedicated
> window,

Hmmm... why?  IOW how do we know that?
Dedicated windows almost never appear if you use the default
configuration: they only appear if you explicitly request them in your
config, so I'd like to make sure that "get-lru-window never returns a dedicated
window" wasn't just an accident because your tests were mae in a context
where there aren't any dedicated windows.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-23 22:19     ` display-buffer-use-some-frame Stefan Monnier
@ 2018-12-24  8:13       ` martin rudalics
  2018-12-24 13:53         ` display-buffer-use-some-frame Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2018-12-24  8:13 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

 >> No problems with the testing. get-lru-window never returns a dedicated
 >> window,
 >
 > Hmmm... why?  IOW how do we know that?
 > Dedicated windows almost never appear if you use the default
 > configuration: they only appear if you explicitly request them in your
 > config, so I'd like to make sure that "get-lru-window never returns a dedicated
 > window" wasn't just an accident because your tests were mae in a context
 > where there aren't any dedicated windows.

What Stephen probably means is that all 'get-lru-window' calls in the
context at hand have their second argument nil and consequently never
return a dedicated window.

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: display-buffer-use-some-frame
  2018-12-24  8:13       ` display-buffer-use-some-frame martin rudalics
@ 2018-12-24 13:53         ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2018-12-24 13:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

> What Stephen probably means is that all 'get-lru-window' calls in the
> context at hand have their second argument nil and consequently never
> return a dedicated window.

Ah, makes sense, thank you,


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-12-24 13:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-28 18:37 display-buffer-use-some-frame martin rudalics
2018-12-11 19:31 ` display-buffer-use-some-frame Stephen Leake
2018-12-12  8:31   ` display-buffer-use-some-frame martin rudalics
2018-12-23 18:23   ` display-buffer-use-some-frame Stephen Leake
2018-12-23 19:07     ` display-buffer-use-some-frame martin rudalics
2018-12-23 22:19     ` display-buffer-use-some-frame Stefan Monnier
2018-12-24  8:13       ` display-buffer-use-some-frame martin rudalics
2018-12-24 13:53         ` display-buffer-use-some-frame Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.