[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33532: 26.1; set-window-configuration does not restore display start
From: |
Juri Linkov |
Subject: |
bug#33532: 26.1; set-window-configuration does not restore display start |
Date: |
Sun, 02 Dec 2018 00:52:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> Perfect! This is what I need also for current-window-configuration!
>> Also, could this be made the default? Or is there some advantage in
>> using markers instead of the actual positions that can be restored?
>
> First of all we need a "reasonable" use case. The only purpose of a
> form like
>
> (let ((str (with-current-buffer buf (buffer-string))))
> (with-current-buffer buf
> (erase-buffer)
> (insert str)))
>
> is to annihilate all marker positions in buf and I have yet to
> understand why that could be useful. I'm sure you have something more
> reasonable in mind. Once we have such a use case we can decide how to
> best support it.
>
> AFAICT Emacs' window configurations use window start and point markers
> ever since. And while they interfere with reverting buffers (see
> Bug#33458 for a discussion) turning them into pure positions would
> break far too many things as to make that the default.
>
> We could store - in configurations and states - both, markers and
> their corresponding pure positions. Then if, when restoring a
> configuration or state, a marker's position has dropped to 1 while the
> corresponding saved pure position is > 1, use the the pure position
> instead. This should automatically fix your case and not violate any
> others. Juri what do you think?
I see no drawbacks, let's try storing both (maybe together with
metadata like dired-filename).
- bug#33532: 26.1; set-window-configuration does not restore display start,
Juri Linkov <=
- bug#33532: 26.1; set-window-configuration does not restore display start, martin rudalics, 2018/12/02
- bug#33532: 26.1; set-window-configuration does not restore display start, Juri Linkov, 2018/12/02
- bug#33532: 26.1; set-window-configuration does not restore display start, martin rudalics, 2018/12/04
- bug#33532: 26.1; set-window-configuration does not restore display start, Juri Linkov, 2018/12/04
- bug#33532: 26.1; set-window-configuration does not restore display start, martin rudalics, 2018/12/05
- bug#33532: 26.1; set-window-configuration does not restore display start, Juri Linkov, 2018/12/05