From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#13780: 24.2; Making find-file-hook customizable seems to cause troublle Date: Fri, 22 Feb 2013 00:33:29 +0000 Message-ID: <87k3q1gpba.fsf@sc3d.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361493289 14161 80.91.229.3 (22 Feb 2013 00:34:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Feb 2013 00:34:49 +0000 (UTC) To: 13780@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 22 01:35:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8gbW-0002fR-Vh for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Feb 2013 01:35:11 +0100 Original-Received: from localhost ([::1]:34774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8gbC-0005Y6-Lm for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 19:34:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8gb7-0005X9-8c for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:34:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8gb5-0001OJ-4b for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:34:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8gb5-0001OE-13 for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:34:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U8gcL-0000Hi-Oo for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Feb 2013 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13614933291055 (code B ref -1); Fri, 22 Feb 2013 00:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Feb 2013 00:35:29 +0000 Original-Received: from localhost ([127.0.0.1]:43163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8gbo-0000Gu-5Q for submit@debbugs.gnu.org; Thu, 21 Feb 2013 19:35:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59939) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8gbl-0000Gn-FW for submit@debbugs.gnu.org; Thu, 21 Feb 2013 19:35:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8gaJ-00011Y-8A for submit@debbugs.gnu.org; Thu, 21 Feb 2013 19:34:05 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:44310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8gaJ-00011U-5N for submit@debbugs.gnu.org; Thu, 21 Feb 2013 19:33:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8gaG-0005UK-A2 for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:33:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8ga7-0000yY-NJ for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:33:51 -0500 Original-Received: from exprod7og109.obsmtp.com ([64.18.2.171]:39801) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1U8ga7-0000xB-Az for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 19:33:43 -0500 Original-Received: from mail-la0-f71.google.com ([209.85.215.71]) (using TLSv1) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKUSa825E409PvJvLsZcluMd2oB9/FWP8U@postini.com; Thu, 21 Feb 2013 16:33:43 PST Original-Received: by mail-la0-f71.google.com with SMTP id fr10so163753lab.2 for ; Thu, 21 Feb 2013 16:33:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:from:to:subject:date:message-id:mime-version :content-type:x-gm-message-state; bh=b6qcDr19tbG7x/QCsQKSyTDotmKmwadhMWzJQUFHGCE=; b=miz5WLK5nqOS7MKwlu/5DiCXnZjn1k8BKKj7SytSv6cgQPcnzGwaep60deyfdLgs6R 5G1+uCVCTPpcj/yVHWA5exPsdQMIy6NQKi/FwayklPrn6S0XziS2lL1PVXdFykzmSPGf PW+ZFVERLPmor1hNg6H2TrgQ+okFcEdfTDaRt30wgCN5hn////GoN/4WL2cad2pdctFL izLTAOmYfmfXeYb4My44G2vroU40iLpA/YN6V4hdFFJ4W20EZ4PVcPyBo2O5fgaPnB3Z 4H/41Bq7RKAAfQJVQFoGLIrLGsAWN6D47UEKBopBfoDdCnia0i4Jf5xsDz2mD5gCgvya vdDw== X-Received: by 10.180.100.169 with SMTP id ez9mr46017566wib.3.1361493211158; Thu, 21 Feb 2013 16:33:31 -0800 (PST) X-Received: by 10.180.100.169 with SMTP id ez9mr46017555wib.3.1361493211017; Thu, 21 Feb 2013 16:33:31 -0800 (PST) Original-Received: from skwd ([149.241.115.91]) by mx.google.com with ESMTPS id ay10sm1373173wib.3.2013.02.21.16.33.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 16:33:30 -0800 (PST) X-Gm-Message-State: ALoCoQketYdUz7ZVhjl1rtsnj6SDr+ta1LP+pLi0qpELtsZo1pvxPu1yHiDZl0YAMmAwwS/0Fg1SWymWVEjqZSGBTvVMXcaeM71H6ZDOI7p8PdB/OZnDpOJ+OzNvbTRrjjf9PVTmgA37XBW9vHAkJdQnaoPO7lhiRXvkL8+PGY2a5ctGwBSFORY= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71613 Archived-At: I just spent a while trying to work out why a third-party mode I had just installed was not automatically added to my find-file-hook, even though the mode's file calls add-hook when it is loaded, and I took care to ensure the mode was autoloaded. I discovered that the problem was that the mode was loaded by my customization file, custom.el, but later, the same file overwrote find-file-hook, because I had customized find-file-hook. I found that the reason for the customization was to get flymake-mode automatically activated; I've filed a separate issue about this (#13779). After removing the customization, my find-file-hook was set up correctly (except for flymake-mode). The real problem here is that find-file-hook is clearly meant to be customizable (there is even a check box for auto-indent in its customization dialog), yet customizing it seems to cause a race condition where depending in what order files are autoloaded, hooks may fail to be added properly to find-file-hook. For the moment, I have added an add-hook call to my Emacs init file to set up flymake-mode, and removed the customization, but it would be nice if customizing the hook were both possible (perhaps by ensuring that customized hooks were added to rather than overwritten?) and safe. In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.13) of 2012-12-13 on komainu, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11300000 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.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--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' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil 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: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t recentf-mode: t show-paren-mode: t server-mode: t savehist-mode: t minibuffer-electric-default-mode: t iswitchb-mode: t icomplete-mode: t global-auto-revert-mode: t dtrt-indent-mode: t desktop-save-mode: t TeX-PDF-mode: t TeX-source-correlate-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: SPC i t SPC s h o u l d SPC b e SPC r e m o v e d SPC , SPC a n d , , SPC a n d SPC a SPC m o r e SPC s t a u s e r - f r i e n d l y SPC a n d SPC s t a n d a r d SPC w a y SPC o f SPC a c t i v a t i n g SPC f l y m a k e - m o d e SPC g l o b v a a b a l l y SPC a u t o m a t i c a l l y SPC a d d e d ? M-q C-c C-c y e s C-x k C-x k C-x k C-x k C-x k C-a C-SPC C-n M-w C-x k C-a C-x k y e s C-x b v a r s C-g C-x C-f v a C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-y C-p C-d C-d C-d C-d C-d C-d C-d C-d C-d C-x C-s C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-x r e p o r t - e m a c s - b u g Recent messages: Sending... Sending via mail... Sending...done Mark set Quit byte-code: End of buffer [16 times] Mark set Saving file /home/rrt/.emacs.d/vars.el... Wrote /home/rrt/.emacs.d/vars.el byte-code: End of buffer [13 times] byte-code: End of buffer Load-path shadows: /home/rrt/local/share/emacs/site-lisp/browse-kill-ring hides /usr/share/emacs24/site-lisp/emacs-goodies-el/browse-kill-ring /home/rrt/local/share/emacs/site-lisp/dict hides /usr/share/emacs24/site-lisp/emacs-goodies-el/dict /home/rrt/.emacs.d/elpa/dictionary-1.8.7/dictionary-init hides /usr/share/emacs24/site-lisp/dictionary-el/dictionary-init /home/rrt/.emacs.d/elpa/dictionary-1.8.7/dictionary hides /usr/share/emacs24/site-lisp/dictionary-el/dictionary /home/rrt/.emacs.d/elpa/dictionary-1.8.7/link hides /usr/share/emacs24/site-lisp/dictionary-el/link /home/rrt/.emacs.d/elpa/dictionary-1.8.7/connection hides /usr/share/emacs24/site-lisp/dictionary-el/connection /usr/share/emacs24/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style /usr/share/emacs24/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik /usr/share/emacs24/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt /usr/share/emacs24/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp /usr/share/emacs24/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info /usr/share/emacs24/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex /usr/share/emacs24/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex /usr/share/emacs24/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview /usr/share/emacs24/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex /usr/share/emacs24/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp /usr/share/emacs24/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl /usr/share/emacs24/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font /usr/share/emacs24/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x /usr/share/emacs24/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf /usr/share/emacs24/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite /usr/share/emacs24/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en /usr/share/emacs24/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold /usr/share/emacs24/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar /usr/share/emacs24/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context /usr/share/emacs24/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs /usr/share/emacs24/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex /usr/share/emacs/site-lisp/golang-mode/go-mode-load hides /usr/share/emacs/24.2/site-lisp/golang-mode/go-mode-load /usr/share/emacs/site-lisp/golang-mode/go-mode hides /usr/share/emacs/24.2/site-lisp/golang-mode/go-mode /usr/share/emacs/24.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/24.2/site-lisp/cdargs hides /usr/share/emacs/site-lisp/cdargs /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.2/lisp/textmodes/rst /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.2/lisp/textmodes/ispell /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.2/lisp/textmodes/flyspell Features: (time-stamp cus-edit info mule-util 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 add-log log-view pcvs-util vc-annotate vc ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher vc-bzr find-func etags latexenc preview prv-emacs tex-buf font-latex latex tex-style misearch multi-isearch m4-mode conf-mode newcomment make-mode pp help-mode view lua-mode nroff-mode autoconf autoconf-mode sh-script executable todoo noutline outline flymake compile comint ansi-color ring inform-mode diff-git diff-mode vc-git cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs jka-compr face-remap flyspell ispell smart-quotes auto-dictionary-autoloads c-eldoc-autoloads dictionary-autoloads diff-git-autoloads dired-isearch-autoloads full-ack-autoloads guess-style-autoloads kill-ring-search-autoloads magit-autoloads mv-shell-autoloads tumble-autoloads http-post-simple-autoloads package tabulated-list completing-help recentf tree-widget wid-edit uniquify paren server savehist minibuf-eldef iswitchb icomplete autorevert dtrt-indent desktop cus-start cus-load ropemacs pymacs warnings url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv macroexp gnus-util password-cache url-vars mm-util mail-prsvr tex dbus xml regexp-opt remember user-site-loaddefs advice advice-preload yasnippet help-fns derived edmacro kmacro easymenu assoc cl muse-autoloads go-mode-load emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode preview-latex tex-site auto-loads time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe 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 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/