GNU bug report logs - #31107
26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Mon, 9 Apr 2018 08:24:01 UTC

Severity: normal

Found in version 26.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#31107: closed (26.0.91; insert-file-contents-literally's doc
 indicates insert-file-contents runs find-file-hook, but it seems untrue)
Date: Mon, 09 Apr 2018 14:56:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 09 Apr 2018 17:55:37 +0300
with message-id <83zi2cxwd2.fsf <at> gnu.org>
and subject line Re: bug#31107: 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue
has caused the debbugs.gnu.org bug report #31107,
regarding 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
31107: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31107
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.91;
 insert-file-contents-literally's doc indicates insert-file-contents
 runs find-file-hook, but it seems untrue
Date: Mon, 09 Apr 2018 16:23:11 +0800
'C-h S insert-file-contents-literally' indicates 'insert-file-contents'
runs 'find-file-hook'

    -- Function: insert-file-contents-literally filename &optional visit
             beg end replace
        This function works like ‘insert-file-contents’ except that it does
        not run ‘find-file-hook’, 

However, 'insert-file-contents' doesn't run 'find-file-hook'. I test
using the following

    (add-hook 'find-file-hook
              (defun foo ()
                (message-box "Visiting %s" buffer-file-truename)))
    
    (insert-file-contents "/etc/shells")

'foo' is not called by 'insert-file-contents', though 'find-file' runs
the hook as expected.

    (find-file "/etc/shells")


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: 31107-done <at> debbugs.gnu.org
Subject: Re: bug#31107: 26.0.91;
 insert-file-contents-literally's doc indicates insert-file-contents
 runs find-file-hook, but it seems untrue
Date: Mon, 09 Apr 2018 17:55:37 +0300
Closing.


This bug report was last modified 7 years and 96 days ago.

Previous Next


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