[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix for bug#29935 copyright-update inserts year at random places
From: |
martin rudalics |
Subject: |
Re: fix for bug#29935 copyright-update inserts year at random places |
Date: |
Mon, 08 Jan 2018 19:18:09 +0100 |
> If `x` is just a window, how does quit-restore-window know that we want
> to hide BUF (and not some other buffer that happens to be displayed
> in the window once we get to quit-restore-window)?
>
> If `x` is just a window, how does quit-restore-window know whether BUF was
> already displayed in that window before temporary-undisplay-buffer was
> called (in order to decide whether to change the window's buffer or not)?
`quit-restore-window' remembers what buffer the window it quits
displayed before calling `with-temp-buffer-window' and also the
respective `window-start' and `window-point' positions, sometimes also
the window's size.
>> So please tell what's missing in `with-temp-buffer-window'.
>
> It forces scoping.
Where and how? IIUC your
(let ((x (temporary-display-buffer BUF)))
+
(temporary-undisplay-buffer x)
would force scoping (and is therefore IMHO not useful for our purpose)
but `quit-restore-window' doesn't rely on any scoping.
> IOW it can't be used when the
> temporary-undisplay-buffer part needs to be done at some arbitrary later
> time (e.g. after the user has run a bunch of commands).
Please show me an example. `with-temp-buffer-window' was explicitly
designed to handle what you describe here so if it doesn't for you it
clearly failed to achieve its aim.
martin
- Re: fix for bug#29935 copyright-update inserts year at random places, (continued)
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/04
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/04
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/07
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/07
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, Eli Zaretskii, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/11
- Re: fix for bug#29935 copyright-update inserts year at random places,
martin rudalics <=
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/09
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/09
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/10