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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31107 in the body.
You can then email your comments to 31107 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31107; Package emacs. (Mon, 09 Apr 2018 08:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xu Chunyang <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 Apr 2018 08:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31107; Package emacs. (Mon, 09 Apr 2018 12:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 31107 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 31107 <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 07:59:16 -0400
Xu Chunyang <mail <at> xuchunyang.me> writes:

> '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’, 
          ^^^

I think you just missed the "not".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31107; Package emacs. (Mon, 09 Apr 2018 12:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 31107 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 31107 <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 08:05:18 -0400
Noam Postavsky <npostavs <at> gmail.com> writes:

> I think you just missed the "not".

Ugh, nevermind, it was me who misread your report.  Sorry for the noise.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31107; Package emacs. (Mon, 09 Apr 2018 14:56:01 GMT) Full text and rfc822 format available.

Message #14 received at 31107 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 31107 <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:54:58 +0300
> From: Xu Chunyang <mail <at> xuchunyang.me>
> 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'.

Whoever wrote that meant after-insert-file-functions.  I fixed that,
thanks.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Mon, 09 Apr 2018 14:56:02 GMT) Full text and rfc822 format available.

Notification sent to Xu Chunyang <mail <at> xuchunyang.me>:
bug acknowledged by developer. (Mon, 09 Apr 2018 14:56:02 GMT) Full text and rfc822 format available.

Message #19 received at 31107-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 May 2018 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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