bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33871: 27.0.50; Revert Dired window saved in window configuration


From: Juri Linkov
Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration
Date: Mon, 25 Mar 2024 19:10:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> This was meant to denote a context inside a window.
>> Then maybe a better prefix would be 'window-point-context'?
>
> Do we want to restrict this to 'point'? What about start or end
> positions?

It's impossible to keep window-start and window-end intact
when text in the buffer changes.

>>> IIUC the context is stored but not the function to restore the position
>>> from the context.
>>
>> Indeed, there was an idea to store a function that restores point, but
>> this might be problematic when saving such a function to the desktop file.
>
> How comes?

Because a function is not writable.

>> Therefore, the patch has two separate functions to save and restore context
>> as mere strings and numbers.
>
>>>> And when the buffer is killed, there is no need
>>>> to restore a context in the killed buffer.
>>>
>>> If you don't intend to restore the context from the file the buffer was
>>> visiting.  Are you sure you don't want to do that?
>>
>> After the buffer was killed?  This doesn't seems necessary.
>
> Then why did we provide a facility to restore the point and start of a
> window via 'window-restore-killed-buffer-windows'?

'window-restore-killed-buffer-windows' already restores
point and start of a window, so there is no problem.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]