all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Show who is requiring
Date: Sat, 17 Nov 2012 13:00:34 +0100	[thread overview]
Message-ID: <87vcd4l9r1.fsf@zigzag.favinet> (raw)
In-Reply-To: <83d2zc331k.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Nov 2012 13:02:47 +0200")

[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]

() Eli Zaretskii <eliz@gnu.org>
() Sat, 17 Nov 2012 13:02:47 +0200

   Sorry, I just couldn't imagine that someone will not know about
   buffer-file-name and current-buffer.

To be fair, guessing those requires knowing something about how ‘load’
works.  Emacs is buffer-centric so it ‘load’s by first populating a
buffer then ‘read’ing from it.  Guile, as a counter-example, implements
‘load’ by ‘read’ing from a "port".  Other systems might mmap(2) or talk
to a daemon or whatever.

I see that (info "(emacs) Lisp Libraries")
says only:

 To "load" an Emacs Lisp file, type `M-x load-file'.  This command reads
 a file name using the minibuffer, and executes the contents of that
 file as Emacs Lisp code.  It is not necessary to visit the file first;
 this command reads the file directly from disk, not from an existing
 Emacs buffer.

In (info "(elisp) How Programs Do Loading")
there is a bit more:

 Whatever the name under which the file is eventually found, and the
 directory where Emacs found it, Emacs sets the value of the variable
 `load-file-name' to that file's name.

 [...]

 When loading a source file (not compiled), `load' performs
 character set translation just as Emacs would do when visiting the
 file.  *Note Coding Systems::.

but again, how ‘load’ actually does its job is never detailed.  To my
ears, this is a just omission, and thus OP's question has some merit.

-- 
Thien-Thi Nguyen ..................................... GPG key: 4C807502
.                  NB: ttn at glug dot org is not me                   .
.                 (and has not been since 2007 or so)                  .
.                        ACCEPT NO SUBSTITUTES                         .
........... please send technical questions to mailing lists ...........

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2012-11-17 12:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 23:08 Show who is requiring Sebastien Vauban
2012-11-17  7:53 ` Eli Zaretskii
2012-11-17  8:29 ` Bastien
2012-11-17  9:43   ` Oleksandr Gavenko
2012-11-17 10:05     ` Bastien
     [not found] ` <mailman.13164.1353140953.855.help-gnu-emacs@gnu.org>
2012-11-17  9:41   ` Sebastien Vauban
2012-11-17 10:11     ` Eli Zaretskii
2012-11-17 10:38       ` Thien-Thi Nguyen
2012-11-17 11:02         ` Eli Zaretskii
2012-11-17 12:00           ` Thien-Thi Nguyen [this message]
2012-11-17 16:17 ` Drew Adams
2012-11-19 14:59 ` Stefan Monnier
2012-11-19 15:18   ` Ludwig, Mark
     [not found]   ` <mailman.13321.1353338324.855.help-gnu-emacs@gnu.org>
2012-11-19 16:03     ` Stefan Monnier
2012-11-19 16:13       ` Sebastien Vauban
2012-12-07 21:57         ` Sebastien Vauban
2012-12-07 22:31           ` Sebastien Vauban
2012-12-07 22:54             ` Sebastien Vauban
2012-12-11  1:57           ` Stefan Monnier
2012-11-19 15:54 ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcd4l9r1.fsf@zigzag.favinet \
    --to=ttn@gnuvola.org \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.