unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: martin rudalics <rudalics@gmx.at>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: How to restore the layout?
Date: Wed, 3 Jul 2013 11:03:00 +0200	[thread overview]
Message-ID: <CAAeL0SR+shhnYP34LVcC9c=0d0GtyjGwFtSnCzCmL8fM2CnxSw@mail.gmail.com> (raw)
In-Reply-To: <54cfe77b-f378-4402-b185-21372177ed60@default>

On Tue, Jul 2, 2013 at 9:40 PM, Drew Adams <drew.adams@oracle.com> wrote:

> 2. No one has said that anything you have suggested is convoluted or
> artificial.  I don't even think that, let alone have not said it.

Please, don't take my comment as more than it was, just that I thought
that my use case is equally common. Wasn't accusing you of anything.
:-)

> Yes, anyone is free to change properties of the minibuffer frame after it
> is created.  So what?  It does not follow that everyone or most will want
> Desktop to save and restore such changes.  Time will tell, I guess.

Sure.

> Note that the recently added `fullscreen' parameter values are similar
> to specifying functional behavior: they do not specify frame boundaries
> explicitly but record the user wish that the frame fill the full screen
> or whatever.  The implementation presumably leaves it up to the window
> mgr to implement that function, and one cannot specify an arbitrary
> function, but the idea is a bit similar: we do not record literal frame
> coordinates & boundaries for a fullscreen frame.

I agree that ways of specifying more generic behavior would be good.

> If useful or common values (symbols) were implemented to encompass the
> idea of a minibuffer frame extending across the screen bottom then one
> would not need code to do that using code.

For the "across the screen" bit you can of course use (fullscreen .
fullwidth), though I see an interesting bug where the frame does not
really goes fullwidth until selected. But for positioning it at the
bottom, (top - N) is only a crude tool that requires some code.

> Yes, GNU Emacs has taken over the landscape,
> but that was not because of Epoch's standalone minibuffer.  FWIW.

I'm sure of that ;-)

> Sounds good.  That was my guess, that this is just something that you
> cannot implement immediately, for whatever reasons.

Because it breaks restoring after the roundtrip GUI -> tty -> GUI. But
it is something I must fix, like the warning messages in that same
roundtrip about invalid colors.

> Sounds like trying to make a virtue of the necessity of a particular
> implementation.

No, I'm not. Just that I can see many things that could be
customizable (via defcustom, I mean) but I don't think all should be;
only the common ones. At the end, which ones do get their own
customization option and which ones do not is not mine (alone) to
decide, it's a community thing (and of course, anyone can add further
options afterwards even if they didn't strike me as necessary).

> In general, I would suggest saving stuff but letting restoration ignore
> some of it, according to user preference etc.  IOW, it seems like it
> would be more flexible to save and optionally not restore than to
> optionally not save (and then not have the possibility of restoring).
>
> This is assuming other things are equal, which they might not be.
> But if they are, then late binding here is better: let the decision
> be made at the next session.

In general, I agree.

As for the devil in the details: there are things that make sense to
delete on saving (like unwanted windows). And in some cases, the code
is cleaner if you delete on saving. desktop--restore-frames is already
more complex than desktop--save-frames, and I don't think that trend
will change.

Something to decide feature by feature.

> Or accomplish the same end some other way.  Worth thinking about.

Yes, of course. Perhaps killing some windows/buffers will be a common
enough operation that some defcustom should be added, for example.

In fact, the example I gave is tricky, because I don't want to delete
IELM windows while I'm working (for example, if I do M-x desktop-save
during a session). So perhaps that's one of these cases where deleting
on restoring is more effective and simple.

> Hopefully accomplish the same end another way.  This is something users
> should be able to do easily.

I'm not sure what the UI would be for that.

> AFAIK, you will never be able to get rid of the frame created initially,
> which has its own minibuffer.  That was the point here.  If you want a
> standalone minibuffer frame, and if you want it to be the only such
> (which I would again argue is the typical case of MF users), then AFAIK
> you must create the MF at the outset.

Yes, you can delete the initial frame, just try this:

(let* ((s (selected-frame))
       (f (make-frame '((minibuffer . only)
                        (height . 2)
                        (tool-bar-lines .0)
                        (menu-bar-lines . 0)))))
  (make-frame `((minibuffer . ,(minibuffer-window f))))
  (delete-frame s))

> Believe me, I've submitted enough bug reports for which I had to point
> out a startup sequence, because adding a standalone minibuffer frame
> later does not give you the same behavior.

Oh, I think the minibuffer should give the same behavior, but I have
not trouble believing you that it doesn't. Lots of tricky details.

> Better to think about some of these things ahead of time.  Sounds like
> you're thinking more in terms of hooks to dance around Desktop than
> customization options to prevent it from doing the things you would have
> users dance around.  I could be wrong but that's my impression based on
> some of what you wrote above.  I would sooner you implemented (a) and
> (b) above, and let users choose.

As said above, it's not that I think that, it's that the number of
possible customizations is unbounded, while the number of defcustoms
we can sensibly add is bounded and relatively small, so we have to
pick our battles.

> Or decide it's not worth it and not use Desktop to restore frames.

That's a possibility I cannot avoid in any way.

> I hope, at least, that users will be able to use Desktop without the
> frame/window restoration.

(setq desktop-restore-frames nil)

Or, if I we decide to turn it into a pseudo-minor mode, like
desktop-save-mode, (desktop-restore-frames -1).

> And I hope they will be able to restore
> windows & frames without necessarily restoring all the other stuff
> that Desktop can handle.

As discussed previously, that's a worthwhile goal, but not one I'm
pursuing right now.

> But you're not necessarily acting on or interacting with a single buffer
> or frame, in general.

*In general*, yes, I do. If not a single buffer, at least a single
window, two at most, more than 99% of the time. And definitely a
single frame.

> I'm not saying that anyone needs to use a standalone minibuffer.
> I'm saying that someone who does do that has a single place to look
> for command input/output.

Yes, of course. At this point, I'm just explaining why do I think that
it isn't a good setup *for me*.

> Wait until you are interacting with multiple frames, and there is NO
> "main, or only, frame".  Then we can talk again about "locality". ;-)

My brain is wired to look at nearby places, not always at the same
place. Again, that's why recentering scrolling doesn't work for me. I
could put my eyes in the center line of the window and enjoy the
recentering, but I do not. I really do not.

    J



  reply	other threads:[~2013-07-03  9:03 UTC|newest]

Thread overview: 264+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 13:45 How to restore the layout? Angelo Graziosi
2013-06-22 23:01 ` Xue Fuqiao
2013-06-23 10:24   ` Angelo Graziosi
2013-06-23  8:26 ` martin rudalics
2013-06-23 10:35   ` Angelo Graziosi
2013-06-24 17:05     ` martin rudalics
2013-06-24 17:23       ` Juanma Barranquero
2013-06-24 17:30         ` Eli Zaretskii
2013-06-24 17:52           ` Juanma Barranquero
2013-06-24 18:18             ` Eli Zaretskii
2013-06-24 18:33               ` Stephen Berman
2013-06-24 18:33             ` Stephen Berman
2013-06-24 20:10               ` Juanma Barranquero
2013-06-24 20:11                 ` Juanma Barranquero
2013-06-24 20:22                 ` Jambunathan K
2013-06-24 20:28                   ` Juanma Barranquero
2013-06-24 20:57                     ` martin rudalics
2013-06-24 22:47                       ` Juanma Barranquero
2013-06-24 23:38                         ` Juri Linkov
2013-06-24 23:43                           ` Juanma Barranquero
2013-06-25  6:03                             ` Juri Linkov
2013-06-25 16:05                               ` Juanma Barranquero
2013-06-25  6:46                         ` martin rudalics
2013-06-25 15:32                           ` Juanma Barranquero
2013-06-25 16:32                             ` Stefan Monnier
2013-06-25 16:38                               ` martin rudalics
2013-06-25 17:21                                 ` Juanma Barranquero
2013-06-25 21:36                                   ` Angelo Graziosi
2013-06-25 21:40                                     ` Juanma Barranquero
2013-06-26  0:52                                       ` chad
2013-06-26 14:03                                         ` chad
2013-06-26 17:21                                           ` Juanma Barranquero
2013-06-26 18:27                                             ` martin rudalics
2013-06-26 23:05                                               ` Juanma Barranquero
2013-06-27  2:35                                                 ` Stefan Monnier
2013-06-27  2:57                                                   ` Juanma Barranquero
2013-06-27  4:30                                                     ` Stefan Monnier
2013-06-27  8:55                                                       ` Juanma Barranquero
2013-06-27 15:20                                                         ` Stefan Monnier
2013-06-27 15:23                                                           ` Juanma Barranquero
2013-06-27  8:05                                                 ` martin rudalics
2013-06-27  9:00                                                   ` Juanma Barranquero
2013-06-27  9:38                                                     ` martin rudalics
2013-06-27 21:02                                                       ` Juanma Barranquero
2013-06-28  6:34                                                         ` martin rudalics
2013-06-28 11:53                                                           ` Juanma Barranquero
2013-06-28 14:02                                                             ` martin rudalics
2013-06-27 13:29                                       ` Angelo Graziosi
2013-06-27 14:05                                         ` Juanma Barranquero
2013-06-27 14:31                                           ` Angelo Graziosi
2013-06-27 14:45                                             ` Juanma Barranquero
2013-06-27 18:27                                               ` martin rudalics
2013-06-27 20:30                                                 ` Juanma Barranquero
2013-06-27 20:49                                                   ` martin rudalics
2013-06-27 20:52                                                     ` Juanma Barranquero
2013-06-27 21:00                                                       ` martin rudalics
2013-06-27 21:03                                                         ` Juanma Barranquero
2013-06-27 23:33                                                           ` Juanma Barranquero
2013-06-28  6:07                                                             ` Eli Zaretskii
2013-06-28  8:17                                                               ` Jan Djärv
2013-06-28 11:54                                                                 ` Juanma Barranquero
2013-06-28 11:48                                                               ` Juanma Barranquero
2013-06-28 17:55                                                                 ` Eli Zaretskii
2013-06-28 18:15                                                                   ` Stefan Monnier
2013-06-28 17:22                                                               ` Stefan Monnier
2013-06-28 17:51                                                                 ` Juanma Barranquero
2013-06-28 19:36                                                                   ` Stefan Monnier
2013-06-29  0:54                                                                     ` Juanma Barranquero
2013-06-29  8:29                                                                       ` martin rudalics
2013-06-29 22:06                                                                         ` Juanma Barranquero
2013-06-30  9:35                                                                           ` martin rudalics
2013-06-30 10:32                                                                             ` Juanma Barranquero
2013-06-30 12:55                                                                               ` martin rudalics
2013-06-30 17:55                                                                                 ` Juanma Barranquero
2013-07-01  6:48                                                                                   ` martin rudalics
2013-07-04 20:41                                                                                   ` Angelo Graziosi
2013-07-04 21:34                                                                                     ` Juanma Barranquero
2013-07-04 23:10                                                                                       ` Angelo Graziosi
2013-07-04 23:19                                                                                         ` Juanma Barranquero
2013-07-05  7:45                                                                                           ` martin rudalics
2013-07-05  9:37                                                                                             ` Juanma Barranquero
2013-07-05 14:02                                                                                               ` Angelo Graziosi
2013-07-05 14:55                                                                                                 ` Juanma Barranquero
2013-07-05 15:02                                                                                                   ` Angelo Graziosi
2013-07-05 15:10                                                                                                     ` Juanma Barranquero
2013-07-05 15:30                                                                                                       ` martin rudalics
2013-07-05 15:39                                                                                                         ` Juanma Barranquero
2013-07-05 15:54                                                                                                           ` martin rudalics
2013-07-05 16:02                                                                                                             ` Juanma Barranquero
2013-07-05 17:03                                                                                                               ` martin rudalics
2013-07-05 17:06                                                                                                                 ` Juanma Barranquero
2013-07-05 17:37                                                                                                                   ` martin rudalics
2013-07-06 14:32                                                                                                                 ` Juanma Barranquero
2013-07-07 10:57                                                                                                                   ` martin rudalics
2013-07-05 15:21                                                                                                   ` martin rudalics
2013-07-05 15:26                                                                                                     ` Juanma Barranquero
2013-07-05 15:39                                                                                                       ` martin rudalics
2013-07-05 15:40                                                                                                         ` Juanma Barranquero
2013-07-05 15:55                                                                                                           ` martin rudalics
2013-07-05 17:04                                                                                                       ` Angelo Graziosi
2013-07-05 17:09                                                                                                         ` Juanma Barranquero
2013-07-05  7:45                                                                                         ` martin rudalics
2013-07-05 10:07                                                                                           ` Angelo Graziosi
2013-07-05 12:58                                                                                             ` martin rudalics
2013-07-05 13:13                                                                                               ` Jan Djärv
2013-07-05 13:41                                                                                               ` Angelo Graziosi
2013-07-05 14:42                                                                                                 ` martin rudalics
2013-07-05 18:22                                                                                                   ` Eli Zaretskii
2013-07-05 20:30                                                                                                     ` Angelo Graziosi
2013-07-06  8:47                                                                                                       ` martin rudalics
2013-07-06  9:10                                                                                                         ` Angelo Graziosi
2013-07-06 10:44                                                                                                           ` martin rudalics
2013-07-06 11:04                                                                                                             ` Angelo Graziosi
2013-07-06 13:06                                                                                                               ` martin rudalics
2013-07-06 13:18                                                                                                                 ` Eli Zaretskii
2013-07-06 13:43                                                                                                                   ` martin rudalics
2013-07-06 13:53                                                                                                                     ` Eli Zaretskii
2013-07-07 10:56                                                                                                                       ` martin rudalics
2013-07-06 14:27                                                                                                                 ` Angelo Graziosi
2013-07-06 18:57                                                                                                                 ` Drew Adams
2013-07-07 10:57                                                                                                                   ` martin rudalics
2013-07-07 11:32                                                                                                                     ` Juanma Barranquero
2013-07-07 12:46                                                                                                                       ` martin rudalics
2013-07-07 15:53                                                                                                                         ` Drew Adams
2013-07-08  6:47                                                                                                                           ` martin rudalics
2013-07-08 13:56                                                                                                                             ` Drew Adams
2013-07-08 17:29                                                                                                                               ` Juanma Barranquero
2013-07-09  9:08                                                                                                                                 ` martin rudalics
2013-07-09  9:07                                                                                                                               ` martin rudalics
2013-07-09 15:32                                                                                                                                 ` Drew Adams
2013-07-10  7:20                                                                                                                                   ` martin rudalics
2013-07-10 13:50                                                                                                                                     ` Drew Adams
2013-07-06  9:13                                                                                                         ` Juanma Barranquero
2013-07-06 10:44                                                                                                           ` martin rudalics
2013-07-06 14:39                                                                                                             ` Juanma Barranquero
2013-07-05  7:44                                                                                       ` martin rudalics
2013-06-29  8:51                                                                   ` Stephen Leake
2013-06-29 18:00                                                                     ` chad
2013-06-29 18:12                                                                       ` Eli Zaretskii
2013-06-29 22:36                                                                     ` Juanma Barranquero
2013-06-30 15:27                                                                       ` Stephen Leake
2013-06-30 18:12                                                                         ` Juanma Barranquero
2013-06-28  8:13                                                     ` Jan Djärv
2013-06-28  8:31                                                       ` martin rudalics
2013-06-28  8:46                                                         ` Jan Djärv
     [not found]                                                           ` <51CD5489.10902@g>
2013-06-28  9:16                                                           ` martin rudalics
2013-06-28 10:01                                                             ` Jan Djärv
2013-06-28 10:19                                                               ` martin rudalics
2013-06-28 10:26                                                                 ` Jan Djärv
2013-06-28 11:50                                                                   ` martin rudalics
2013-06-29  8:47                                                                     ` Stephen Leake
2013-06-29 22:26                                                                       ` Juanma Barranquero
2013-06-30 15:25                                                                         ` Stephen Leake
2013-06-30 18:09                                                                           ` Juanma Barranquero
2013-06-28 12:46                                                                   ` Eli Zaretskii
2013-06-28 14:03                                                                     ` martin rudalics
2013-06-28 14:58                                                                       ` Eli Zaretskii
2013-06-28 15:06                                                                         ` Juanma Barranquero
2013-06-28 17:53                                                                           ` Eli Zaretskii
2013-06-29  0:49                                                                             ` Juanma Barranquero
2013-06-28 15:22                                                                       ` Jan Djärv
2013-06-28 15:32                                                                         ` Juanma Barranquero
2013-06-28 15:53                                                                           ` Jan Djärv
2013-06-28 12:05                                                                 ` Juanma Barranquero
2013-06-28 13:06                                                                   ` Eli Zaretskii
2013-06-28 13:22                                                                     ` Juanma Barranquero
2013-06-28 14:51                                                                       ` Eli Zaretskii
2013-06-28 15:22                                                                         ` Juanma Barranquero
2013-06-28 17:52                                                                           ` Eli Zaretskii
2013-06-29  0:47                                                                             ` Juanma Barranquero
2013-06-29  8:39                                                                               ` Stephen Leake
2013-06-29 22:18                                                                                 ` Juanma Barranquero
2013-06-29 23:48                                                                                   ` Drew Adams
2013-06-30 10:16                                                                                     ` Juanma Barranquero
2013-06-30 16:30                                                                                       ` Drew Adams
2013-06-30 18:15                                                                                         ` Juanma Barranquero
2013-06-30  7:51                                                                                   ` Jan Djärv
2013-06-30  9:35                                                                                     ` martin rudalics
2013-06-30 10:01                                                                                       ` Jan Djärv
2013-06-30 10:11                                                                                         ` martin rudalics
2013-06-30 10:34                                                                                           ` Juanma Barranquero
2013-06-30 10:29                                                                                     ` Juanma Barranquero
2013-06-30 12:55                                                                                       ` martin rudalics
2013-06-30 18:03                                                                                         ` Juanma Barranquero
2013-06-30 21:32                                                                                           ` Jan Djärv
2013-07-01  0:28                                                                                             ` Juanma Barranquero
2013-07-01  3:31                                                                                               ` Juanma Barranquero
2013-07-01  6:50                                                                                                 ` martin rudalics
2013-07-01 10:38                                                                                                   ` Juanma Barranquero
2013-07-02 10:38                                                                                                     ` martin rudalics
2013-07-02 16:32                                                                                                       ` Juanma Barranquero
2013-07-03  9:27                                                                                                         ` martin rudalics
2013-07-03 10:36                                                                                                           ` Juanma Barranquero
2013-07-03 12:42                                                                                                             ` martin rudalics
2013-07-03 14:20                                                                                                               ` Juanma Barranquero
2013-07-03 14:32                                                                                                                 ` Juanma Barranquero
2013-07-04  9:35                                                                                                                 ` martin rudalics
2013-07-03 14:08                                                                                                           ` Drew Adams
2013-07-08  2:50                                                                                                       ` Juanma Barranquero
2013-07-08  6:47                                                                                                         ` martin rudalics
2013-07-08 12:13                                                                                                           ` Juanma Barranquero
2013-07-01 14:11                                                                                                   ` Drew Adams
2013-07-01 14:40                                                                                                     ` Juanma Barranquero
2013-07-01 16:03                                                                                                       ` Drew Adams
2013-07-01 16:37                                                                                                         ` Juanma Barranquero
2013-07-01 18:03                                                                                                           ` Drew Adams
2013-07-02  0:25                                                                                                             ` Juanma Barranquero
2013-07-02  3:46                                                                                                               ` Drew Adams
2013-07-02 17:32                                                                                                                 ` Juanma Barranquero
2013-07-02 19:40                                                                                                                   ` Drew Adams
2013-07-03  9:03                                                                                                                     ` Juanma Barranquero [this message]
2013-07-03  9:34                                                                                                                       ` martin rudalics
2013-07-03 10:38                                                                                                                         ` Juanma Barranquero
2013-07-03 12:42                                                                                                                           ` martin rudalics
2013-07-03 14:35                                                                                                                             ` Juanma Barranquero
2013-07-04  9:35                                                                                                                               ` martin rudalics
2013-07-04 14:17                                                                                                                                 ` Juanma Barranquero
2013-07-05  7:43                                                                                                                                   ` martin rudalics
2013-07-05  9:35                                                                                                                                     ` Juanma Barranquero
2013-07-03 14:08                                                                                                                       ` Drew Adams
2013-07-03 14:54                                                                                                                         ` Juanma Barranquero
2013-07-03  9:27                                                                                                                     ` martin rudalics
2013-07-03 14:08                                                                                                                       ` Drew Adams
2013-07-03  9:27                                                                                                                   ` martin rudalics
2013-07-03 10:37                                                                                                                     ` Juanma Barranquero
2013-07-03 14:08                                                                                                                       ` Drew Adams
2013-07-03 15:16                                                                                                                         ` Juanma Barranquero
2013-07-03 17:01                                                                                                                           ` Drew Adams
2013-06-30 15:23                                                                                   ` Stephen Leake
2013-06-30 15:34                                                                                     ` Eli Zaretskii
2013-06-28 14:03                                                                   ` martin rudalics
2013-06-28 15:12                                                                     ` Juanma Barranquero
2013-06-28 10:22                                                               ` Eli Zaretskii
2013-06-28 11:50                                                                 ` martin rudalics
2013-06-28 12:11                                                                   ` Juanma Barranquero
2013-06-28 12:24                                                                     ` Angelo Graziosi
2013-06-28 13:02                                                                   ` Eli Zaretskii
2013-06-28 14:07                                                                     ` martin rudalics
2013-06-28 14:59                                                                       ` Eli Zaretskii
2013-06-28 12:08                                                                 ` Juanma Barranquero
2013-06-28 13:07                                                                   ` Eli Zaretskii
2013-06-28 13:29                                                                     ` Juanma Barranquero
2013-06-28 14:53                                                                       ` Eli Zaretskii
2013-06-28 15:24                                                                         ` Juanma Barranquero
2013-06-29  8:03                                                                     ` Stephen Leake
2013-06-29  8:11                                                                       ` Eli Zaretskii
2013-06-30 15:29                                                                         ` Stephen Leake
2013-06-30 15:39                                                                           ` Eli Zaretskii
2013-06-28 12:00                                                               ` Juanma Barranquero
2013-06-28 12:31                                                                 ` Jan Djärv
2013-06-28 13:18                                                                   ` Juanma Barranquero
2013-06-28 14:26                                                                     ` Jan Djärv
2013-06-28 15:19                                                                       ` Juanma Barranquero
2013-06-28 14:03                                                                   ` martin rudalics
2013-06-28 15:13                                                                     ` Jan Djärv
2013-06-28 15:14                                                                     ` Juanma Barranquero
2013-06-28 14:02                                                                 ` martin rudalics
2013-06-28 15:10                                                                   ` Juanma Barranquero
2013-06-28 16:17                                                                     ` martin rudalics
2013-06-29  8:41                                                                 ` Stephen Leake
2013-06-28 13:29                                                             ` Drew Adams
2013-06-25  3:22               ` Stephen J. Turnbull
2013-06-24 17:38         ` martin rudalics
2013-06-23 12:28   ` Juanma Barranquero

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='CAAeL0SR+shhnYP34LVcC9c=0d0GtyjGwFtSnCzCmL8fM2CnxSw@mail.gmail.com' \
    --to=lekktu@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --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).