From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marco Antoniotti Newsgroups: gmane.emacs.help Subject: Re: Re: Retrieving the "include" directory for Emacs Modules Date: Sun, 8 Dec 2024 16:18:15 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38078"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 08 16:19:08 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 1tKJ3r-0009ib-MF for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Dec 2024 16:19:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKJ3L-0008Nx-Ia; Sun, 08 Dec 2024 10:18:35 -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 1tKJ3K-0008NV-2M for help-gnu-emacs@gnu.org; Sun, 08 Dec 2024 10:18:34 -0500 Original-Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKJ3G-0001Hk-D7 for help-gnu-emacs@gnu.org; Sun, 08 Dec 2024 10:18:33 -0500 Original-Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-e39a1af8379so393301276.0 for ; Sun, 08 Dec 2024 07:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733671107; x=1734275907; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=hFisrOHbAQGX80QQ6YCYQsLSqJxUCdRZTzqA0CSbQsM=; b=RNDAFhuf/fDjQKbWcYMGVPevenrALHBaZrU6PG2mXBHXmmPX3+iqBYq8Kaso17zKQB oOhQcy9jHIpDmPgGAxe/Z0MTQzCBL1DWlQcceLnOU3QomKZ4ORWcKibZwH1Et5zVMr3/ IDX6BhpQTGDkaNFwzHcQyJVoJuAw3KiXISNuJN5F3MkQRYW7lz2D2+uAQXKZJXuQpPCE KJp+M/fj9G9sCM4WgOJeiBbUEPPwdblsKTWHx0lF+Qv6yoh0GbA/5mHYTtGoAuKbYzp1 FN6hRs/t2Ka4QmOVpszC4CwY+bJR9S+daUdVo4aNKjNtlAs2p7UfEbIHnaW1kyOF5r9b 4t9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733671107; x=1734275907; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hFisrOHbAQGX80QQ6YCYQsLSqJxUCdRZTzqA0CSbQsM=; b=LrvXYPQ4jJ7zlM8L7G55zJXKu8sK2TK1KZoRYa1M940sg+ceIrclhtGqgGica7nS8W EYdHvpYAhD5gna5/6JgwtOZ3ew0T1lkDXFMSyOo6tQaTP8mXzl8Xo7f8RyiTouwsg2n2 Dwhz++AGDQNjjqqqeoWnzp7t9UeCKS4PBVs9e9WlrrxbYZoi/juI4WdDYSuuPOOXE5Do XmDeAGpA+iJXokElCB1jjObSrrBK7YPCDcMoj0ZvTZzHvE8zX85RsVHgXT8d6M4bpJ5x kfZnLd6rm3YkcFVDplZDuNo8ZzKqMIefoYpgQYzdbrkib2HbZJnDYgs0Ap9ynAA9/jUT trhw== X-Gm-Message-State: AOJu0Yww0YrT7YzcqHxBi8/FMRUSNfch7y3NwdWGOVZW/d3OG8WpKSN0 8tT+vCJDO3J9oLYZMOb6nqOpjCk9hYHDcLivWfzL4EQpBV1eKYF0hIpkFL+rAHx6/5eSex+ws+o qcrkDcUgJ8ZwUr4rKqUHNmATHr1lP6n6d X-Gm-Gg: ASbGncvFFjYTZpT70sYgChr1ZkTD4kfjaD+1EKHhxmHNxJuf9XTC29Lekfm4wRH87PS JSPLj3G6zHHGw/jeh4gJ5YGqhBypzag8= X-Google-Smtp-Source: AGHT+IHtyq76pvPWEEX1NsVbfwlAFKmLgh07AKkz6DLzCJjLZj1X+w8SuEEKBgvg2paAvAkvQuN4G/tr0j6x8utGubE= X-Received: by 2002:a05:6902:1b87:b0:e39:8a00:d443 with SMTP id 3f1490d57ef6-e3a0b6e4764mr3373822276.9.1733671107389; Sun, 08 Dec 2024 07:18:27 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2e; envelope-from=marcoxa@gmail.com; helo=mail-yb1-xb2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_MIME_MALF=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:148682 Archived-At: Hi Eli 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=3Dgnu99 -ggdb3 -Wall -fPIC -c pq-core.c pq-core.c:19:10: fatal error: 'emacs-module.h' file not found 19 | #include | ^~~~~~~~~~~~~~~~ 1 error generated. make: *** [pq-core.o] Error 1 which is not surprising as the include directory is not listed in the -I options. 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. 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. All the best Marco On Sun, Dec 8, 2024 at 3:50=E2=80=AFPM wro= te: > 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. Checking conditions unrelated to expression (Heime) > 3. Re: Checking conditions unrelated to expression (Thibaut Verron) > 4. Unicode and text editors (Heime) > 5. Re: Unicode and text editors (Jean Louis) > 6. Re: Unicode and text editors (Basile Starynkevitch) > 7. Re: Unicode and text editors (Heime) > 8. Re: Checking conditions unrelated to expression (Heime) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 08 Dec 2024 13:40:00 +0200 > From: Eli Zaretskii > To: help-gnu-emacs@gnu.org > Subject: Re: Retrieving the "include" directory for Emacs Modules > Message-ID: <86seqyflnz.fsf@gnu.org> > > > From: Marco Antoniotti > > 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 > > and that's it. Or what am I missing? > > > > ------------------------------ > > Message: 2 > Date: Sun, 08 Dec 2024 12:05:35 +0000 > From: Heime > To: Heime via Users list for the GNU Emacs text editor > > Subject: Checking conditions unrelated to expression > Message-ID: > > protonmail.com> > > Content-Type: text/plain; charset=3Dutf-8 > > It looks like pcase can only be used with some variable condition > > This will check condition of featr > > (pcase featr > ('this (do-this)) > ('that (do-that)) > (_ (message "some message")) > > What if I want to check a number of conditions, not all dependent upon > featr, what should one do? > > Suppose I want to test (eq duck 'quack), cannot use a pcase because tests > are dependent upon featr. > > (pcase featr > ('this (do-this)) > ('that (do-that)) > (_ (message "some message")) > > > > > > > ------------------------------ > > Message: 3 > Date: Sun, 8 Dec 2024 13:31:01 +0100 > From: Thibaut Verron > To: Heime > Cc: Heime via Users list for the GNU Emacs text editor > > Subject: Re: Checking conditions unrelated to expression > Message-ID: > RNQ46V8VQJr7uJf3xdA@mail.gmail.com> > Content-Type: text/plain; charset=3D"UTF-8" > > Le dim. 8 d=C3=A9c. 2024 =C3=A0 13:06, Heime via Users list for the GNU E= macs text > editor a =C3=A9crit : > > > It looks like pcase can only be used with some variable condition > > > > This will check condition of featr > > > > (pcase featr > > ('this (do-this)) > > ('that (do-that)) > > (_ (message "some message")) > > > > What if I want to check a number of conditions, not all dependent upon > > featr, what should one do? > > > > Suppose I want to test (eq duck 'quack), cannot use a pcase because tes= ts > > are dependent upon featr. > > > > (pcase featr > > ('this (do-this)) > > ('that (do-that)) > > (_ (message "some message")) > > > > You can use a plain case-switch, rather than a pattern-matching one: > > (cond > ((eq featr 'this) (do-this)) > ((eq featr 'that) (do-that)) > ((eq duck 'quack) (do-duck)) > (t (message "blabla"))) > > https://www.gnu.org/s/emacs/manual/html_node/elisp/Conditionals.html > > You can also replace the first two cases by a pattern-matching case, if > you'd like: > > (cond > (pcase featr > ('this (do-this) t) ;; important to return non-nil in each branch > ('that (do-that) t) > (_ nil)) > ((eq duck 'quack) (do-duck)) > (t (message "blabla"))) > > > ------------------------------ > > Message: 4 > Date: Sun, 08 Dec 2024 13:16:40 +0000 > From: Heime > To: Heime via Users list for the GNU Emacs text editor > > Subject: Unicode and text editors > Message-ID: > > protonmail.com> > > Content-Type: text/plain; charset=3Dutf-8 > > > > I am using unicode characters in emacs. What happens when people load th= e > file in a different text editor? Will the characters be illegible? > > > > ------------------------------ > > Message: 5 > Date: Sun, 8 Dec 2024 16:29:41 +0300 > From: Jean Louis > To: Heime > Cc: Heime via Users list for the GNU Emacs text editor > > Subject: Re: Unicode and text editors > Message-ID: > Content-Type: text/plain; charset=3Dutf-8 > > * Heime via Users list for the GNU Emacs text editor < > help-gnu-emacs@gnu.org> [2024-12-08 16:18]: > > > > > > I am using unicode characters in emacs. What happens when people load > the > > file in a different text editor? Will the characters be illegible? > > So far those editors I have inspected they accepted Unicode. > > Some editors in terminal, like Zile, Emacs clone, did not accept, I just > wish it could. > > All graphical editors I know so far accept Unicode. Some not, but are > older already, rarely used. > > -- > Jean Louis > > > > ------------------------------ > > Message: 6 > Date: Sun, 08 Dec 2024 14:31:52 +0100 > From: Basile Starynkevitch > To: Heime , Heime via Users list for the > GNU Emacs text editor > Subject: Re: Unicode and text editors > Message-ID: > <2427ab10a48abba2c811bcb01f4e74ce3832794f.camel@starynkevitch.net= > > Content-Type: text/plain; charset=3D"UTF-8" > > On Sun, 2024-12-08 at 13:16 +0000, Heime via Users list for the GNU > Emacs text editor wrote: > > > > > > I am using unicode characters in emacs. What happens when people > > load the > > file in a different text editor? Will the characters be illegible? > > > > > I guess you mean Unicode characters with UTF-8 encoding. I will refer > to the people mentioned in your question as colleagues (but they could > be friends or customers or students or authorities or managers). Your > computer means the computer you are using (probably under Linux) for > GNU emacs. Their computer or the other computer is the one used by the > collague. > > I see several possible issues. > > The other computer don't have the required font to display some > character (like a cyrillic letter, or =C2=A7 ....) > > The other computer (or your colleague) don't know that the file is UTF- > 8 encoded. > > The other computer don't have any editor. > > the other computer has an editor which does not understand UTF-8 > encoding. > > The other computer has an editor requiring UTF-16 encoding. > > The file has been corrupted during transmission. > > Regards > > NB my open source project is > https://github.com/RefPerSys/RefPerSys (GPLv3+ inference engine) > > -- > Basile STARYNKEVITCH > 8 rue de la Fa=C3=AFencerie > 92340 Bourg-la-Reine, France > http://starynkevitch.net/Basile & https://github.com/bstarynk > > > > ------------------------------ > > Message: 7 > Date: Sun, 08 Dec 2024 14:02:17 +0000 > From: Heime > To: Basile Starynkevitch > Cc: Heime via Users list for the GNU Emacs text editor > > Subject: Re: Unicode and text editors > Message-ID: > > protonmail.com> > > Content-Type: text/plain; charset=3Dutf-8 > > > > > > > Sent with Proton Mail secure email. > > On Monday, December 9th, 2024 at 1:31 AM, Basile Starynkevitch < > basile@starynkevitch.net> wrote: > > > On Sun, 2024-12-08 at 13:16 +0000, Heime via Users list for the GNU > > Emacs text editor wrote: > > > > > I am using unicode characters in emacs. What happens when people > > > load the > > > file in a different text editor? Will the characters be illegible? > > > > > > > > I guess you mean Unicode characters with UTF-8 encoding. > > Correct > > > I will refer > > to the people mentioned in your question as colleagues (but they could > > be friends or customers or students or authorities or managers). Your > > computer means the computer you are using (probably under Linux) for > > GNU emacs. Their computer or the other computer is the one used by the > > collague. > > > > I see several possible issues. > > > > The other computer don't have the required font to display some > > character (like a cyrillic letter, or =C2=A7 ....) > > > > The other computer (or your colleague) don't know that the file is UTF- > > 8 encoded. > > > > The other computer don't have any editor. > > > > the other computer has an editor which does not understand UTF-8 > > encoding. > > > > The other computer has an editor requiring UTF-16 encoding. > > Is this becoming the norm? What about emacs? > > Does emacs encourage use of unicode characters (UTF-8) in code comments > and documentation? > > > The file has been corrupted during transmission. > > > > Regards > > > > NB my open source project is > > https://github.com/RefPerSys/RefPerSys (GPLv3+ inference engine) > > > > -- > > Basile STARYNKEVITCH basile@starynkevitch.net > > > > 8 rue de la Fa=C3=AFencerie > > 92340 Bourg-la-Reine, France > > http://starynkevitch.net/Basile & https://github.com/bstarynk > > > > ------------------------------ > > Message: 8 > Date: Sun, 08 Dec 2024 14:49:34 +0000 > From: Heime > To: thibaut.verron@gmail.com > Cc: Heime via Users list for the GNU Emacs text editor > > Subject: Re: Checking conditions unrelated to expression > Message-ID: > > protonmail.com> > > Content-Type: text/plain; charset=3Dutf-8 > > > > > > > Sent with Proton Mail secure email. > > On Monday, December 9th, 2024 at 12:31 AM, Thibaut Verron < > thibaut.verron@gmail.com> wrote: > > > Le dim. 8 d=C3=A9c. 2024 =C3=A0 13:06, Heime via Users list for the GNU= Emacs text > > editor help-gnu-emacs@gnu.org a =C3=A9crit : > > > > > It looks like pcase can only be used with some variable condition > > > > > > This will check condition of featr > > > > > > (pcase featr > > > ('this (do-this)) > > > ('that (do-that)) > > > (_ (message "some message")) > > > > > > What if I want to check a number of conditions, not all dependent upo= n > > > featr, what should one do? > > > > > > Suppose I want to test (eq duck 'quack), cannot use a pcase because > tests > > > are dependent upon featr. > > > > > > (pcase featr > > > ('this (do-this)) > > > ('that (do-that)) > > > (_ (message "some message")) > > > > > > You can use a plain case-switch, rather than a pattern-matching one: > > > > (cond > > ((eq featr 'this) (do-this)) > > ((eq featr 'that) (do-that)) > > ((eq duck 'quack) (do-duck)) > > (t (message "blabla"))) > > > > https://www.gnu.org/s/emacs/manual/html_node/elisp/Conditionals.html > > > > You can also replace the first two cases by a pattern-matching case, if > > you'd like: > > > > (cond > > (pcase featr > > ('this (do-this) t) ;; important to return non-nil in each branch > > ('that (do-that) t) > > (_ nil)) > > ((eq duck 'quack) (do-duck)) > > (t (message "blabla"))) > > > But I cannot do the other way round, right? Cannot have a pcase using > featr > as EXP, but checking something else. > > > > > > > ------------------------------ > > 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 36 > *********************************************** > --=20 Marco Antoniotti Somewhere over the Rainbow