From debbugs-submit-bounces@debbugs.gnu.org Wed May 29 09:06:12 2013 Received: (at submit) by debbugs.gnu.org; 29 May 2013 13:06:12 +0000 Received: from localhost ([127.0.0.1]:39376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhg4w-0007gE-NQ for submit@debbugs.gnu.org; Wed, 29 May 2013 09:06:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38807) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhg4s-0007fS-Fc for submit@debbugs.gnu.org; Wed, 29 May 2013 09:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhg3N-0006se-Q4 for submit@debbugs.gnu.org; Wed, 29 May 2013 09:04:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.3 required=5.0 tests=BAYES_20, RCVD_IN_DNSWL_MED, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhg3N-0006sa-Kq for submit@debbugs.gnu.org; Wed, 29 May 2013 09:04:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhg3I-0003Ow-Oi for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhg3E-0006pL-7i for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:04:28 -0400 Received: from exprod7og107.obsmtp.com ([64.18.2.167]:58883) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Uhg3D-0006nd-Ot for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:04:24 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]) (using TLSv1) by exprod7ob107.postini.com ([64.18.6.12]) with SMTP ID DSNKUaX81OWETU+Fe9GeBsuUiKYRH+8kPBz6@postini.com; Wed, 29 May 2013 06:04:23 PDT Received: by mail-wi0-f174.google.com with SMTP id c10so3507427wiw.1 for ; Wed, 29 May 2013 06:04:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :x-gm-message-state; bh=wQO6/H5RpRf0P5NOxpBRbuUadZ+e1qpiNCnyVhXsWQU=; b=btnE78FlMKj+TMJ0Y9zYx8dIp7xe68yte+QXGo+Y+UoUCmCJ4JqQ8wy8nLMKrF/jGj 5PEqhswU2CnbAmj7pG5eIRnH6afuWpVqoa1u+/fDyiRY/WQZHCGLORbzCOifkq9x6eH3 XMJEJ/ss4oZLB7QUBAFivbex9dj77md2whK+IhjxPEc6gr2mBZ1dbvTVlaT9NuD3OI1c hDA+DrnQ5My2+8gABotp5eKdYaTim2nALbnQ3dAEsJYzB17sWfv584kLPgaIySO+gL9z dYeg9BVmITIotZjgXsLsuk8vl6/tGwZ4T39JPJ/cw3qADqCsNv3UTJSq8X+/iiuts9Ko xCTw== X-Received: by 10.194.6.9 with SMTP id w9mr1718818wjw.32.1369832660560; Wed, 29 May 2013 06:04:20 -0700 (PDT) X-Received: by 10.194.6.9 with SMTP id w9mr1718817wjw.32.1369832660440; Wed, 29 May 2013 06:04:20 -0700 (PDT) Received: from skwd ([149.241.115.91]) by mx.google.com with ESMTPSA id e5sm31092511wiy.5.2013.05.29.06.04.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 06:04:19 -0700 (PDT) From: Reuben Thomas To: bug-gnu-emacs@gnu.org Subject: 24.3; dired-load-hook should not be customizable Date: Wed, 29 May 2013 14:04:18 +0100 Message-ID: <87k3mirl7x.fsf@sc3d.org> MIME-Version: 1.0 Content-Type: text/plain X-Gm-Message-State: ALoCoQmJ/5f1/5/hiR17F0CWDDTU9Rt1maPVBzHrcxWgGVfeYydWRWGpoZSOHvRdBpSLGU03jxoljWbcRvweOJxYfNyT1hYay7dAM1wkgVdYSSAo6UW3sVf4WPs12FL+4u9ow1/I277tjdRA9e8f2uAyTn/CRolTa1IvlWPJq9WhK7dzBM+hTDY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) dired-load-hook is customizable, but dired-x's manual correctly says that you should add code to your init file to load dired-x in dired-load-hook. I tried customizing the hook instead, and that doesn't work. As with find-file-hook (see bug #13870), I suggest that dired-load-hook either be made non-customizable, or a warning added to the docstring. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-04-14 on marid, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11303000 System Description: Ubuntu 13.04 Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_MONETARY: en_GB.UTF-8 value of $LC_NUMERIC: en_GB.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Dired by name Minor modes in effect: recentf-mode: t show-paren-mode: t server-mode: t savehist-mode: t minibuffer-electric-default-mode: t iswitchb-mode: t ido-everywhere: t icomplete-mode: t global-auto-revert-mode: t dired-omit-mode: t desktop-save-mode: t global-undo-tree-mode: t global-whitespace-mode: t TeX-PDF-mode: t TeX-source-correlate-mode: t dtrt-indent-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-< C-s d i r e d C-s C-s C-s C-s C-s C-s C-s C-a C-x k C-x d C-x k C-x b v a r C-x d M-x r e p o r t - e m a c s - b u g Recent messages: Mark set Mark saved where search started Omitting... (Nothing to omit) Omitting... Omitted 2 lines. Omitting... (Nothing to omit) Omitting... Omitted 5 lines. Load-path shadows: /home/rrt/.emacs.d/el-get/dictionary/lpath hides /home/rrt/.emacs.d/el-get/auctex/lpath /home/rrt/.emacs.d/el-get/magit/.dir-locals hides ~/.emacs.d/el-get/el-get/.dir-locals /home/rrt/.emacs.d/el-get/package/elpa/csv-mode-1.50/csv-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/csv-mode /home/rrt/.emacs.d/el-get/quack/quack hides /usr/share/emacs24/site-lisp/emacs-goodies-el/quack /home/rrt/.emacs.d/el-get/filladapt/filladapt hides /usr/share/emacs24/site-lisp/emacs-goodies-el/filladapt /home/rrt/.emacs.d/el-get/markdown-mode/markdown-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/markdown-mode /home/rrt/.emacs.d/el-get/apache-mode/apache-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/apache-mode /home/rrt/.emacs.d/el-get/graphviz-dot-mode/graphviz-dot-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/graphviz-dot-mode /home/rrt/.emacs.d/el-get/browse-kill-ring/browse-kill-ring hides /usr/share/emacs24/site-lisp/emacs-goodies-el/browse-kill-ring /home/rrt/local/share/emacs/site-lisp/lilypond-indent hides /usr/share/emacs/site-lisp/lilypond-indent /home/rrt/local/share/emacs/site-lisp/lilypond-what-beat hides /usr/share/emacs/site-lisp/lilypond-what-beat /usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /home/rrt/local/share/emacs/site-lisp/lilypond-init hides /usr/share/emacs/site-lisp/lilypond-init /usr/share/emacs/24.3/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/rrt/local/share/emacs/site-lisp/lilypond-font-lock hides /usr/share/emacs/site-lisp/lilypond-font-lock /usr/share/emacs/24.3/site-lisp/cdargs hides /usr/share/emacs/site-lisp/cdargs /home/rrt/local/share/emacs/site-lisp/lilypond-mode hides /usr/share/emacs/site-lisp/lilypond-mode /home/rrt/local/share/emacs/site-lisp/lilypond-song hides /usr/share/emacs/site-lisp/lilypond-song /home/rrt/local/share/emacs/site-lisp/whitespace hides /usr/share/emacs/24.3/lisp/whitespace /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.3/lisp/textmodes/rst /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell /home/rrt/.emacs.d/el-get/cperl-mode/cperl-mode hides /usr/share/emacs/24.3/lisp/progmodes/cperl-mode /home/rrt/.emacs.d/el-get/flymake/flymake hides /usr/share/emacs/24.3/lisp/progmodes/flymake /home/rrt/.emacs.d/el-get/magit/.dir-locals hides /usr/share/emacs/24.3/lisp/gnus/.dir-locals Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils dired-aux misearch multi-isearch js json cperl-mode css-mode sgml-mode preview prv-emacs noutline outline tex-buf font-latex latex tex-style inform-mode imenu term disp-table ehelp electric cc-langs make-mode nroff-mode vc-git sh-script smie executable jka-compr info flymake face-remap goto-addr smart-quotes csv-mode-autoloads completing-help ff-paths recentf tree-widget wid-edit uniquify paren server savehist minibuf-eldef iswitchb ido icomplete autorevert cus-start cus-load ropemacs pymacs dired-x desktop undo-tree diff whitespace tex dbus xml crm remember .loaddefs yasnippet dropdown-list derived quack thingatpt compile cmuscheme comint ansi-color scheme po-mode php-mode etags ring cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs speedbar sb-image ezimage dframe init-paredit paredit edmacro kmacro go-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap ffap url-parse auth-source eieio gnus-util mm-util mail-prsvr password-cache url-vars geiser-load geiser frame-restore flymake-point init-eldoc eldoc-extension eldoc dtrt-indent byte-opt warnings darkroom-mode frame-local-vars browse-kill-ring advice advice-preload auto-dictionary flyspell ispell preview-latex tex-site auto-loads el-get el-get-autoloads el-get-list-packages el-get-notify help-mode easymenu el-get-dependencies el-get-build el-get-status pp el-get-recipes el-get-byte-compile el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-emacsmirror el-get-github el-get-git el-get-elpa package cl-macs gv el-get-darcs el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get el-get-custom el-get-core autoload help-fns bytecomp byte-compile cconv cl cl-lib dired user-site-loaddefs emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- http://rrt.sc3d.org/ From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 00:42:27 2019 Received: (at 14502) by debbugs.gnu.org; 15 Aug 2019 04:42:27 +0000 Received: from localhost ([127.0.0.1]:50341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7aj-000151-HF for submit@debbugs.gnu.org; Thu, 15 Aug 2019 00:42:25 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7ah-00014t-Nj for 14502@debbugs.gnu.org; Thu, 15 Aug 2019 00:42:24 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy7ad-0007sV-Rf; Thu, 15 Aug 2019 06:42:22 +0200 From: Lars Ingebrigtsen To: Reuben Thomas Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable References: <87k3mirl7x.fsf@sc3d.org> Date: Wed, 14 Aug 2019 21:42:17 -0700 In-Reply-To: <87k3mirl7x.fsf@sc3d.org> (Reuben Thomas's message of "Wed, 29 May 2013 14:04:18 +0100") Message-ID: <8736i32g5y.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Reuben Thomas writes: > dired-load-hook is customizable, but dired-x's manual correctly says > that you should add code to your init file to load dired-x in > dired-load-hook. I tried customizing the hook instead, and that [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: 14502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Reuben Thomas writes: > dired-load-hook is customizable, but dired-x's manual correctly says > that you should add code to your init file to load dired-x in > dired-load-hook. I tried customizing the hook instead, and that doesn't > work. As with find-file-hook (see bug #13870), I suggest that > dired-load-hook either be made non-customizable, or a warning added to > the docstring. (I'm going through old bug reports that have unfortunately gotten no responses yet.) I'm not sure I understand the problem, and #13870 does not talk about `find-file-hook'. Does it matter whether you use `add-hook' or Customize for this particular hook? Most hooks are customisable, surely, including `find-file-hook'. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 00:42:40 2019 Received: (at control) by debbugs.gnu.org; 15 Aug 2019 04:42:40 +0000 Received: from localhost ([127.0.0.1]:50344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7ay-00015U-Gc for submit@debbugs.gnu.org; Thu, 15 Aug 2019 00:42:40 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy7ax-00015M-7C for control@debbugs.gnu.org; Thu, 15 Aug 2019 00:42:39 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy7au-0007sc-Ai for control@debbugs.gnu.org; Thu, 15 Aug 2019 06:42:38 +0200 Date: Wed, 14 Aug 2019 21:42:34 -0700 Message-Id: <871rxn2g5h.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14502 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 14502 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 14502 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 21:29:44 2019 Received: (at 14502) by debbugs.gnu.org; 16 Aug 2019 01:29:44 +0000 Received: from localhost ([127.0.0.1]:52786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyR3m-0004qg-Ay for submit@debbugs.gnu.org; Thu, 15 Aug 2019 21:29:42 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyR3j-0004qX-TS for 14502@debbugs.gnu.org; Thu, 15 Aug 2019 21:29:40 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyR3f-0000TC-Bu; Fri, 16 Aug 2019 03:29:37 +0200 From: Lars Ingebrigtsen To: Reuben Thomas Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable References: <87k3mirl7x.fsf@sc3d.org> <8736i32g5y.fsf@mouse.gnus.org> Date: Thu, 15 Aug 2019 18:29:32 -0700 In-Reply-To: (Reuben Thomas's message of "Thu, 15 Aug 2019 09:07:16 +0100") Message-ID: <871rxlsxs3.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: (Please keep the debbugs address in the Cc header.) Reuben Thomas writes: > I'm not sure I understand the problem, and #13870 does not talk about > `find-file-hook'. > > Sorry, that should say #13780. The problem is that add-hook (often in > 3rd-party code) can be in a race [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: 14502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) (Please keep the debbugs address in the Cc header.) Reuben Thomas writes: > I'm not sure I understand the problem, and #13870 does not talk about > `find-file-hook'. > > Sorry, that should say #13780. The problem is that add-hook (often in > 3rd-party code) can be in a race with custom.el. > > As far as this bug report goes, if you try to customize dired-load-hook to load > dired-x, it doesn't work. > > Does it matter whether you use `add-hook' or Customize for this > particular hook? Most hooks are customisable, surely, including > `find-file-hook'. > > Yes, and this can cause problems. See #13780. The problem in #13780 is that if you mix add-hook with Customize settings of a hook, then (depending on load order), the Customize value for the hook may overwrite those add-hooks. The solution proposed is that one shouldn't have defcustoms on the hooks one may somehow expect that packages add stuff to. But dired-load-hook doesn't seem like one of those hooks, and if you use Customize to be (load-x) where load-x is (defun load-x () (require 'dired-x)) then surely dired-x will be loaded with dired is loaded? (Not that I've tried myself.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 04:13:51 2019 Received: (at 14502) by debbugs.gnu.org; 16 Aug 2019 08:13:51 +0000 Received: from localhost ([127.0.0.1]:53031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyXMt-0004Dn-5g for submit@debbugs.gnu.org; Fri, 16 Aug 2019 04:13:51 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:43652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyXMr-0004Da-K2 for 14502@debbugs.gnu.org; Fri, 16 Aug 2019 04:13:50 -0400 Received: by mail-ot1-f41.google.com with SMTP id e12so8829284otp.10 for <14502@debbugs.gnu.org>; Fri, 16 Aug 2019 01:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nNM4+PVUvgwEMq7i9By242HJRyuuuzAaVhKBlsvzvDo=; b=e3BUGJ+6JMGWdHZhVpviFVehsMiA86ANbrn9WSFsc+1S6Vx89DZ2khNuW+v+kdPPCj AeXEQsBYWRqTD0cAyqCvJAebM+1nnSScZMAMe02xZTWjPEUC0h4nEREzHH4kEGxRVwuE UmrIolvtrQyWPs+WTT/ZInrZTlHfQXkcDLdyA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nNM4+PVUvgwEMq7i9By242HJRyuuuzAaVhKBlsvzvDo=; b=GW+IyiLkvw/pHYVc5kRaRZbiKs4jm0bAXS+gX58MdC/tQtxfFSCEdhFvei1i6i0b75 1IadYD3NFiOnh994kj/ea+FBArVFPdZiaULyQdvGUqkuQeyVm0Sz3At4HapIXF2zlMEO pguuaoZ85P1ztJHFcIx7BaRZHb9iG2BDzDwi/nJEoCi/hqG/7UEGaFy3RPtOWihMwNmZ WFq18G0o5DGQjQ72aGPhIztK3iFUggLdrALdjg8gOREeTz/VR7ImBLoxIt/0bplF9lau 7/L0Tdc7AjIGL7Z2lyC2NmP72mj3XRKWx+4wKRBuiinzeeFZtsI2Y7E09jIMo7od+dDA pKmw== X-Gm-Message-State: APjAAAX55kyeAZnZotmcmPPX2+JES+NhgRbQMe+TVJucruokwFpAI5WF z67ELKUml39bSyWgSUQm5Hd57qoU4Dxo2EjEyZp5Sw== X-Google-Smtp-Source: APXvYqzTemGx8uE8JyLq2y8mcCYqVbuRVDTYbHBhcXbxEPyrqzJ+bxCl7ReBgwYmUB6JZYxVeEMbW2XkLCMrbiZFtac= X-Received: by 2002:a05:6830:15d9:: with SMTP id j25mr3182278otr.76.1565943223881; Fri, 16 Aug 2019 01:13:43 -0700 (PDT) MIME-Version: 1.0 References: <87k3mirl7x.fsf@sc3d.org> <8736i32g5y.fsf@mouse.gnus.org> <871rxlsxs3.fsf@mouse.gnus.org> In-Reply-To: <871rxlsxs3.fsf@mouse.gnus.org> From: Reuben Thomas Date: Fri, 16 Aug 2019 09:13:31 +0100 Message-ID: Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="00000000000099288f05903791c1" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: 14502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000099288f05903791c1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 16 Aug 2019 at 02:29, Lars Ingebrigtsen wrote: > (Please keep the debbugs address in the Cc header.) > Sorry! The problem in #13780 is that if you mix add-hook with Customize > settings of a hook, then (depending on load order), the Customize value > for the hook may overwrite those add-hooks. The solution proposed is > that one shouldn't have defcustoms on the hooks one may somehow expect > that packages add stuff to. > > But dired-load-hook doesn't seem like one of those hooks, and if you > use Customize to be > > (load-x) > > where load-x is > > (defun load-x () > (require 'dired-x)) > > then surely dired-x will be loaded with dired is loaded? (Not that I've > tried myself.) > dired-x adds dired-extra-startup to dired-mode-hook=E2=80=A6 dired-mode-hook in my setup also has sml/set-buffer-identification added by smart-mode-line, so yes, it is "one of those hooks" --=20 https://rrt.sc3d.org --00000000000099288f05903791c1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 16 Aug 2019 at 02:29, Lars Ingebrigtsen <larsi@gnus.org> wrote:
(Please keep the debbugs address in the Cc= header.)

Sorry!
The problem in #13780 is that if you mix add-hook with Customize
settings of a hook, then (depending on load order), the Customize value
for the hook may overwrite those add-hooks.=C2=A0 The solution proposed is<= br> that one shouldn't have defcustoms on the hooks one may somehow expect<= br> that packages add stuff to.

But dired-load-hook doesn't seem like one of those hooks, and if you use Customize to be

(load-x)

where load-x is

(defun load-x ()
=C2=A0 (require 'dired-x))

then surely dired-x will be loaded with dired is loaded?=C2=A0 (Not that I&= #39;ve
tried myself.)

dired= -x adds dired-extra-startup to dired-mode-hook=E2=80=A6
dired-mode-hook in my setup also has sml/set-buff= er-identification added by smart-mode-line, so yes, it is "one of thos= e hooks"

--
--00000000000099288f05903791c1-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 16:50:36 2019 Received: (at 14502) by debbugs.gnu.org; 16 Aug 2019 20:50:37 +0000 Received: from localhost ([127.0.0.1]:54972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyjBE-0002M6-LP for submit@debbugs.gnu.org; Fri, 16 Aug 2019 16:50:36 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyjBA-0002Lf-6H for 14502@debbugs.gnu.org; Fri, 16 Aug 2019 16:50:32 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyjB5-0000ge-8U; Fri, 16 Aug 2019 22:50:30 +0200 From: Lars Ingebrigtsen To: Reuben Thomas Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable References: <87k3mirl7x.fsf@sc3d.org> <8736i32g5y.fsf@mouse.gnus.org> <871rxlsxs3.fsf@mouse.gnus.org> Date: Fri, 16 Aug 2019 13:50:23 -0700 In-Reply-To: (Reuben Thomas's message of "Fri, 16 Aug 2019 09:13:31 +0100") Message-ID: <87ftm0q1gw.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Reuben Thomas writes: > dired-x adds dired-extra-startup to dired-mode-hook… I missed that bit. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: 14502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Reuben Thomas writes: > dired-x adds dired-extra-startup to dired-mode-hook=E2=80=A6 I missed that bit. > dired-mode-hook in my setup also has sml/set-buffer-identification added = by > smart-mode-line, so yes, it is "one of those hooks" It seems rather unsatisfactory to have to make a decision between "one of those hooks" and "the rest of the hooks" on a hook by hook basis... Stefan wrote in 2013: > So until Custom is fixed to actually properly handle customisation of > hooks (e.g. by storing "add functions foo, bar, and baz" rather than > "ignore current value and just set it to (foo bar baz)"). So I wondered what it would take to fix this in Customize properly. But: (define-widget 'hook 'list "An Emacs Lisp hook." [...] :set (lambda (symbol value) (dolist (elt value) (if (fboundp elt) (add-hook symbol elt)))) The :set action for hooks doesn't just overwrite the value, but uses `add-hook' the proper way? Now I'm even more confused. Hm... Perhaps that's not the code that's used when actually restoring hook values? Let's see. (defun customize-set-variable (variable value &optional comment) [...] (funcall (or (get variable 'custom-set) #'set-default) variable value) (get 'gnus-load-hook 'custom-set) =3D> nil So the setter is not used? Hm... Oh, it's only set if you say (defcustom ... :set ...) Right. So the :set in the widget is only used interactively? *tests* Nope, if I try to modify a hook in a Customize buffer, then it always overwrites the hook value. So, as usual, when trying to figure out how Customize works, it's... just... rather obscure. But I think one (probably controversial solution) would be to add a `custom-set' property on all hook variables that would make it use `add-hook' instead of just overwriting the value. That would make Customize and add-hook coexist... but would also mean that you can't set a hook to a specific value with Customize, which will probably break something for somebody. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 02:05:25 2019 Received: (at control) by debbugs.gnu.org; 14 Oct 2019 06:05:25 +0000 Received: from localhost ([127.0.0.1]:37743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtTx-0006ye-5u for submit@debbugs.gnu.org; Mon, 14 Oct 2019 02:05:25 -0400 Received: from [80.91.231.51] (port=50266 helo=quimby.gnus.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtTw-0006yV-6P for control@debbugs.gnu.org; Mon, 14 Oct 2019 02:05:24 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJtTt-0002Mm-Cj for control@debbugs.gnu.org; Mon, 14 Oct 2019 08:05:23 +0200 Date: Mon, 14 Oct 2019 08:05:21 +0200 Message-Id: <87y2xnn9pa.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14502 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 14502 - moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 14502 - moreinfo quit Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) tags 14502 - moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 31 08:41:33 2019 Received: (at 14502) by debbugs.gnu.org; 31 Dec 2019 13:41:33 +0000 Received: from localhost ([127.0.0.1]:33878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imHm8-0005TY-Vs for submit@debbugs.gnu.org; Tue, 31 Dec 2019 08:41:33 -0500 Received: from mail-lj1-f182.google.com ([209.85.208.182]:44515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imHm6-0005TH-5y for 14502@debbugs.gnu.org; Tue, 31 Dec 2019 08:41:30 -0500 Received: by mail-lj1-f182.google.com with SMTP id u71so36370182lje.11 for <14502@debbugs.gnu.org>; Tue, 31 Dec 2019 05:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Lam+SJTEcvitpu70tfNFdL9Z3z2WUR7isiRmeKb1yN4=; b=pqixl6rUJqA18fbwsh0ANaNC50oazKdMIZSWFSlaZ27eOsY4fRu2aPU6SGF3NacS53 a0TCzGgYAkZ4/nPGtzSzkz5b6cT6nZtS646hLvmIEiDwblKJ1EP32LvF76Fr/ZriP8Wv hsu5KohuFxcZSI0Do/0iERSoFMV/n/6AyX9TKzZyB1YuzQGPy6UqmQEwrvkkWdqSWO8F ePb9rw0nhq7aM+AnlXDSj+coEdq4U3wu5XrRxsMKhiBnIn2ghYbKILdLNoAAQ34pWMf7 z8xiFrySxki/stvbRBeX2jiQNTSt+PBb7uLSlTFrfmh/iZhsaYPpjlmi2nCB9Pvy8Cdv nfSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Lam+SJTEcvitpu70tfNFdL9Z3z2WUR7isiRmeKb1yN4=; b=OvndSK0tV2yR+UnO+kwmOaEckYQS54Eid1D/d5w7VkBnkWMUVjU27omjsKcJp2W67m 7hEWjl0tfa8ioXOVUTx3g2FLhi+mHUpIwPW9ubimycwBmtD90eqS0khI4B1KWisuyVXW cSu+lZUIXe40vJURQyZoAuIMdEDpqZFpv8I85hToWL9+tacdwZcyHqUVgyMYlt9+8vWU Wprnuu282+/9q1831PFFwmC7+DwtKnjO1/GkN0cVhQyaqsb+Uw2WtQmQOr0DEdMDZoEN HIEnDhf4vgJ/gNjyrhzJ4H72Ec4QUcUGMjIjQRHQ1RPcuNfIXoAO+U8PwT21X1nZ/hcQ JYrw== X-Gm-Message-State: APjAAAXPVrOs+2pexuKAOJ/evREDMkOL+Retw84YKRKT7KiyQC0CcMKZ pqfzYV/tyvbzk+CJs6iujurjL+okdldwT3VqRoTFOSU+jlo= X-Google-Smtp-Source: APXvYqzP7KCTkwIXTy6jNVP9e1PswIHd8eINH8tNpdaNcm6Hy6U7mgVbtTKt4nv5KqJUSSBVJGj39vpgLGS15YncNIw= X-Received: by 2002:a2e:8152:: with SMTP id t18mr42566999ljg.255.1577799683691; Tue, 31 Dec 2019 05:41:23 -0800 (PST) MIME-Version: 1.0 From: Mauro Aranda Date: Tue, 31 Dec 2019 10:41:11 -0300 Message-ID: Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable To: 14502@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000ac59fa059b001d7b" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: Lars Ingebrigtsen , rrt@sc3d.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000ac59fa059b001d7b Content-Type: text/plain; charset="UTF-8" Hello Lars. Lars Ingebrigtsen writes: > So I wondered what it would take to fix this in Customize properly. But: > > (define-widget 'hook 'list > "An Emacs Lisp hook." > > [...] > > :set (lambda (symbol value) > (dolist (elt value) > (if (fboundp elt) > (add-hook symbol elt)))) I don't know how things were when that code was added, but currently it has no effect, because no code exists to handle that :set property. No widget type recognizes that property. IOW, there is a new property defined, but there's no code to make that property do something. > (defun customize-set-variable (variable value &optional comment) > > [...] > > (funcall (or (get variable 'custom-set) #'set-default) variable value) > > (get 'gnus-load-hook 'custom-set) > => nil > > So the setter is not used? Hm... Oh, it's only set if you say > > (defcustom ... > :set ...) > > Right. So the :set in the widget is only used interactively? *tests* > Nope, if I try to modify a hook in a Customize buffer, then it always > overwrites the hook value. > > So, as usual, when trying to figure out how Customize works, it's... > just... rather obscure. See above. I hope it clarifies something, at least. > But I think one (probably controversial solution) would be to add a > `custom-set' property on all hook variables that would make it use > `add-hook' instead of just overwriting the value. That would make > Customize and add-hook coexist... but would also mean that you can't > set a hook to a specific value with Customize, which will probably break > something for somebody. I think this solution would be good. As for the controversial part, I think it would be possible to add some specific option that controls whether to overwrite or not a hook when using Customize. Also, a checkbox could toggle that option when customizing a hook interactively. But one problem is that using defcustom for the option would complicate things a little more than using plain defvar. For starters, every hook would have to have a :set-after property with that option. Best regards, Mauro. --000000000000ac59fa059b001d7b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Lars.

Lars Ingebrigtsen <larsi@gnus.org> writes:

> So I wonde= red what it would take to fix this in Customize properly.=C2=A0 But:
>= ;
> (define-widget 'hook 'list
> =C2=A0 "An Emacs = Lisp hook."
>
> [...]
>
> =C2=A0 :set (lambda = (symbol value)
> (dolist (elt value)
> =C2=A0 (if (fboundp = elt)
> =C2=A0 =C2=A0 =C2=A0 (add-hook symbol elt))))

I don&#= 39;t know how things were when that code was added, but currently it
has= no effect, because no code exists to handle that :set
property.=C2=A0 N= o widget type recognizes that property.=C2=A0 IOW, there is a new
proper= ty defined, but there's no code to make that property do
something.<= br>
> (defun customize-set-variable (variable value &optional com= ment)
>
> [...]
>
> =C2=A0 (funcall (or (get variab= le 'custom-set) #'set-default) variable value)
>
> (get= 'gnus-load-hook 'custom-set)
> =3D> nil
>
> S= o the setter is not used?=C2=A0 Hm...=C2=A0 Oh, it's only set if you sa= y
>
> (defcustom ...
> =C2=A0 :set ...)
>
> R= ight.=C2=A0 So the :set in the widget is only used interactively? =C2=A0*te= sts*
> Nope, if I try to modify a hook in a Customize buffer, then it= always
> overwrites the hook value.
>
> So, as usual, wh= en trying to figure out how Customize works, it's...
> just... = =C2=A0rather obscure.

See above.=C2=A0 I hope it clarifies something= , at least.

> But I think one (probably controversial solution) w= ould be to add a
> `custom-set' property on all hook variables th= at would make it use
> `add-hook' instead of just overwriting the= value.=C2=A0 That would make
> Customize and add-hook coexist... =C2= =A0but would also mean that you can't
> set a hook to a specific = value with Customize, which will probably break
> something for someb= ody.

I think this solution would be good.=C2=A0 As for the controver= sial part, I
think it would be possible to add some specific option that= controls
whether to overwrite or not a hook when using Customize.=C2=A0= Also, a
checkbox could toggle that option when customizing a hook inter= actively.

But one problem is that using defcustom for the option wou= ld complicate
things a little more than using plain defvar.=C2=A0 For st= arters, every
hook would have to have a :set-after property with that op= tion.

Best regards,
Mauro.
--000000000000ac59fa059b001d7b-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 07:28:04 2020 Received: (at 14502) by debbugs.gnu.org; 22 Jan 2020 12:28:04 +0000 Received: from localhost ([127.0.0.1]:49124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuF75-0007yt-Qo for submit@debbugs.gnu.org; Wed, 22 Jan 2020 07:28:04 -0500 Received: from quimby.gnus.org ([95.216.78.240]:59130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuF6s-0007yD-Ui for 14502@debbugs.gnu.org; Wed, 22 Jan 2020 07:28:02 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuF6k-0002V1-1Y; Wed, 22 Jan 2020 13:27:44 +0100 From: Lars Ingebrigtsen To: Mauro Aranda Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable References: Date: Wed, 22 Jan 2020 13:27:41 +0100 In-Reply-To: (Mauro Aranda's message of "Tue, 31 Dec 2019 10:41:11 -0300") Message-ID: <874kwnzneq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mauro Aranda writes: > I think this solution would be good. As for the controversial part, I > think it would be possible to add some specific option that controls > whether to overwrite or not a hook when using Customize [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ingebrigtsen.no] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14502 Cc: 14502@debbugs.gnu.org, rrt@sc3d.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mauro Aranda writes: > I think this solution would be good. As for the controversial part, I > think it would be possible to add some specific option that controls > whether to overwrite or not a hook when using Customize. Also, a > checkbox could toggle that option when customizing a hook interactively. > > But one problem is that using defcustom for the option would complicate > things a little more than using plain defvar. For starters, every > hook would have to have a :set-after property with that option. Whatever solution we have should work generally and consistently. So defcustoms of type `hook' should either overwrite (as they do currently) or not (which would be more logical, perhaps). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 04:53:21 2020 Received: (at 14502-done) by debbugs.gnu.org; 28 Oct 2020 08:53:21 +0000 Received: from localhost ([127.0.0.1]:47075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhCr-0004Yc-8Q for submit@debbugs.gnu.org; Wed, 28 Oct 2020 04:53:21 -0400 Received: from mail-ed1-f41.google.com ([209.85.208.41]:36942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXhCp-0004YN-4w for 14502-done@debbugs.gnu.org; Wed, 28 Oct 2020 04:53:19 -0400 Received: by mail-ed1-f41.google.com with SMTP id o18so4275923edq.4 for <14502-done@debbugs.gnu.org>; Wed, 28 Oct 2020 01:53:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=kiaGo8OD1kPHUhbn1jRUKwfJ3lKsdrBADaOX/v+0PEc=; b=ujHJMY1cpHdkta6wCU8qjRY9d0T5Zc8eHCifvTEqyo+3iTuNsdGRSCoUR+bHCo0pDS 7SV6jO7rRdtYBcYLTo5hj4nO3h2OlitJ1P9bFLKjY9aD6FUst6O7AB5Mp4fuDG/GT5F4 3OWiVhX4W/s3J96cOjttbSWpUVVPC5ePe9JkKMbeJmfDbMuQt7CpKEYv+gxMpn/a+3TN 5cG/nzkRQc8N2zWEqn8rKoOnufAYWrJME/ggU8Xqn/mfz1W53J4wj/3wfCpw92NZBfAi n1fT66c/c2AO5VyiDT26Zw99Mg5ARH3bbVj2lcJcSsB6wyF6WxOoj5am1xKqZGvfP0Gv QU5Q== X-Gm-Message-State: AOAM5337EZDzeWAXezCNkI1NIQJo9WO7H0GM8pcHGEwvxYkpX2YVeVzv Jchpe4GZAte4jvhNa5cBJLyngqy9A0wRV/OgMtAYczP3 X-Google-Smtp-Source: ABdhPJxpVi6hCpw46MhFqRG0UM9JtS0nUMMOPoRsFAJVa6nykDudSxKoFzr5Z3/TLyBj+dC1g8X74SGGjZLEU3S+57c= X-Received: by 2002:aa7:c694:: with SMTP id n20mr6842999edq.160.1603875193358; Wed, 28 Oct 2020 01:53:13 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 28 Oct 2020 01:53:12 -0700 From: Stefan Kangas In-Reply-To: <8736i32g5y.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Aug 2019 21:42:17 -0700") References: <87k3mirl7x.fsf@sc3d.org> <8736i32g5y.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 28 Oct 2020 01:53:12 -0700 Message-ID: Subject: Re: bug#14502: 24.3; dired-load-hook should not be customizable To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 14502-done Cc: 14502-done@debbugs.gnu.org, Reuben Thomas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Lars Ingebrigtsen writes: > Reuben Thomas writes: > >> dired-load-hook is customizable, but dired-x's manual correctly says >> that you should add code to your init file to load dired-x in >> dired-load-hook. I tried customizing the hook instead, and that doesn't >> work. As with find-file-hook (see bug #13870), I suggest that >> dired-load-hook either be made non-customizable, or a warning added to >> the docstring. > > (I'm going through old bug reports that have unfortunately gotten no > responses yet.) > > I'm not sure I understand the problem, and #13870 does not talk about > `find-file-hook'. > > Does it matter whether you use `add-hook' or Customize for this > particular hook? Most hooks are customisable, surely, including > `find-file-hook'. We now have that: (make-obsolete-variable 'dired-load-hook "use `with-eval-after-load' instead." "28.1") So I think this problem has resolved itself, and I'm closing this bug. From unknown Tue Aug 19 13:27:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 25 Nov 2020 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator