missing src/ directory for eval.c (Was: 1L?)

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

missing src/ directory for eval.c (Was: 1L?)

Van Ly-2
> If I were you, I'd file a bug report with NetBSD.

The packaged distribution’s behaviour for GNU/Emacs 22 is identical. This is the original GNU/Emacs found on the Mac. The src/ directory is missing for eval.c .

Unlike the Lisp files, the C files are not targeted and placed outside of the source distribution by `make install`. It seems.

And, maintainers for 4 package variants, 3 installer variants, 2 hardware vendor variants may not be aware, or, this is what God intends.

>> Previously, when I was building GNU/Emacs directly
>> from src the click on 'C source code' just worked.
>
> That's what I still do. It still works.

With more experience packaging and distributing GNU/Emacs, I want to believe the packages for masses by maintaners are better than what I can roll my own. It may not "just work" for you and me if we move the git-repo after `make install`.

Thanks.

v.
Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Tomas Zerolo
On Mon, Feb 11, 2019 at 10:35:45PM +1100, Van Ly wrote:
> > If I were you, I'd file a bug report with NetBSD.

[...]

> With more experience packaging and distributing GNU/Emacs, I want to believe the packages for masses by maintaners are better than what I can roll my own. It may not "just work" for you and me if we move the git-repo after `make install`.

Can't confirm: I always compile Emacs off git and "make install".
Source dir is always in the right place for C-x C-f to find the C
sources. I strongly suspect the packaging to be at fault in this.

Cheers
-- tomás

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Noam Postavsky
On Mon, 11 Feb 2019 at 08:04, <[hidden email]> wrote:

>
> On Mon, Feb 11, 2019 at 10:35:45PM +1100, Van Ly wrote:
> > > If I were you, I'd file a bug report with NetBSD.
>
> [...]
>
> > With more experience packaging and distributing GNU/Emacs, I want to believe the packages for masses by maintaners are better than what I can roll my own. It may not "just work" for you and me if we move the git-repo after `make install`.
>
> Can't confirm: I always compile Emacs off git and "make install".
> Source dir is always in the right place for C-x C-f to find the C
> sources. I strongly suspect the packaging to be at fault in this.

Because Emacs save the absolute dir:

source-directory is a variable defined in ‘C source code’.
Its value is "/home/npostavs/src/emacs/emacs-26/"

Documentation:
Directory in which Emacs sources were found when Emacs was built.
You cannot count on them to still be there!

Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Stefan Monnier
In reply to this post by Van Ly-2
> Unlike the Lisp files, the C files are not targeted and placed outside of
> the source distribution by `make install`.  It seems.

Indeed, the C source files are not expected to be present in an
Emacs installation.  They're only expected to be present on the machine
where Emacs was compiled.

Part of the idea is that, if you're not compiling Emacs yourself,
accessing the C source code is much less useful.


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Yuri Khan
In reply to this post by Van Ly-2
On Mon, Feb 11, 2019 at 8:41 PM Van Ly <[hidden email]> wrote:

> > If I were you, I'd file a bug report with NetBSD.
>
> The packaged distribution’s behaviour for GNU/Emacs 22 is identical. This is the original GNU/Emacs found on the Mac. The src/ directory is missing for eval.c .
>
> Unlike the Lisp files, the C files are not targeted and placed outside of the source distribution by `make install`. It seems.
>
> And, maintainers for 4 package variants, 3 installer variants, 2 hardware vendor variants may not be aware, or, this is what God intends.

I think pretty much no binary package distribution is going to include
C sources of Emacs in the main package. From the maintainer’s point of
view, they are unnecessary for the majority of the users. For that
matter, even Elisp sources are distributed in an optional emacs-el
package by Debian and Ubuntu.

And if you ‘apt-get source emacs’ into a directory of your choice, you
can point Emacs at this directory and it will do the right thing.

Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Michael Albinus
In reply to this post by Stefan Monnier
Stefan Monnier <[hidden email]> writes:

Hi Stefan,

> Part of the idea is that, if you're not compiling Emacs yourself,
> accessing the C source code is much less useful.

Like for every general rule, there are counter examples. I, for example,
cannot build Emacs under MS Windows, I'm bound to
distributions. Nevertheless, I could use the C sources when debugging
there, in order to read them.

This is *not* a request for change, just my 2¢.

>         Stefan

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Tomas Zerolo
On Mon, Feb 11, 2019 at 04:16:25PM +0100, Michael Albinus wrote:

> Stefan Monnier <[hidden email]> writes:
>
> Hi Stefan,
>
> > Part of the idea is that, if you're not compiling Emacs yourself,
> > accessing the C source code is much less useful.
>
> Like for every general rule, there are counter examples. I, for example,
> cannot build Emacs under MS Windows, I'm bound to
> distributions. Nevertheless, I could use the C sources when debugging
> there, in order to read them.
I concur: one of Emacs's strong points is that it readily gives you
easy access to its innards (the "study" part in the four freedoms,
after all :-)

Cheers
-- t

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Emanuel Berg-5
In reply to this post by Yuri Khan
Yuri Khan wrote:

> I think pretty much no binary package
> distribution is going to include C sources of
> Emacs in the main package. From the
> maintainer’s point of view, they are
> unnecessary for the majority of the users.
> For that matter, even Elisp sources are
> distributed in an optional emacs-el package
> by Debian and Ubuntu.

Yes, you get the Elisp source from the repos as
an ordinary package, namely emacs-el (as you
say).

For the whole source, including the C, you add
(if it isn't there already) a "deb-src" line to
/etc/apt/sources.list , e.g.

    deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

and then do

    $ apt-get source emacs24

> And if you ‘apt-get source emacs’ into
> a directory of your choice, you can point
> Emacs at this directory and it will do the
> right thing.

I have to include the version, so the
command-line argument corresponds to
a non-metapackge name, otherwise I get
something else.

If you do use an Emacs version from the repos,
and not bleeding-edge from Git, I think it
makes sense to get the source from the repos as
well, and point the variable there. Perhaps it
won't matter much in the average case, but it
makes more sense.

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Robert Thorpe-2
In reply to this post by Stefan Monnier
Stefan Monnier <[hidden email]> writes:

>> Unlike the Lisp files, the C files are not targeted and placed outside of
>> the source distribution by `make install`.  It seems.
>
> Indeed, the C source files are not expected to be present in an
> Emacs installation.  They're only expected to be present on the machine
> where Emacs was compiled.
>
> Part of the idea is that, if you're not compiling Emacs yourself,
> accessing the C source code is much less useful.

I think it would be useful if the help buffer explained this.

E.g.

"forward-char is an interactive built-in function in `C source code'.
C-source codes isn't usually available unless Emacs was installed from
source."

BR,
Robert Thorpe


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Emanuel Berg-5
Robert Thorpe wrote:

> "forward-char is an interactive built-in
> function in `C source code'. C-source codes
> isn't usually available unless Emacs was
> installed from source."

But it can be available even so - yes, you say
"usually".

And I suppose in one way or another Emacs is
always "installed from source" :)

Perhaps a hint how to get it to work even if
Emacs isn't "installed from source"?

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Van L
In reply to this post by Yuri Khan

> From the maintainer’s point of
> view, they are unnecessary for the majority of the users.

True.

Some package names are suffixed -nox for no X.

I don’t know if it is elite or dumbing down to
put a tool tip kind of thing or brief text overlay to
say how to get the missing documentation or missing source code.

This is a help to some people.
Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Stefan Monnier
In reply to this post by Robert Thorpe-2
> I think it would be useful if the help buffer explained this.
>
> E.g.
>
> "forward-char is an interactive built-in function in `C source code'.
> C-source codes isn't usually available unless Emacs was installed from
> source."

That's too wordy for all those users who'll never want to see the
source anyway.  Much better would be if when the user clicks on the `C
source code` button, Emacs explained the situation and provided guidance
for the user to download the source.  Patch welcome.


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Emanuel Berg-5
Stefan Monnier wrote:

>> "forward-char is an interactive built-in
>> function in `C source code'. C-source codes
>> isn't usually available unless Emacs was
>> installed from source."
>
> That's too wordy for all those users who'll
> never want to see the source anyway.
> Much better would be if when the user clicks
> on the `C source code` button, Emacs
> explained the situation and provided guidance
> for the user to download the source.
> Patch welcome.

I agree, good idea!

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c (Was: 1L?)

Emanuel Berg-5
In reply to this post by Van L
Van L wrote:

>> From the maintainer’s point of view, they
>> are unnecessary for the majority of
>> the users.
>
> True.
>
> Some package names are suffixed -nox for
> no X.
>
> I don’t know if it is elite or dumbing down
> to put a tool tip kind of thing or brief text
> overlay to say how to get the missing
> documentation or missing source code.

The tool tip already exits:

    $ aptitude show emacs-nox

    [...]
    Description: GNU Emacs editor (metapackage,
    without X support) GNU Emacs is the
    extensible self-documenting text editor.
    This is a metapackage that will always
    depend on the latest recommended Emacs
    release, without support for X.

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Stefan Monnier
In reply to this post by Emanuel Berg-5
>> Patch welcome.
> I agree, good idea!

Hmmm... I piped it to `patch` but that didn't seem to do the trick.
Maybe it was corrupted along the way.  Can you resend it?


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Emanuel Berg-5
Stefan Monnier wrote:

>>> Patch welcome.
>>
>> I agree, good idea!
>
> Hmmm... I piped it to `patch` but that didn't
> seem to do the trick. Maybe it was corrupted
> along the way. Can you resend it?

(if (file-exists-p file)
    (find-file file)
  (display-no-C-installed-message) )

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|

Re: missing src/ directory for eval.c

Van L
In reply to this post by Emanuel Berg-5

> I don’t know if it is elite or dumbing down
> to put a tool tip kind of thing or brief text
> overlay to say how to get the missing
> documentation or missing source code.

The tool tip hints at you whilst inside
of GNU/Emacs on discovery of missing src
or doc, and getting either is as easy as
choosing an ELPA/MELPA package on a
click.

The platform packaging tools offer
emacs-full to include src, doc.

And, emacs-nano is the tiny stripped
down racing car installation that can
grow as an option.

--
© 2019 Van L
gpg using EEF2 37E9 3840 0D5D 9183  251E 9830 384E 9683 B835
"What's so strange when you know that you're a Wizard at 3?" -Joni Mitchell