🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gmane.emacs.devel
10 messages
10 total messages Started by Eli Zaretskii Thu, 24 Aug 2023 10:30
Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307121
Author: Eli Zaretskii
Date: Thu, 24 Aug 2023 10:30
7 lines
310 bytes
>     * src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
>     defvar.  Define to `librcs2log.so' under Android, `rcs2log'

Why do we need this variable defined and initialized in C?  Can't we
do that in Lisp instead?  Since vc-rcs.el needs it, can't the variable
be defined there, for example?

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307123
Author: Eli Zaretskii
Date: Thu, 24 Aug 2023 11:53
29 lines
1163 bytes
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 24 Aug 2023 16:42:44 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >>     * src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
> >>     defvar.  Define to `librcs2log.so' under Android, `rcs2log'
> >
> > Why do we need this variable defined and initialized in C?  Can't we
> > do that in Lisp instead?  Since vc-rcs.el needs it, can't the variable
> > be defined there, for example?
>
> We do this for consistency with the other -program-name variables for
> programs within exec-directory.

Those other variables should be moved out of there as well, IMO.  They
are recent additions, AFAIU as part of the Android merge.  I see no
reason to have them defined in C, as they are not invoked from any C
code, are they?

> Moreover, Lisp other than vc-rcs.el may want to use rcs2log: it
> helps to have its name defined in a central location, instead of
> forcing everyone to either require vc or duplicate the definition
> within syms_of_callproc.

OK, then let's have them in simple.el or in files.el.  Or any other
preloaded Lisp, if those two don't sound appropriate.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307130
Author: Andreas Schwab
Date: Thu, 24 Aug 2023 12:51
15 lines
571 bytes
On Aug 24 2023, Eli Zaretskii wrote:

> And if that's not good enough, I think we should have a Lisp variable
> or function to do this job, because these issues will keep popping up,
> and doing all of that in C, just because we don't have the information
> in Lisp, is not a good idea.  We do stuff like that in other cases,
> cf.  noninteractive, window-system, daemonp, etc.

Or add a feature for it.

--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307127
Author: Eli Zaretskii
Date: Thu, 24 Aug 2023 13:01
16 lines
533 bytes
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 24 Aug 2023 17:30:09 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > OK, then let's have them in simple.el or in files.el.  Or any other
> > preloaded Lisp, if those two don't sound appropriate.
>
> files.el or simple.el don't have access to the mailutils or
> ANDROID_STUBIFY defines in config.h.

What is the significance of ANDROID_STUBIFY for these variables?
Cannot the proper values be determined in Lisp using some other
evidence or variable?

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307129
Author: Eli Zaretskii
Date: Thu, 24 Aug 2023 13:37
40 lines
1632 bytes
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 24 Aug 2023 18:11:23 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > What is the significance of ANDROID_STUBIFY for these variables?
>
> ANDROID_STUBIFY is t when portions of the Android port code are compiled
> to run on the build machine (for compiling Lisp and generating the Org
> manuals), while the Mailutils defines are non-nil when Emacs isn't
> distributed with its own movemail.
>
> > Cannot the proper values be determined in Lisp using some other
> > evidence or variable?
>
> Not by any means I know of -- and I'm averse to introduce two more
> DEFSYM and feature variables for this purpose.

Why isn't system-type or something similar enough for that?

And if that's not good enough, I think we should have a Lisp variable
or function to do this job, because these issues will keep popping up,
and doing all of that in C, just because we don't have the information
in Lisp, is not a good idea.  We do stuff like that in other cases,
cf.  noninteractive, window-system, daemonp, etc.

> Besides, what's the purpose of moving them to Lisp?

First, it's cleaner.  And second, these issues will happen in Lisp
code as well, and inventing a primitive for each one of them is not
the best idea.

> We also define shell-file-name, exec-suffixes, exec-directory,
> data-directory, doc-directory, and even configure-info-directory
> within callproc.c, which is the natural location for such things.

I don't see how these are relevant.  These variables are actually used
in callproc.c, with the single exception of configure-info-directory.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307131
Author: Eli Zaretskii
Date: Thu, 24 Aug 2023 14:08
16 lines
588 bytes
> From: Andreas Schwab <schwab@suse.de>
> Cc: Po Lu <luangruo@yahoo.com>,  emacs-devel@gnu.org
> Date: Thu, 24 Aug 2023 12:51:52 +0200
>
> On Aug 24 2023, Eli Zaretskii wrote:
>
> > And if that's not good enough, I think we should have a Lisp variable
> > or function to do this job, because these issues will keep popping up,
> > and doing all of that in C, just because we don't have the information
> > in Lisp, is not a good idea.  We do stuff like that in other cases,
> > cf.  noninteractive, window-system, daemonp, etc.
>
> Or add a feature for it.

Yes, that'd be also good.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307122
Author: Po Lu
Date: Thu, 24 Aug 2023 16:42
15 lines
681 bytes
Eli Zaretskii <eliz@gnu.org> writes:

>>     * src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
>>     defvar.  Define to `librcs2log.so' under Android, `rcs2log'
>
> Why do we need this variable defined and initialized in C?  Can't we
> do that in Lisp instead?  Since vc-rcs.el needs it, can't the variable
> be defined there, for example?

We do this for consistency with the other -program-name variables for
programs within exec-directory.  Moreover, Lisp other than vc-rcs.el may
want to use rcs2log: it helps to have its name defined in a central
location, instead of forcing everyone to either require vc or duplicate
the definition within syms_of_callproc.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307126
Author: Po Lu
Date: Thu, 24 Aug 2023 17:30
8 lines
263 bytes
Eli Zaretskii <eliz@gnu.org> writes:

> OK, then let's have them in simple.el or in files.el.  Or any other
> preloaded Lisp, if those two don't sound appropriate.

files.el or simple.el don't have access to the mailutils or
ANDROID_STUBIFY defines in config.h.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307128
Author: Po Lu
Date: Thu, 24 Aug 2023 18:11
19 lines
807 bytes
Eli Zaretskii <eliz@gnu.org> writes:

> What is the significance of ANDROID_STUBIFY for these variables?

ANDROID_STUBIFY is t when portions of the Android port code are compiled
to run on the build machine (for compiling Lisp and generating the Org
manuals), while the Mailutils defines are non-nil when Emacs isn't
distributed with its own movemail.

> Cannot the proper values be determined in Lisp using some other
> evidence or variable?

Not by any means I know of -- and I'm averse to introduce two more
DEFSYM and feature variables for this purpose.  Besides, what's the
purpose of moving them to Lisp?  We also define shell-file-name,
exec-suffixes, exec-directory, data-directory, doc-directory, and even
configure-info-directory within callproc.c, which is the natural
location for such things.

Re: master 32fe187bdf1: Install rcs2log within Emacs packages for Android
#307135
Author: Po Lu
Date: Thu, 24 Aug 2023 20:24
34 lines
1370 bytes
Eli Zaretskii <eliz@gnu.org> writes:

> Why isn't system-type or something similar enough for that?

Because that says nothing about Mailutils.

> And if that's not good enough, I think we should have a Lisp variable
> or function to do this job, because these issues will keep popping up,
> and doing all of that in C, just because we don't have the information
> in Lisp, is not a good idea.  We do stuff like that in other cases,
> cf.  noninteractive, window-system, daemonp, etc.

But it's cleaner to have them in C.  It will consume less space in the
dump image, less Lisp will require revisions upon changes to the C build
system, and so on.

> First, it's cleaner.

How is it more elegant to incessantly pawn issues off into Lisp?

> And second, these issues will happen in Lisp code as well, and
> inventing a primitive for each one of them is not the best idea.

I must disagree: the only bearing such build details have upon process
execution is the name of the executables within exec-directory.  Other
details can be adequately addressed through examining the values of
`system-type' and the feature list.

> I don't see how these are relevant.  These variables are actually used
> in callproc.c, with the single exception of configure-info-directory.

And also Vshell_file_name.  callproc.c's sole job is to set it, based on
build and system information.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads