GNU bug report logs - #32850
27.0.50; window-swap-states doesn't swap window prev/next-buffers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 27 Sep 2018 00:06:02 UTC

Severity: minor

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 32850 <at> debbugs.gnu.org
Subject: bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers
Date: Sun, 28 Oct 2018 21:09:15 +0200
>> @@ -5552,9 +5552,14 @@ window--state-get-1
>>   	 (buffer (window-buffer window))
>>   	 (selected (eq window (selected-window)))
>>   	 (next-buffers (when (window-live-p window)
>> -			 (window-next-buffers window)))
>> +	                 (delq nil (mapcar (lambda (buffer)
>> +                                             (and (buffer-live-p buffer) buffer))
>> +                                           (window-next-buffers window)))))
>>   	 (prev-buffers (when (window-live-p window)
>> -			 (window-prev-buffers window)))
>> +	                 (delq nil (mapcar (lambda (entry)
>> +                                             (and (buffer-live-p (nth 0 entry))
>> +                                                  entry))
>> +                                           (window-prev-buffers window)))))
>>   	 (head
>>   	  `(,type
>>               ,@(unless (window-next-sibling window) `((last . t)))
>
> OK.  Wouldn't 'window-state-put' run into a similar problem when a
> buffer in some prev or next list gets killed in between getting and
> putting?

'window-state-put' already checks for 'buffer-live-p', and checking for nil
is not needed in 'window-state-put' after the patch above will protect
against nil getting into the window state.




This bug report was last modified 6 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.