From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pieter van Oostrum Newsgroups: gmane.emacs.bugs Subject: bug#38818: Dired: mention deleting buffers, not just windows Date: Sat, 04 Jan 2020 00:18:39 +0100 Message-ID: References: <87imlxlrrv.5.fsf@jidanni.org> <87mub85ri0.fsf@web.de> <87h81f3our.5.fsf@jidanni.org> <87v9pv28qu.fsf@web.de> <87d0c33mdx.5.fsf@jidanni.org> <87o8vnq1ph.fsf@web.de> <875zhv3jyr.5.fsf@jidanni.org> <87eewjydyg.fsf@web.de> <87sgkw60fi.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="73163"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Michael Heerdegen , 38818@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 00:19:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inWDm-000Is7-J3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 00:19:10 +0100 Original-Received: from localhost ([::1]:57814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inWDl-0002aD-Ck for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 18:19:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36166) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inWDf-0002a6-8y for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:19:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inWDe-00058j-4F for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inWDd-00057t-W6 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1inWDd-0001mN-Ro for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pieter van Oostrum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2020 23:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38818 X-GNU-PR-Package: emacs Original-Received: via spool by 38818-submit@debbugs.gnu.org id=B38818.15780935306809 (code B ref 38818); Fri, 03 Jan 2020 23:19:01 +0000 Original-Received: (at 38818) by debbugs.gnu.org; 3 Jan 2020 23:18:50 +0000 Original-Received: from localhost ([127.0.0.1]:42245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inWDS-0001lk-5F for submit@debbugs.gnu.org; Fri, 03 Jan 2020 18:18:50 -0500 Original-Received: from [145.132.212.31] (port=52735 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inWDQ-0001lQ-NA for 38818@debbugs.gnu.org; Fri, 03 Jan 2020 18:18:49 -0500 Original-Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id 937BDA4D2576; Sat, 4 Jan 2020 00:18:40 +0100 (CET) In-Reply-To: <87sgkw60fi.5.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Fri, 03 Jan 2020 23:10:09 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174136 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: >>>>>> "PvO" =3D=3D Pieter van Oostrum writes: > PvO> Michael Heerdegen writes: > >>> Slightly better version: >>>=20 >>> (add-hook >>> 'dired-load-hook >>> (defun my-dired-load-hook-fun () >>> (require 'dired-x) >>> (define-key dired-mode-map "q" #'kill-current-buffer))) > > PvO> The documentation of defun says that its result is undefined. So eit= her > PvO> it should not be relied upon, or (if the result is reliably the defi= ned > PvO> function) it should be documented as such. > > OK. So what is the best way I should write it for my .emacs file? Thanks. Well, this is how I do it. (defun my-dired-load-hook-fun () (require 'dired-x) (define-key dired-mode-map "q" #'kill-current-buffer)) (add-hook 'dired-load-hook 'my-dired-load-hook-fun) --=20 Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4]