unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: npostavs@users.sourceforge.net
Cc: 24213@debbugs.gnu.org, Leo Liu <sdl.web@gmail.com>,
	Andreas Politz <politza@hochschule-trier.de>
Subject: bug#24213: 25.1.50; Fishy use of delete-window in register.el
Date: Sat, 13 Aug 2016 15:30:11 +0200	[thread overview]
Message-ID: <57AF20E3.3030607@gmx.at> (raw)
In-Reply-To: <87r39sx2gp.fsf@users.sourceforge.net>

 >> ‘delete-window’ is primarily a command bound to C-x 0.  It should be
 >> used only sparingly in Elisp code.  Nevertheless, I think that any
 >> advice to use ‘quit-window’ instead should go to the ‘display-buffer’
 >> group functions because ‘quit-window’ (now) inherently belongs there.
 >
 > Wouldn't it then make sense to add the usual "if you are thinking of
 > using this function from Lisp code, it's probably a mistake, try
 > `quit-window' instead" warning to the delete-window's docstring?

Then readers might think that they should replace ‘delete-window’ with
‘quit-window’ indiscriminately.  That would be incorrect because without
an accompanying ‘quit-restore’ parameter, ‘quit-window’ is not very
useful.  (The history of ‘quit-window’ and ‘quit-restore-window’ is a
convoluted one - I never wanted to commingle these but Chong overruled
me, if my memory doesn't fail).

Paired with ‘split-window’, ‘delete-window’ is the correct choice to
undo the former.  So any warning should go to ‘split-window’ instead.
But then readers might be tempted to replace ‘split-window’ calls with
‘display-buffer’ calls indiscriminately and I don't want to think of the
consequences of this.

 > (also, doc fixes should go to emacs-25, right?)

I was tempted to do that.  But please let's postpone further changes in
this area to the time when Andreas has posted his first patch.  I'm glad
that someone has started looking into this and suppose that further doc
fixes will be necessary.

martin






  parent reply	other threads:[~2016-08-13 13:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 20:22 bug#24213: 25.1.50; Fishy use of delete-window in register.el Andreas Politz
2016-08-13  2:39 ` Leo Liu
2016-08-13  6:43   ` Andreas Politz
2016-08-13  8:25     ` martin rudalics
2016-08-13 12:44       ` npostavs
2016-08-13 12:51         ` Eli Zaretskii
2016-08-13 13:30         ` martin rudalics [this message]
2016-08-13  9:50     ` Leo Liu
2016-08-13  8:24   ` martin rudalics
2016-08-13  9:50     ` Leo Liu
2016-08-13  8:24 ` martin rudalics
2016-08-13  8:47   ` Andreas Politz
2016-08-13 10:03     ` martin rudalics
2016-08-31 19:04       ` Andreas Politz
2016-09-01  7:40         ` martin rudalics
2016-09-01 11:22           ` Andreas Politz
2016-09-01 12:57             ` martin rudalics
2019-09-29 14:58         ` Lars Ingebrigtsen
2019-10-13  3:09           ` Lars Ingebrigtsen

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=57AF20E3.3030607@gmx.at \
    --to=rudalics@gmx.at \
    --cc=24213@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    --cc=politza@hochschule-trier.de \
    --cc=sdl.web@gmail.com \
    /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).