* Retrieving the "include" directory for Emacs Modules
@ 2024-12-07 16:27 Marco Antoniotti
2024-12-07 16:43 ` Eli Zaretskii
2024-12-07 19:09 ` Björn Bidar
0 siblings, 2 replies; 21+ messages in thread
From: Marco Antoniotti @ 2024-12-07 16:27 UTC (permalink / raw)
To: help-gnu-emacs
Hi
To compile Emacs C modules we need the proper 'include' directory. I.e.,
we need to stick that information into Makefiles.
We do have lisp-directory (and we can surmise the location of the include
directory from it), but it would be nice to have something like
em-include-directory (the em- prefix for "Emacs Module").
Meanwhile, any idea about how to make this somewhat portable?
Any idea?
--
Marco Antoniotti
Somewhere over the Rainbow
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-07 16:27 Marco Antoniotti
@ 2024-12-07 16:43 ` Eli Zaretskii
2024-12-07 19:09 ` Björn Bidar
1 sibling, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-07 16:43 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Sat, 7 Dec 2024 17:27:16 +0100
>
> To compile Emacs C modules we need the proper 'include' directory. I.e.,
> we need to stick that information into Makefiles.
>
> We do have lisp-directory (and we can surmise the location of the include
> directory from it), but it would be nice to have something like
> em-include-directory (the em- prefix for "Emacs Module").
Isn't that
(expand-file-name "../../../include" data-directory)
?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-07 16:27 Marco Antoniotti
2024-12-07 16:43 ` Eli Zaretskii
@ 2024-12-07 19:09 ` Björn Bidar
1 sibling, 0 replies; 21+ messages in thread
From: Björn Bidar @ 2024-12-07 19:09 UTC (permalink / raw)
To: Marco Antoniotti; +Cc: help-gnu-emacs
Marco Antoniotti <marcoxa@gmail.com> writes:
> Hi
>
> To compile Emacs C modules we need the proper 'include' directory. I.e.,
> we need to stick that information into Makefiles.
>
> We do have lisp-directory (and we can surmise the location of the include
> directory from it), but it would be nice to have something like
> em-include-directory (the em- prefix for "Emacs Module").
>
> Meanwhile, any idea about how to make this somewhat portable?
You mean in the makefile or in lisp? If it's in the makefile
you should find out the directory the makefile is in and then go from
there.
E.g.:
MAKEFILEDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
CFLAGS += -I$(MAKEFILEDIR)/include
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 9:59 ` Marco Antoniotti
@ 2024-12-08 11:40 ` Eli Zaretskii
2024-12-08 15:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-08 11:40 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Sun, 8 Dec 2024 10:59:28 +0100
>
> Sorry Eli
>
> your solution is not portable and it doesn't work on Mac and Windows (29.2)
>
> On Mac the following works
>
> ELISP> (expand-file-name "../include" data-directory)
> "/Applications/Emacs.app/Contents/Resources/include"
>
> On Windows the include folder is "higher" up.
> "C:\Program Files\Emacs\emacs-29.2\include\"
Sorry, I used too few "..". The correct way is
(expand-file-name "../../../../include" data-directory)
> Given that people (like me) are experimenting with emacs modules, I'd lobby
> for the introduction of a 'include-direcotry' variable.
I honestly don't understand why you need this at all. emacs-module.h
is supposed to be installed in the compilers include tree, where the
compiler looks for header files by default. So you shouldn't even
need to know where the header lives, in order to compile a module.
The module's code should just do
#include <emacs-module.h>
and that's it. Or what am I missing?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 11:40 ` Eli Zaretskii
@ 2024-12-08 15:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 16:39 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-08 15:47 UTC (permalink / raw)
To: help-gnu-emacs
> I honestly don't understand why you need this at all. emacs-module.h
> is supposed to be installed in the compilers include tree, where the
> compiler looks for header files by default. So you shouldn't even
> need to know where the header lives, in order to compile a module.
> The module's code should just do
>
> #include <emacs-module.h>
>
> and that's it. Or what am I missing?
That presumes that Emacs is installed system-wide (and "properly").
When the compilation of the module is initiated from within Emacs, it
would make a lot of sense for this "ambient" Emacs to be able to tell
`make/gcc/younameit` explicitly and reliably where its own
`emacs-module.h` can be found.
Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 15:36 ` Marco Antoniotti
@ 2024-12-08 15:50 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 16:36 ` Eli Zaretskii
1 sibling, 0 replies; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-08 15:50 UTC (permalink / raw)
To: help-gnu-emacs
> EMACS_INCLUDE_DIR := $(shell $(EMACS) -q --batch --eval "(princ
> *em-include-directory*)")
> EMACS_SRC_DIR := $(shell $(EMACS) -q --batch --eval "(princ
> *em-scr-directory*)")
FWIW, when compiled from within Emacs, you'd be better served with
something like:
(call-process "make" nil nil nil
(concat "EMACS_INCLUDE_DIR=" em-include-directory))
- Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 15:18 ` Marco Antoniotti
2024-12-08 15:29 ` Jean Louis
@ 2024-12-08 16:30 ` Eli Zaretskii
1 sibling, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-08 16:30 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Sun, 8 Dec 2024 16:18:15 +0100
>
> sorry again: the behavior on Mac and Windows is different w.r.t.
> data-directory (see previous message). I can try on a Linux machine
> tomorrow. Note that I installed Emacs with brew on my Mac
>
> Case in point: if I try to install 'pq' from the package manager I get the
> following error.
>
> gcc -I/Users/marcoxa/.emacs.d/elpa/pq-0.2 -I -I/usr/share/emacs/29.4
> -I/usr/local/include/postgresql@14 -std=gnu99 -ggdb3 -Wall -fPIC -c
> pq-core.c
>
> pq-core.c:19:10: fatal error: 'emacs-module.h' file not found
> 19 | #include <emacs-module.h>
> | ^~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [pq-core.o] Error 1
>
> which is not surprising as the include directory is not listed in the -I
> options.
It shouldn't be: if the compiler cannot find emacs-module.h, then your
Emacs is installed incorrectly. The installation should put
emacs-module.h where the compiler looks for include files.
> Of course, I can muck around and ensure that the C_INCLUDE_PATH has the
> right things in it, but the issue, as is, IMHO remains.
You shouldn't need to mess with C_INCLUDE_PATH, because emacs-module.h
is supposed to be in the C include path to begin with.
> Having said that, another reason for needing a reliable
> include-directory variable,
> is to query Emacs in batch mode (I know: iti is expensive), to run a build
> system outside Emacs for testing.
Sorry, I don't understand that: what do you mean by "to run a build
system"?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 15:36 ` Marco Antoniotti
2024-12-08 15:50 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-12-08 16:36 ` Eli Zaretskii
1 sibling, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-08 16:36 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Sun, 8 Dec 2024 16:36:09 +0100
>
> I have no qualms about being able to "fix" 'pq' to make it work.
>
> But I am writing an Emacs Module and I do not want to force anybody to
> "fix" my setup ("It works on my machine" (tm))
>
> In other words, I would like to be able to write
>
> EMACS_INCLUDE_DIR := $(shell $(EMACS) -q --batch --eval "(princ
> *em-include-directory*)")
> EMACS_SRC_DIR := $(shell $(EMACS) -q --batch --eval "(princ
> *em-scr-directory*)")
Once again: if your Emacs is installed correctly, emacs-module.h
should be in a directory where the C compiler looks by default for its
header files. No -I command-line options should be needed. Just make
sure to put emacs-module.h where you have stdio.h and other standard
headers.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 15:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-12-08 16:39 ` Eli Zaretskii
2024-12-08 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-08 16:39 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 08 Dec 2024 10:47:54 -0500
> From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> > I honestly don't understand why you need this at all. emacs-module.h
> > is supposed to be installed in the compilers include tree, where the
> > compiler looks for header files by default. So you shouldn't even
> > need to know where the header lives, in order to compile a module.
> > The module's code should just do
> >
> > #include <emacs-module.h>
> >
> > and that's it. Or what am I missing?
>
> That presumes that Emacs is installed system-wide (and "properly").
What other way is there to install Emacs?
> When the compilation of the module is initiated from within Emacs, it
> would make a lot of sense for this "ambient" Emacs to be able to tell
> `make/gcc/younameit` explicitly and reliably where its own
> `emacs-module.h` can be found.
But if Emacs is "not installed properly", we don't know that.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 16:39 ` Eli Zaretskii
@ 2024-12-08 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 17:46 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-08 16:48 UTC (permalink / raw)
To: help-gnu-emacs
>> > I honestly don't understand why you need this at all. emacs-module.h
>> > is supposed to be installed in the compilers include tree, where the
>> > compiler looks for header files by default. So you shouldn't even
>> > need to know where the header lives, in order to compile a module.
>> > The module's code should just do
>> >
>> > #include <emacs-module.h>
>> >
>> > and that's it. Or what am I missing?
>>
>> That presumes that Emacs is installed system-wide (and "properly").
>
> What other way is there to install Emacs?
Compile manually and run from the build tree?
Uncompress a downloaded pre-compiled archive into a directory and just
use it from there (AFAIK, very common under macOS and Windows)?
With luck on some systems the C (or other) compiler is installed in
a similar way (i.e. in its own subdirectory, siloed from Emacs).
>> When the compilation of the module is initiated from within Emacs, it
>> would make a lot of sense for this "ambient" Emacs to be able to tell
>> `make/gcc/younameit` explicitly and reliably where its own
>> `emacs-module.h` can be found.
> But if Emacs is "not installed properly", we don't know that.
Emacs *should* know that, just like it knows where is its
`lisp-directory`.
Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-12-08 17:46 ` Eli Zaretskii
2024-12-09 14:11 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-08 17:46 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 08 Dec 2024 11:48:24 -0500
> From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> >> > #include <emacs-module.h>
> >> >
> >> > and that's it. Or what am I missing?
> >>
> >> That presumes that Emacs is installed system-wide (and "properly").
> >
> > What other way is there to install Emacs?
>
> Compile manually and run from the build tree?
That's called "run uninstalled". And in that case, the user who does
that knows very well where the header lives: in the same directory
from which he/she runs Emacs.
> Uncompress a downloaded pre-compiled archive into a directory and just
> use it from there (AFAIK, very common under macOS and Windows)?
If that doesn't place emacs-module.h in the system-wide include
directory, it is a broken installation.
> With luck on some systems the C (or other) compiler is installed in
> a similar way (i.e. in its own subdirectory, siloed from Emacs).
That's not how multi-package installation should be organized if the
user wants the packages to cooperate.
> >> When the compilation of the module is initiated from within Emacs, it
> >> would make a lot of sense for this "ambient" Emacs to be able to tell
> >> `make/gcc/younameit` explicitly and reliably where its own
> >> `emacs-module.h` can be found.
> > But if Emacs is "not installed properly", we don't know that.
>
> Emacs *should* know that, just like it knows where is its
> `lisp-directory`.
That's impractical expectation. Recall how hard we worked to find the
pdumper file and the preloaded *.eln files, what with all the tricks
people use when installing Emacs. I'm not interested in adding
another burden to our maintenance so that Emacs will paper over broken
installations. Sorry.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
[not found] <mailman.624.1733687129.13738.help-gnu-emacs@gnu.org>
@ 2024-12-09 9:58 ` Marco Antoniotti
2024-12-09 14:56 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Marco Antoniotti @ 2024-12-09 9:58 UTC (permalink / raw)
To: help-gnu-emacs
Hi Eli
somewhere, somehow (don't ask me), the "data" directory where emacs keeps
its stuff is created and its location recorded.
The emacs-module.h is the only thing that sits in the include directory.
Now. On my Windows machine, where I install Emacs downloading the
installer from one of the links available on the main website, the
installation seems, AFAIK, to be up to your standards.
On my Mac, If I install emacs as a "formula" (i.e., not a s an app) things
seem installed as they should be. OTOH the brew "cask" (which installs a
.app in the Application directory) seems to create something that Apple
likes, but that STILL may be told to have a pointer to the include
directory as it does to the data-directory.
This is obviously something that the brew folks should deal with, but the
notion of having a variable that tracks the include directory still has
merit. At least as an extra guideline to people like the brew maintainers.
All the best
Marco
On Sun, Dec 8, 2024 at 8:45 PM <help-gnu-emacs-request@gnu.org> wrote:
> Send help-gnu-emacs mailing list submissions to
> help-gnu-emacs@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> or, via email, send a message with subject or body 'help' to
> help-gnu-emacs-request@gnu.org
>
> You can reach the person managing the list at
> help-gnu-emacs-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of help-gnu-emacs digest..."
>
>
> Today's Topics:
>
> 1. Re: Retrieving the "include" directory for Emacs Modules
> (Eli Zaretskii)
> 2. Re: Unicode and text editors (Heime)
> 3. Re: Unicode and text editors (Eli Zaretskii)
> 4. Re: Unicode and text editors (Heime)
> 5. Re: Unicode and text editors (Eli Zaretskii)
> 6. Re: Checking conditions unrelated to expression
> (Michael Heerdegen)
> 7. Re: Unicode and text editors (Heime)
> 8. Re: Transforming paths in compilation output (containerized
> builds) (Björn Bidar)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 08 Dec 2024 19:46:11 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Retrieving the "include" directory for Emacs Modules
> Message-ID: <865xnuf4po.fsf@gnu.org>
>
> > Date: Sun, 08 Dec 2024 11:48:24 -0500
> > From: Stefan Monnier via Users list for the GNU Emacs text editor <
> help-gnu-emacs@gnu.org>
> >
> > >> > #include <emacs-module.h>
> > >> >
> > >> > and that's it. Or what am I missing?
> > >>
> > >> That presumes that Emacs is installed system-wide (and "properly").
> > >
> > > What other way is there to install Emacs?
> >
> > Compile manually and run from the build tree?
>
> That's called "run uninstalled". And in that case, the user who does
> that knows very well where the header lives: in the same directory
> from which he/she runs Emacs.
>
> > Uncompress a downloaded pre-compiled archive into a directory and just
> > use it from there (AFAIK, very common under macOS and Windows)?
>
> If that doesn't place emacs-module.h in the system-wide include
> directory, it is a broken installation.
>
> > With luck on some systems the C (or other) compiler is installed in
> > a similar way (i.e. in its own subdirectory, siloed from Emacs).
>
> That's not how multi-package installation should be organized if the
> user wants the packages to cooperate.
>
> > >> When the compilation of the module is initiated from within Emacs, it
> > >> would make a lot of sense for this "ambient" Emacs to be able to tell
> > >> `make/gcc/younameit` explicitly and reliably where its own
> > >> `emacs-module.h` can be found.
> > > But if Emacs is "not installed properly", we don't know that.
> >
> > Emacs *should* know that, just like it knows where is its
> > `lisp-directory`.
>
> That's impractical expectation. Recall how hard we worked to find the
> pdumper file and the preloaded *.eln files, what with all the tricks
> people use when installing Emacs. I'm not interested in adding
> another burden to our maintenance so that Emacs will paper over broken
> installations. Sorry.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 08 Dec 2024 17:54:43 +0000
> From: Heime <heimeborgia@protonmail.com>
> To: Eli Zaretskii <eliz@gnu.org>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Unicode and text editors
> Message-ID:
>
> <VpTsRgeCxJL-JNeghs40Qt5cLBHbFykIIGYBA6zMT8AkgKUGc_RobIkWbXrtJnf4MVOF_oHrD4iCYJk1jS92lbFA2SjCpB_1htjcPAV0gv0=@
> protonmail.com>
>
> Content-Type: text/plain; charset=utf-8
>
>
> On Monday, December 9th, 2024 at 4:32 AM, Eli Zaretskii <eliz@gnu.org>
> wrote:
>
> > > Date: Sun, 08 Dec 2024 15:15:31 +0000
> > > From: "W. Greenhouse" via Users list for the GNU Emacs text editor
> help-gnu-emacs@gnu.org
> > >
> > > Heime via Users list for the GNU Emacs text editor
> > > help-gnu-emacs@gnu.org writes:
> > >
> > > > Is this becoming the norm? What about emacs?
> > > >
> > > > Does emacs encourage use of unicode characters (UTF-8) in code
> comments
> > > > and documentation?
> > >
> > > UTF-8 represents Emacs' internal text encoding
> >
> >
> > No, the internal encoding is different (it's a superset of UTF-8).
> >
> > > and also its default preference for new files.
> >
> >
> > That is only true if the user's locale has UTF-8 as its codeset.
> >
> > > When visiting existing files it attempts to
> > > detect the encoding, and maintain it while editing.
> >
> > That is correct.
>
> Does this mean that we should not worry when we use UTF-8? Would
> UTF-* be supported, and detected. With the appropriate symbols showing
> as they should.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sun, 08 Dec 2024 20:44:42 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Unicode and text editors
> Message-ID: <861pyif205.fsf@gnu.org>
>
> > Date: Sun, 08 Dec 2024 17:54:43 +0000
> > From: Heime <heimeborgia@protonmail.com>
> > Cc: help-gnu-emacs@gnu.org
> >
> > > > When visiting existing files it attempts to
> > > > detect the encoding, and maintain it while editing.
> > >
> > > That is correct.
> >
> > Does this mean that we should not worry when we use UTF-8? Would
> > UTF-* be supported, and detected. With the appropriate symbols showing
> > as they should.
>
> I was talking about Emacs. Your original question was about other
> editors. I'm not familiar with other modern editors enough to tell
> whether you should or should not worry. In particular, I don't know
> how they recognize UTF-8, and am not sure that Emacs coding cookies
> are supported by them.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sun, 08 Dec 2024 18:55:52 +0000
> From: Heime <heimeborgia@protonmail.com>
> To: Eli Zaretskii <eliz@gnu.org>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Unicode and text editors
> Message-ID:
>
> <p6vv68VE9KE4Y8ML-nAfy75EPmsnsFPaRGtZglz_qmAeKRH62jOOy9XqbeinPnf0-5GkV3BhYTB2gR6QAV_YA85x5teM-wfdi5SXLgsW4W4=@
> protonmail.com>
>
> Content-Type: text/plain; charset=utf-8
>
>
>
>
>
>
> Sent with Proton Mail secure email.
>
> On Monday, December 9th, 2024 at 6:44 AM, Eli Zaretskii <eliz@gnu.org>
> wrote:
>
> > > Date: Sun, 08 Dec 2024 17:54:43 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: help-gnu-emacs@gnu.org
> > >
> > > > > When visiting existing files it attempts to
> > > > > detect the encoding, and maintain it while editing.
> > > >
> > > > That is correct.
> > >
> > > Does this mean that we should not worry when we use UTF-8? Would
> > > UTF-* be supported, and detected. With the appropriate symbols showing
> > > as they should.
> >
> >
> > I was talking about Emacs. Your original question was about other
> > editors. I'm not familiar with other modern editors enough to tell
> > whether you should or should not worry. In particular, I don't know
> > how they recognize UTF-8, and am not sure that Emacs coding cookies
> > are supported by them.
>
> Is it reasonable to expect that UTF-* characters are recognised and
> supported?
> What is your school of thought regarding emacs?
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Sun, 08 Dec 2024 21:07:47 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Unicode and text editors
> Message-ID: <86wmgadmd8.fsf@gnu.org>
>
> > Date: Sun, 08 Dec 2024 18:55:52 +0000
> > From: Heime <heimeborgia@protonmail.com>
> > Cc: help-gnu-emacs@gnu.org
> >
> > > I was talking about Emacs. Your original question was about other
> > > editors. I'm not familiar with other modern editors enough to tell
> > > whether you should or should not worry. In particular, I don't know
> > > how they recognize UTF-8, and am not sure that Emacs coding cookies
> > > are supported by them.
> >
> > Is it reasonable to expect that UTF-* characters are recognised and
> supported?
>
> Reasonable? yes. But the problem is not trivial: Emacs itself not
> always recognizes UTF-8 reliably. So there could be problems.
>
> > What is your school of thought regarding emacs?
>
> I don't understand the question, sorry.
>
>
>
> ------------------------------
>
> Message: 6
> Date: Sun, 08 Dec 2024 20:19:57 +0100
> From: Michael Heerdegen <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Checking conditions unrelated to expression
> Message-ID: <87ikruouci.fsf@web.de>
> Content-Type: text/plain
>
> Hello,
>
> the only thing I want to add to Stefan's answer: the 'let' pattern can
> be (despite the name) used as a full-featured "sub-pcase". But also see
> 'app' etc. - just see the pattern descriptions in the fine docs.
>
> Michael.
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Sun, 08 Dec 2024 19:39:55 +0000
> From: Heime <heimeborgia@protonmail.com>
> To: Eli Zaretskii <eliz@gnu.org>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: Unicode and text editors
> Message-ID:
>
> <Be0XIegjOn-QFIHzjODCIV_jnl-68E45AFCdDLeqeQ6cYw8sH6hMgQudQVXE_Jx4REYEV96IgFMaEtOaIlDTWDY7QbsIDrY61z-feuEjIpM=@
> protonmail.com>
>
> Content-Type: text/plain; charset=utf-8
>
>
> On Monday, December 9th, 2024 at 7:07 AM, Eli Zaretskii <eliz@gnu.org>
> wrote:
>
> > > Date: Sun, 08 Dec 2024 18:55:52 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > Cc: help-gnu-emacs@gnu.org
> > >
> > > > I was talking about Emacs. Your original question was about other
> > > > editors. I'm not familiar with other modern editors enough to tell
> > > > whether you should or should not worry. In particular, I don't know
> > > > how they recognize UTF-8, and am not sure that Emacs coding cookies
> > > > are supported by them.
> > >
> > > Is it reasonable to expect that UTF-* characters are recognised and
> supported?
> >
> >
> > Reasonable? yes. But the problem is not trivial: Emacs itself not
> > always recognizes UTF-8 reliably. So there could be problems.
> >
> > > What is your school of thought regarding emacs?
> >
> >
> > I don't understand the question, sorry.
>
> Should we comfortable use UTF Characters in source code when using Emacs?
> When there are problems, do they usually get looked into and fixed if
> possible?
>
>
>
>
> ------------------------------
>
> Message: 8
> Date: Sun, 08 Dec 2024 21:45:15 +0200
> From: Björn Bidar <bjorn.bidar@thaodan.de>
> To: Yuri Khan <yuri.v.khan@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> Subject: Re: Transforming paths in compilation output (containerized
> builds)
> Message-ID: <87frmy2c38.fsf@>
> Content-Type: text/plain
>
> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
> > On Sun, 8 Dec 2024 at 12:43, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> > > Is compilation-transform-file-match-alist what you are looking for?
> >> >
> >> > The variable talks only about errors. Does it apply to all messages
> not just
> >> > the errors?
> >>
> >> It is applied to all messages.
> >
> > In my experience, it is not applied to messages as such. It is
> > consulted when building text properties while fontifying the messages
> > so that the user can jump to error locations; but the actual visible
> > text in the buffer remains unmodified.
>
> That the actual text remains unmodified is good, it's actually better
> since it doesn't reveal any private information/makes the output depend on
> the
> users machine.
>
> As long as it applies to all messages it's good. Maybe the description
> or the name of the variable should be changed then.
>
> I looked at the integration for the other container engines for
> inspiration on how to solve this issue.
> None of them handle this issue or are affected.
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
>
> ------------------------------
>
> End of help-gnu-emacs Digest, Vol 265, Issue 40
> ***********************************************
>
--
Marco Antoniotti
Somewhere over the Rainbow
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-08 17:46 ` Eli Zaretskii
@ 2024-12-09 14:11 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-09 14:11 UTC (permalink / raw)
To: help-gnu-emacs
>> Compile manually and run from the build tree?
> That's called "run uninstalled". And in that case, the user who does
> that knows very well where the header lives: in the same directory
> from which he/she runs Emacs.
Why would they know that? I mean, of course, some will, but many people
compile their own Emacs just to live on the bleeding edge and may never
really look at the C code.
[ Personally, I knew that *an* `emacs-module.h` file lived in there, but
I wasn't 100% sure it's the right one to use (I expected there might
be another one in some other directory). ]
>> Uncompress a downloaded pre-compiled archive into a directory and just
>> use it from there (AFAIK, very common under macOS and Windows)?
> If that doesn't place emacs-module.h in the system-wide include
> directory, it is a broken installation.
If the user doesn't have administrator rights, then the installation
can't really be blamed for not adding itself to a system-wide
include directory.
>> Emacs *should* know that, just like it knows where is its
>> `lisp-directory`.
> That's impractical expectation.
We decide where the .h file is put, so it's really not.
> Recall how hard we worked to find the pdumper file and the preloaded
> *.eln files, what with all the tricks people use when
> installing Emacs.
Yup. And we don't need anything *more*. We just need to place the
include file at a place that's easy to find once we know the rest.
E.g. it could be `$(data-directory)/module-include`.
> I'm not interested in adding another burden to our maintenance so that
> Emacs will paper over broken installations.
The system-wide install may have an older version of Emacs than the one
from which we want to compile a module.
It's good that we expose `emacs-module.h` system-wide, but I think it's
even more important for Emacs to be able to compile its own modules
without having to rely on that.
Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-09 9:58 ` Retrieving the "include" directory for Emacs Modules Marco Antoniotti
@ 2024-12-09 14:56 ` Eli Zaretskii
2024-12-09 15:50 ` Rudolf Schlatte
2024-12-09 22:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 2 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-09 14:56 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Mon, 9 Dec 2024 10:58:57 +0100
>
> On my Mac, If I install emacs as a "formula" (i.e., not a s an app) things
> seem installed as they should be. OTOH the brew "cask" (which installs a
> .app in the Application directory) seems to create something that Apple
> likes, but that STILL may be told to have a pointer to the include
> directory as it does to the data-directory.
>
> This is obviously something that the brew folks should deal with, but the
> notion of having a variable that tracks the include directory still has
> merit. At least as an extra guideline to people like the brew maintainers.
As I tried to explain, if emacs-module.h is not installed in its
intended place, we cannot know where it is installed. We only know
that from the default installation locations we have in our Makefiles,
but if some distros modify that, we cannot know.
And I still contend that the correct installation should put this file
where all the other header files are, and then the compiler will
always find it. Users who don't want to fight the uphill battle
against brew could simply copy the file to the compiler's include
directory, and be done.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-09 14:56 ` Eli Zaretskii
@ 2024-12-09 15:50 ` Rudolf Schlatte
2024-12-09 22:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 21+ messages in thread
From: Rudolf Schlatte @ 2024-12-09 15:50 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Marco Antoniotti <marcoxa@gmail.com>
>> Date: Mon, 9 Dec 2024 10:58:57 +0100
>>
>> On my Mac, If I install emacs as a "formula" (i.e., not a s an app) things
>> seem installed as they should be. OTOH the brew "cask" (which installs a
>> .app in the Application directory) seems to create something that Apple
>> likes, but that STILL may be told to have a pointer to the include
>> directory as it does to the data-directory.
>>
>> This is obviously something that the brew folks should deal with, but the
>> notion of having a variable that tracks the include directory still has
>> merit. At least as an extra guideline to people like the brew maintainers.
>
> As I tried to explain, if emacs-module.h is not installed in its
> intended place, we cannot know where it is installed. We only know
> that from the default installation locations we have in our Makefiles,
> but if some distros modify that, we cannot know.
>
> And I still contend that the correct installation should put this file
> where all the other header files are, and then the compiler will
> always find it. Users who don't want to fight the uphill battle
> against brew could simply copy the file to the compiler's include
> directory, and be done.
`make install' for the nextstep backend produces Emacs.app, a
self-contained bundle that can be double-clicked to start Emacs but is
also a directory that contains the standard Emacs files inside, as
Emacs.app/Contents/Resources/{etc,include,info,lisp,man,site-lisp,...}.
I guess this is the case that Marco encounters: C-h N opens
<wherever>/Emacs.app/Contents/Resources/etc/NEWS, so the running Emacs
must have some knowledge about where it is installed.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-09 14:56 ` Eli Zaretskii
2024-12-09 15:50 ` Rudolf Schlatte
@ 2024-12-09 22:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-10 3:29 ` Eli Zaretskii
1 sibling, 1 reply; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-09 22:10 UTC (permalink / raw)
To: help-gnu-emacs
> As I tried to explain, if emacs-module.h is not installed in its
> intended place, we cannot know where it is installed.
The patch below would make sure that `emacs-module.h` is always
available at `$(data-directory)/include/emacs-module.h`.
Stefan
diff --git a/src/Makefile.in b/src/Makefile.in
index c278924ef94..c1385dd7188 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -731,12 +731,19 @@ MAKE_PDUMPER_FINGERPRINT =
MAKE_PDUMPER_FINGERPRINT =
endif
+modules_header = $(top_srcdir)/etc/include/emacs-module.h
+
+$(modules_header): $(srcdir)/emacs-module.h
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_at)cp $< $@
+
## We have to create $(etc) here because init_cmdargs tests its
## existence when setting Vinstallation_directory (FIXME?).
## This goes on to affect various things, and the emacs binary fails
## to start if Vinstallation_directory has the wrong value.
temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
- $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT)
+ $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT) \
+ $(modules_header)
ifeq ($(HAVE_BE_APP),yes)
$(AM_V_CXXLD)$(CXX) -o $@.tmp \
$(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-09 22:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-12-10 3:29 ` Eli Zaretskii
2024-12-11 3:23 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-10 3:29 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Mon, 09 Dec 2024 17:10:50 -0500
> From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> > As I tried to explain, if emacs-module.h is not installed in its
> > intended place, we cannot know where it is installed.
>
> The patch below would make sure that `emacs-module.h` is always
> available at `$(data-directory)/include/emacs-module.h`.
Sorry, this is wrong. No compiler will look in that directory without
a suitable -I option, so this is a change that will break previous
(and correct) behavior.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-10 3:29 ` Eli Zaretskii
@ 2024-12-11 3:23 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-11 13:01 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-12-11 3:23 UTC (permalink / raw)
To: help-gnu-emacs
>> > As I tried to explain, if emacs-module.h is not installed in its
>> > intended place, we cannot know where it is installed.
>> The patch below would make sure that `emacs-module.h` is always
>> available at `$(data-directory)/include/emacs-module.h`.
> Sorry, this is wrong. [...] this is a change that will break previous
> (and correct) behavior.
I don't see how it would break anything: the .h file is still *also*
copied to the $(includedir) for those people who want to compile their
module outside of Emacs.
> No compiler will look in that directory without a suitable -I option,
That's OK: the sole purpose of the change is to let ELPA packages call
`gcc` with such a `-I`!
Stefan
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-11 3:23 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-12-11 13:01 ` Eli Zaretskii
0 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-11 13:01 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Tue, 10 Dec 2024 22:23:05 -0500
> From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> >> > As I tried to explain, if emacs-module.h is not installed in its
> >> > intended place, we cannot know where it is installed.
> >> The patch below would make sure that `emacs-module.h` is always
> >> available at `$(data-directory)/include/emacs-module.h`.
> > Sorry, this is wrong. [...] this is a change that will break previous
> > (and correct) behavior.
>
> I don't see how it would break anything: the .h file is still *also*
> copied to the $(includedir) for those people who want to compile their
> module outside of Emacs.
That makes this easier to accept, but there are still issues.
> > No compiler will look in that directory without a suitable -I option,
>
> That's OK: the sole purpose of the change is to let ELPA packages call
> `gcc` with such a `-I`!
Let's discuss this in a proper place, not here, okay? In particular,
I'd like to hear more opinions and data points, from people who don't
necessarily read this forum.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
[not found] <mailman.87.1733936470.18564.help-gnu-emacs@gnu.org>
@ 2024-12-13 11:43 ` Marco Antoniotti
2024-12-13 12:23 ` Eli Zaretskii
0 siblings, 1 reply; 21+ messages in thread
From: Marco Antoniotti @ 2024-12-13 11:43 UTC (permalink / raw)
To: help-gnu-emacs
Hi Eli
What would be a proper place?
Marco
On Wed, Dec 11, 2024 at 6:03 PM <help-gnu-emacs-request@gnu.org> wrote:
> Send help-gnu-emacs mailing list submissions to
> help-gnu-emacs@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> or, via email, send a message with subject or body 'help' to
> help-gnu-emacs-request@gnu.org
>
> You can reach the person managing the list at
> help-gnu-emacs-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of help-gnu-emacs digest..."
>
>
> Today's Topics:
>
> 1. Re: Retrieving the "include" directory for Emacs Modules
> (Eli Zaretskii)
> 2. Why does saving a buffer to a new file clear local variables?
> (Patrick Nicodemus)
> 3. Gnus: Permanently killing a thread? (Christopher Howard)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 11 Dec 2024 15:01:44 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Retrieving the "include" directory for Emacs Modules
> Message-ID: <86bjxi4blz.fsf@gnu.org>
>
> > Date: Tue, 10 Dec 2024 22:23:05 -0500
> > From: Stefan Monnier via Users list for the GNU Emacs text editor <
> help-gnu-emacs@gnu.org>
> >
> > >> > As I tried to explain, if emacs-module.h is not installed in its
> > >> > intended place, we cannot know where it is installed.
> > >> The patch below would make sure that `emacs-module.h` is always
> > >> available at `$(data-directory)/include/emacs-module.h`.
> > > Sorry, this is wrong. [...] this is a change that will break previous
> > > (and correct) behavior.
> >
> > I don't see how it would break anything: the .h file is still *also*
> > copied to the $(includedir) for those people who want to compile their
> > module outside of Emacs.
>
> That makes this easier to accept, but there are still issues.
>
> > > No compiler will look in that directory without a suitable -I option,
> >
> > That's OK: the sole purpose of the change is to let ELPA packages call
> > `gcc` with such a `-I`!
>
> Let's discuss this in a proper place, not here, okay? In particular,
> I'd like to hear more opinions and data points, from people who don't
> necessarily read this forum.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 10 Dec 2024 23:05:00 -0500
> From: Patrick Nicodemus <gadget142@gmail.com>
> To: help-gnu-emacs@gnu.org
> Subject: Why does saving a buffer to a new file clear local variables?
> Message-ID:
> <CADZEZBZbKRo7uHpqjOBTADhQcUG5U=
> H+RuZOOwd7DRdtLE_s5A@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> If I create a new buffer like (get-buffer-create "tmpbuf"),
> switch to the buffer, and execute the commands
> (make-variable-buffer-local "abc")
> (setq abc 3)
> and then save the buffer to, say, "tmpbuf", then abc becomes nil.
> Why is this the case?
> Is this behavior documented anywhere?
> I checked that it doesn't change the major mode. It is "Fundamental" before
> and after saving.
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 11 Dec 2024 07:52:38 -0900
> From: Christopher Howard <christopher@librehacker.com>
> To: Help Gnu Emacs Mailing List <help-gnu-emacs@gnu.org>
> Subject: Gnus: Permanently killing a thread?
> Message-ID: <87ldwmgo15.fsf@librehacker.com>
> Content-Type: text/plain; charset=utf-8
>
> Hi, in Gnus I frequently use gnus-summary-kill-same-subject (C-k) to kill
> threads that are of no interest to me. However, when I am reading news the
> next day, I have to deal again with new messages from that thread. I'm
> wondering if I have a mechanism in Gnus to permanently hide a thread.
>
> In the manual, am seeing a lot of information about thread scoring, but
> I'm not sure if/how that is something I can leverage toward this end.
>
> --
> 📛 Christopher Howard
> 🚀 gemini://gem.librehacker.com
> 🌐 http://gem.librehacker.com
>
> בראשית ברא אלהים את השמים ואת הארץ
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
>
> ------------------------------
>
> End of help-gnu-emacs Digest, Vol 265, Issue 49
> ***********************************************
>
--
Marco Antoniotti
Somewhere over the Rainbow
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: Retrieving the "include" directory for Emacs Modules
2024-12-13 11:43 ` Marco Antoniotti
@ 2024-12-13 12:23 ` Eli Zaretskii
0 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-12-13 12:23 UTC (permalink / raw)
To: help-gnu-emacs
> From: Marco Antoniotti <marcoxa@gmail.com>
> Date: Fri, 13 Dec 2024 12:43:03 +0100
>
> Hi Eli
>
> What would be a proper place?
emacs-devel@gnu.org
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2024-12-13 12:23 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.624.1733687129.13738.help-gnu-emacs@gnu.org>
2024-12-09 9:58 ` Retrieving the "include" directory for Emacs Modules Marco Antoniotti
2024-12-09 14:56 ` Eli Zaretskii
2024-12-09 15:50 ` Rudolf Schlatte
2024-12-09 22:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-10 3:29 ` Eli Zaretskii
2024-12-11 3:23 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-11 13:01 ` Eli Zaretskii
[not found] <mailman.87.1733936470.18564.help-gnu-emacs@gnu.org>
2024-12-13 11:43 ` Marco Antoniotti
2024-12-13 12:23 ` Eli Zaretskii
[not found] <mailman.606.1733669386.12711.help-gnu-emacs@gnu.org>
2024-12-08 15:18 ` Marco Antoniotti
2024-12-08 15:29 ` Jean Louis
2024-12-08 15:36 ` Marco Antoniotti
2024-12-08 15:50 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 16:36 ` Eli Zaretskii
2024-12-08 16:30 ` Eli Zaretskii
[not found] <mailman.77.1733590872.28947.help-gnu-emacs@gnu.org>
2024-12-08 9:59 ` Marco Antoniotti
2024-12-08 11:40 ` Eli Zaretskii
2024-12-08 15:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 16:39 ` Eli Zaretskii
2024-12-08 16:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-08 17:46 ` Eli Zaretskii
2024-12-09 14:11 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-07 16:27 Marco Antoniotti
2024-12-07 16:43 ` Eli Zaretskii
2024-12-07 19:09 ` Björn Bidar
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).