all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31107: 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue
@ 2018-04-09  8:23 Xu Chunyang
  2018-04-09 11:59 ` Noam Postavsky
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xu Chunyang @ 2018-04-09  8:23 UTC (permalink / raw)
  To: 31107

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-09 14:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09  8:23 bug#31107: 26.0.91; insert-file-contents-literally's doc indicates insert-file-contents runs find-file-hook, but it seems untrue Xu Chunyang
2018-04-09 11:59 ` Noam Postavsky
2018-04-09 12:05   ` Noam Postavsky
2018-04-09 14:54 ` Eli Zaretskii
2018-04-09 14:55 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.