From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Retrieving the "include" directory for Emacs Modules Date: Mon, 09 Dec 2024 09:11:37 -0500 Message-ID: References: <86seqyflnz.fsf@gnu.org> <86bjxmf7tg.fsf@gnu.org> <865xnuf4po.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19366"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:7IIB5kt0P/hUMvXEfxz2cHMcGq0= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 09 15:12:26 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tKeUr-0004v6-RO for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Dec 2024 15:12:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKeUJ-000795-OG; Mon, 09 Dec 2024 09:11:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKeUH-00077Z-Ix for help-gnu-emacs@gnu.org; Mon, 09 Dec 2024 09:11:49 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKeUF-0004CQ-BO for help-gnu-emacs@gnu.org; Mon, 09 Dec 2024 09:11:49 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1tKeUD-0004Fg-DG for help-gnu-emacs@gnu.org; Mon, 09 Dec 2024 15:11:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148716 Archived-At: >> 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