unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: Ingo Lohmar <i.lohmar@gmail.com>, emacs-devel@gnu.org
Subject: Re: include new package wconf.el in GNU ELPA
Date: Fri, 31 Jul 2015 15:56:03 +0200	[thread overview]
Message-ID: <87d1z8h1n0.fsf@gnu.org> (raw)
In-Reply-To: <55BB465D.8080704@gmx.at> (martin rudalics's message of "Fri, 31 Jul 2015 11:56:45 +0200")

martin rudalics <rudalics@gmx.at> writes:

>> Say I have just a single window with *scratch* and point at
>> (point-min).  I save that window config to a register.  Now I split
>> windows, and some of the windows still show *scratch*, but in there I
>> moved point to (point-max).
>>
>> What I like to have was that `C-x r j
>> <the-register-with-initial-wconf>` went back to the single-window
>> displaying *scratch* layout but the last recent point value would
>> stick to (point-max) instead of going back to (point-min).
>
> IIUC you eventually go to a window that was not part of the initial
> configuration and there you move `point'.  Then you restore the initial
> configuration and that last movement's value is lost.

Yes, pretty much that.  I don't have a real concept of a window other
than a container for a buffer so I can't tell if a window W1 in window
configuration WC1 is different to a window W2 in window configuration
WC2.  All I want is that when switching from WC1 to WC2, all buffers
which are displayed by some window in both WC1 and WC2 keep their window
point values from WC1.

Of course, there are corner cases like some buffer being displayed in
multiple windows in WC1 and/or WC2 which I haven't thought about yet.

> I'm afraid that want you want cannot be achieved easily.  In principle
> we'd have to record for each window the last position of its buffer's
> `point' at the time the window was selected together with a time
> stamp.

I think I'm fine with just the windows that are currently visible at the
point in time where the window config switch happens.

> When restoring the configuration we'd have to, for the selected
> window, check whether its `point' should be moved to some youngest
> previously stored position.  What if the window where the last move
> occurred was deleted before restoring the configuration?

When I deleted it, then I don't care about it.

> What if `point' moved at a time no window showing the buffer was
> selected?

Then I didn't move myself so that move is not interesting to me.

Bye,
Tassilo



  reply	other threads:[~2015-07-31 13:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 15:31 include new package wconf.el in GNU ELPA Ingo Lohmar
2015-07-30 18:57 ` Dmitry Gutov
2015-07-30 19:17 ` Tassilo Horn
2015-07-30 20:58   ` Ingo Lohmar
2015-07-31  5:35     ` Tassilo Horn
2015-07-31  7:10       ` martin rudalics
2015-07-31  8:27         ` Tassilo Horn
2015-07-31  9:56           ` martin rudalics
2015-07-31 13:39             ` Tassilo Horn
2015-08-01 10:50               ` martin rudalics
2015-08-03  7:45                 ` Tassilo Horn
2015-07-31  9:24       ` Ingo Lohmar
2015-07-31  7:10   ` martin rudalics
2015-07-31  8:37     ` Tassilo Horn
2015-07-31  9:56       ` martin rudalics
2015-07-31 13:56         ` Tassilo Horn [this message]
2015-08-01 10:50           ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1z8h1n0.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=i.lohmar@gmail.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).