all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rocky Bernstein <rocky@gnu.org>
To: rswgnu@gmail.com
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: A couple of things that I think should be in byte bytecode meta comments
Date: Sat, 23 Dec 2017 12:16:14 -0500	[thread overview]
Message-ID: <CANCp2gYNBgeknpxBi8oK7F_5QU6HZWJPZ0B9QR4E12Nc2uc=-w@mail.gmail.com> (raw)
In-Reply-To: <CA+OMD9j4ywqE2AeLkDa2k9QyWwLZ8DyLw8qif0=D7CPdYvCmWg@mail.gmail.com>

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

On Sat, Dec 23, 2017 at 10:32 AM, Robert Weiner <rsw@gnu.org> wrote:

> On Sat, Dec 23, 2017 at 3:44 AM, Rocky Bernstein <rocky@gnu.org> wrote:
>
>>
>> Path names give you good places to start looking for the file.
>>
>> And often they can quickly give information as to what's up, e.g. I am
>> running  from the stable or development branch. Or running from an Ubuntu
>> build or a source-code build.
>>
>
> ​If you are actually running a branch of Emacs and using a .elc file
> included therein, then ​your load-path should be configured to take you to
> the proper associated source file with the find-library command, unless
> filenames are duplicated within the lisp tree.  Only uses outside of that,
> i.e. working on files outside of the branch you are running, would this be
> an issue, I would think, or if there ever is a bundled format of .elc that
> combines the byte-compiled output of multiple files.
>
> If anything of this nature is ever done, it should be based on the source
> file's default installed location relative to the Emacs root directory for
> portability.  Any reasonable function/tool could then find the source file.
>
> Bob
>
>

Let's back up a little. A function like byte-compile-file which is what
would store this information into the bytecode file only has the path it is
given. There are only two possible kinds of paths I know of: relative or
absolute.

You have most forcefully convinced yourself that the only sane way that
programmers or that  programs written by programmers work would be to use
relative paths. It matters not because, as I said, the function has only
what is given it.

My suggestion was that when a relative path is given, (which is always in
your world), also turn that into an absolute path and store in the bytecode
file as well.  In my experience in working in debugging, debuggers and in
showing where errors are, sometimes the absolute path can be useful in
addition to the relative path, for informative purposes.

I know others will not believe that, and furthermore claim most
emphatically that were these paths included as meta comments  in the
bytecode file, that would be either useless, confusing and harmful and who
knows what other bad things could happen.  (By the way, as something
similar, when I enter Emacs, I am shown a build string for a system is not
mine, which so far has not caused such havoc, and I even find mildly
interesting).

Ok. this was a just suggestion. That it has caused such negative reaction,
I've seen before in other venues, and I'm sorry.

For my part, I know what I can do to handle my concerns when or if I decide
to improve the error reporting and debugging situation on Emacs. Yes, I am
sorry I didn't say at the outset that this is were I envision this getting
used.

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

  reply	other threads:[~2017-12-23 17:16 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
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 [this message]
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

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

  git send-email \
    --in-reply-to='CANCp2gYNBgeknpxBi8oK7F_5QU6HZWJPZ0B9QR4E12Nc2uc=-w@mail.gmail.com' \
    --to=rocky@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rswgnu@gmail.com \
    /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.