unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16749: More informative error when restoring frameset with killed buffer
@ 2014-02-14  6:52 Glenn Morris
  2014-02-14  7:01 ` Glenn Morris
  2014-02-15  4:38 ` Juanma Barranquero
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2014-02-14  6:52 UTC (permalink / raw)
  To: 16749

Package: emacs
Version: 24.3.50
Severity: minor

Current trunk on GNU/Linux under X.

emacs -Q
C-x C-f 1
C-x r f a
C-x k 1 RET
C-x r j a
   -> jump-to-register: Wrong type argument: stringp, nil

I see that the commentary of frameset.el says it does not restore killed
buffers. That's fine, but a more informative error message would be
better ("Buffer 1 has been killed" or somesuch).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16749: More informative error when restoring frameset with killed buffer
  2014-02-14  6:52 bug#16749: More informative error when restoring frameset with killed buffer Glenn Morris
@ 2014-02-14  7:01 ` Glenn Morris
  2014-02-14  7:42   ` Andreas Röhler
  2014-02-15  4:38 ` Juanma Barranquero
  1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2014-02-14  7:01 UTC (permalink / raw)
  To: 16749


PS Perhaps it should not stop with an error on encountering a dead
buffer, but should continue restoring as much as it can, then give a
summary message/error about dead buffer(s) at the end.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16749: More informative error when restoring frameset with killed buffer
  2014-02-14  7:01 ` Glenn Morris
@ 2014-02-14  7:42   ` Andreas Röhler
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2014-02-14  7:42 UTC (permalink / raw)
  To: 16749

Am 14.02.2014 08:01, schrieb Glenn Morris:
>
> PS Perhaps it should not stop with an error on encountering a dead
> buffer, but should continue restoring as much as it can,

Suggest an ask before: maybe the killing was deliberately but the jump-key a mistake.

then give a
> summary message/error about dead buffer(s) at the end.
>
>
>
>






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16749: More informative error when restoring frameset with killed buffer
  2014-02-14  6:52 bug#16749: More informative error when restoring frameset with killed buffer Glenn Morris
  2014-02-14  7:01 ` Glenn Morris
@ 2014-02-15  4:38 ` Juanma Barranquero
  1 sibling, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2014-02-15  4:38 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16749-done

On Fri, Feb 14, 2014 at 7:52 AM, Glenn Morris <rgm@gnu.org> wrote:

> I see that the commentary of frameset.el says it does not restore killed
> buffers.

That comment refers to window-state-put's functionality, but this bug
is just that I forgot to check that the buffer was live before trying
to restore the point. Fixed now.

> That's fine, but a more informative error message would be
> better ("Buffer 1 has been killed" or somesuch).

At that point, the saved state does not contain the buffer name, just
a marker that points nowhere, so we cannot say "Buffer XXX was killed"
because we don't know that it was called XXX. (Well, strictly speaking
the buffer name is probably somewhere inside frameset-states, but I
don't think digging that info is worth the effort.)

> PS Perhaps it should not stop with an error on encountering a dead
> buffer, but should continue restoring as much as it can, then give a
> summary message/error about dead buffer(s) at the end.

It already restores as much as it can, because that's what
window-state-put does. Dead buffers are ignored and their windows get
another buffer. The current bug does not happen when restoring the
window/buffer, just the selected buffer and point at the end of
jump-to-register.

Also, when using frame-configuration-to-register, jumping to a saved
frame configuration for a deleted frame fails silently. I don't think
jump-to-frameset should be noisier.

   J





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-15  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14  6:52 bug#16749: More informative error when restoring frameset with killed buffer Glenn Morris
2014-02-14  7:01 ` Glenn Morris
2014-02-14  7:42   ` Andreas Röhler
2014-02-15  4:38 ` Juanma Barranquero

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).