unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Rocky Bernstein <rocky@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: A couple of things that I think should be in byte bytecode meta comments
Date: Fri, 22 Dec 2017 13:49:06 -0500	[thread overview]
Message-ID: <CANCp2gZAm3MMDsTgG4FE5V7iNWUunD7RTYDz8wg6E-NqTBZSdg@mail.gmail.com> (raw)
In-Reply-To: <83o9mqlin0.fsf@gnu.org>

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

There is a bit of flexibility in how run-time systems handle denoting the
file name. One thing that is often done is give the path as it was
specified in the compile command. This could be ./byte-comp.el or
./emacs-lisp/byte-comp.el  (And from this you might see where I'm going
with this).

One run-time system for a programming language I am familiar with started
with the what I described (use path as given in invocation) and then and
switched to turning everything into an absolute path. Personally, I like
giving both when the starting point was indeed a relative path.

Now as to the portability. Yes, if the file is run on another system, the
path isn't exact. But it does give some idea of what we are talking as you
git closer to the bottom of the path and that may be helpful.

Consider cases where I have a stable and development branch and then
install into say /usr/local/share/emacs/lisp. Even though the top-level
directories are not the same, it still is useful to know where in the
source code tree (whether on my system or not).

And I recall one Emacs package that concatenated a bunch of bytecode files
xx-a.elc xx-b.elc and called the result xx.elc. Although unusual, with the
filenames in the bytecode, you can unscramble this .

And finally there will be cases where the path is exact.

In sum, just because sometimes it doesn't work out, doesn't mean it
will be *totally
*meaningless all the time. And I prefer "sometimes useful" to no
information, however accurate that is.


On Fri, Dec 22, 2017 at 1:30 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Rocky Bernstein <rocky@gnu.org>
> > Date: Fri, 22 Dec 2017 12:55:15 -0500
> >
> > I mean file path or file name, not the file contents.
>
> You mean, the absolute file name of the source file?  But then the
> byte-compiled file will be unportable, as the file name will be
> different on another system.
>

[-- Attachment #2: Type: text/html, Size: 2509 bytes --]

  reply	other threads:[~2017-12-22 18:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 17:54 A couple of things that I think should be in byte bytecode meta comments Rocky Bernstein
2017-12-22 17:55 ` Rocky Bernstein
2017-12-22 18:30   ` Eli Zaretskii
2017-12-22 18:49     ` Rocky Bernstein [this message]
2017-12-22 20:25       ` Eli Zaretskii
2017-12-22 20:55         ` Rocky Bernstein
2017-12-23  8:25           ` Eli Zaretskii
2017-12-23  8:44             ` Rocky Bernstein
2017-12-23 15:32               ` Robert Weiner
2017-12-23 17:16                 ` Rocky Bernstein
2017-12-23 18:30                   ` Robert Weiner
2017-12-24  2:44                     ` Rocky Bernstein
2018-01-13 19:44                       ` Thien-Thi Nguyen
2017-12-22 21:27 ` Andreas Schwab
2017-12-22 21:43   ` Rocky Bernstein
2017-12-23  8:25     ` Andreas Schwab
2017-12-23  8:35       ` Rocky Bernstein

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CANCp2gZAm3MMDsTgG4FE5V7iNWUunD7RTYDz8wg6E-NqTBZSdg@mail.gmail.com \
    --to=rocky@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).