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: Tue, 15 Feb 2022 21:30:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> You meant remembering the file name and window-point in a buffer-local 
>> variable?
>> Then it should be an alist with all windows of the same Dired buffer, e.g.
>>
>>    (setq-local dired-positions
>>      '((#<window 1 on dired> dired-file-1 window-point-1)
>>        (#<window 2 on dired> dired-file-2 window-point-2)
>>        ...))
>
> Or a window parameter of each dired window.

In case of a window parameter wouldn't the situation be inverted,
so it will use an alist too, but where keys are all dired buffers
displayed in that window from the prev-buffers list:

  (set-window-parameter window 'dired-positions
    '((#<buffer *dired-1*> dired-file-1 window-point-1)
      (#<buffer *dired-2*> dired-file-2 window-point-2)
      ...))

> Note that the third item
> would be just the offset of 'window-point' from its line beginning
> position.  'window-point' itself is completely useless here.

Maybe 'window-start' would be more useful?





reply via email to

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