GNU bug report logs -
#14502
24.3; dired-load-hook should not be customizable
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Wed, 29 May 2013 13:07:01 UTC
Severity: minor
Found in version 24.3
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
(Please keep the debbugs address in the Cc header.)
Reuben Thomas <rrt <at> sc3d.org> 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
This bug report was last modified 4 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.