[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: search files with conversion but fundamental mode, no handlers, no f

From: Eli Zaretskii
Subject: Re: search files with conversion but fundamental mode, no handlers, no file-local vars
Date: Fri, 21 Dec 2012 13:53:01 +0200

> From: "Drew Adams" <address@hidden>
> Cc: "'Eli Zaretskii'" <address@hidden>, <address@hidden>
> Date: Thu, 20 Dec 2012 20:02:20 -0800
> I still think it could also help to make clear more of the things that `i-f-c'
> inhibits, whether it is file handlers or hooks or file-local variables or
> respect of `auto-mode-alist' or whatever.

I have now added to the doc string of insert-file-contents a reference
to format-decode.  The only other non-trivial thing that
insert-file-contents does is invoke the file handlers, but that is
done by any file primitive we have, so it doesn't make sense to
mention it only in insert-file-contents.  IOW, the fact that file
handlers are invoked is "trivial".

> In particular, it would help users if you make clear how using `i-f-c' (e.g.
> with non-nil VISIT) differs from using `find-file-noselect'.
> That would make it easier for users to choose & use these functions.  All the
> more so since `i-f-c' is coded in C and that code is likely to be absent.

This could be ELisp manual stuff, I don't think it's appropriate for a
doc string (revision 111051 on the emacs-24 branch).

The ELisp manual already says something about it, in the node
"Visiting Functions":

  This section describes the functions normally used to visit files.  For
  historical reasons, these functions have names starting with `find-'
  rather than `visit-'.  *Note Buffer File Name::, for functions and
  variables that access the visited file name of a buffer or that find an
  existing buffer by its visited file name.

     In a Lisp program, if you want to look at the contents of a file but
  not alter it, the fastest way is to use `insert-file-contents' in a
  temporary buffer.  Visiting the file is not necessary and takes longer.
  *Note Reading from Files::.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]