* Small frameset bug
@ 2020-02-03 14:55 JD Smith
2020-02-03 15:13 ` Robert Pluim
0 siblings, 1 reply; 3+ messages in thread
From: JD Smith @ 2020-02-03 14:55 UTC (permalink / raw)
To: emacs-devel; +Cc: lekktu
In `frameset--minibufferless-last-p`, the destructuring statements:
(pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1)))
(`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2))))
do not function as intended. Since the `assq` always produces ‘frameset—mini` as its car, hasmini1/2 are always set to this symbol. The subsequent `cond` still works as intended to sort minibufferless frames last:
(cond ((eq id-def1 t) t)
((eq id-def2 t) nil)
((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
((eq hasmini1 nil) (or id-def1 id-def2))
(t t))))
but the 3rd and 4th conditions are never met. This may cause confusion for anyone trying to use the ‘frameset—mini frame parameter.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small frameset bug
2020-02-03 14:55 Small frameset bug JD Smith
@ 2020-02-03 15:13 ` Robert Pluim
2020-02-03 15:21 ` JD Smith
0 siblings, 1 reply; 3+ messages in thread
From: Robert Pluim @ 2020-02-03 15:13 UTC (permalink / raw)
To: JD Smith; +Cc: lekktu, emacs-devel
>>>>> On Mon, 3 Feb 2020 09:55:48 -0500, JD Smith <jdtsmith@gmail.com> said:
JD> In `frameset--minibufferless-last-p`, the destructuring statements:
JD> (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1)))
JD> (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2))))
JD> do not function as intended. Since the `assq` always produces ‘frameset—mini` as its car, hasmini1/2 are always set to this symbol. The subsequent `cond` still works as intended to sort minibufferless frames last:
JD> (cond ((eq id-def1 t) t)
JD> ((eq id-def2 t) nil)
JD> ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
JD> ((eq hasmini1 nil) (or id-def1 id-def2))
JD> (t t))))
JD> but the 3rd and 4th conditions are never met. This may cause confusion for anyone trying to use the ‘frameset—mini frame parameter.
I guess youʼre looking in emacs-26? In emacs-27 'cdr' is applied to
the 'assq' result.
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small frameset bug
2020-02-03 15:13 ` Robert Pluim
@ 2020-02-03 15:21 ` JD Smith
0 siblings, 0 replies; 3+ messages in thread
From: JD Smith @ 2020-02-03 15:21 UTC (permalink / raw)
To: Robert Pluim; +Cc: lekktu, emacs-devel
> On Feb 3, 2020, at 10:13 AM, Robert Pluim <rpluim@gmail.com> wrote:
>
>>>>>> On Mon, 3 Feb 2020 09:55:48 -0500, JD Smith <jdtsmith@gmail.com> said:
>
> JD> In `frameset--minibufferless-last-p`, the destructuring statements:
>
> JD> (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1)))
> JD> (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2))))
>
> JD> do not function as intended. Since the `assq` always produces ‘frameset—mini` as its car, hasmini1/2 are always set to this symbol. The subsequent `cond` still works as intended to sort minibufferless frames last:
>
> JD> (cond ((eq id-def1 t) t)
> JD> ((eq id-def2 t) nil)
> JD> ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
> JD> ((eq hasmini1 nil) (or id-def1 id-def2))
> JD> (t t))))
>
> JD> but the 3rd and 4th conditions are never met. This may cause confusion for anyone trying to use the ‘frameset—mini frame parameter.
>
> I guess youʼre looking in emacs-26? In emacs-27 'cdr' is applied to
> the 'assq' result.
Ahah, looks like this has been fixed and documented. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-03 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-03 14:55 Small frameset bug JD Smith
2020-02-03 15:13 ` Robert Pluim
2020-02-03 15:21 ` JD Smith
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).