GNU bug report logs - #24213
25.1.50; Fishy use of delete-window in register.el

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Fri, 12 Aug 2016 20:23:02 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 25.1.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 24213 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Andreas Politz <politza <at> hochschule-trier.de>
Cc: 24213 <at> debbugs.gnu.org
Subject: Re: bug#24213: 25.1.50; Fishy use of delete-window in register.el
Date: Thu, 01 Sep 2016 09:40:04 +0200
> I finally got around to this.  The changes in the following diff seem to
> be all clear cut cases, where the window is created by
> display-buffer/pop-to-buffer without any special window-handling logic
> attached.  Let me know what you think.

Thank you.


>     "Exit Finder mode.
>   Delete the window and kill all Finder-related buffers."

Maybe we should say that we "Quit" the window and "kill the Finder
buffer" here.

>     (interactive)
> -  (ignore-errors (delete-window))
> +  (quit-window)
>     (let ((buf "*Finder*"))
>       (and (get-buffer buf) (kill-buffer buf))))

How about using (quit-window t) right away as in the next case?

> diff --git a/lisp/image-dired.el b/lisp/image-dired.el
> index 67b023d..36f148b 100644
> --- a/lisp/image-dired.el
> +++ b/lisp/image-dired.el
> @@ -2445,13 +2445,9 @@ image-dired-gallery-generate
>         (insert "</html>"))))
>
>   (defun image-dired-kill-buffer-and-window ()
> -  "Kill the current buffer and, if possible, also the window."
> +  "Kill the current buffer and quit it's window."

"its" not "it's".


The remainder looks OK.  If no-one objects, please provide a ChangeLog
entry and I'll install the changes.

Thanks again, martin




This bug report was last modified 5 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.