emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>,
	Ihor Radchenko <yantar92@posteo.net>
Subject: Re: Reproducible work with natively compiled Emacs
Date: Mon, 11 Mar 2024 10:11:55 +0100	[thread overview]
Message-ID: <CAO48Bk883_Jq-WhsmAymXJw0tKzSBNpGwC3TFfjV9+-t6XDvkQ@mail.gmail.com> (raw)
In-Reply-To: <14271f30-5821-497d-844f-dadb720525d3@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 951 bytes --]

HI,

nothing like sleeping over a problem. This solution seems to be easier...

/PA

On Sun, 10 Mar 2024 at 12:49, Pedro A. Aranda <paaguti@gmail.com> wrote:

> Hi,
>
> I have been experiencing some inconsistencies with org-mode, which I
> have been able to trace own to using native compilation and not knowing
> where the files from main were.
>
> Attached is a patch in four parts to make natively compiled orgmode more
> consistent.
>
> This is a first step and I would like reactions to it, before submitting
> a unified patch.
>
> I hope that splitting it up helps understanding the different parts of
> my "solution". Maybe some parts can be cherry picked better this way...
>
> best /PA
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 1589 bytes --]

[-- Attachment #2: 0002-Clean-.eln-files-from-user-emacs-configuration.patch --]
[-- Type: text/x-patch, Size: 1468 bytes --]

From 9476898539bd9ad72a5b45bc1625fa398eada879 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Mon, 11 Mar 2024 09:48:10 +0100
Subject: [PATCH 2/3] Clean .eln files from user emacs configuration

* lisp/Makefile: Get the directory where emacs stores the compiled files
  in the user storage and use that to locate the .eln files generated by
  'make native' and delete them

---
 lisp/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/Makefile b/lisp/Makefile
index c570d9cfa..506aa75e1 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -11,6 +11,9 @@ LISPF 	:= $(filter-out $(LISPA),$(sort $(wildcard *.el)))
 LISPC 	:= $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
 LISPN 	:= $(filter-out $(LISPB) $(LISPN:%el=%eln),$(LISPF:%el=%eln))
 _ORGCM_ := dirall single native source slint1 slint2
+# This is where Emacs stores the .eln files
+ELNDIR        = $(shell emacs --batch --eval '(princ (car native-comp-eln-load-path))')
+
 -include local.mk

 .PHONY:	all compile compile-dirty \
@@ -79,6 +82,11 @@ cleanauto clean cleanall::
 clean cleanall cleanelc::
 	$(RM) *.elc

+cleaneln::
+	for elnf in $(patsubst %.eln, %-*.eln, $(LISPN)); do \
+	  find $(ELNDIR) -name $$elnf -exec $(RM) -v {} \; ;\
+	done
+
 clean-install:
 	if [ -d $(DESTDIR)$(lispdir) ] ; then \
 	  $(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* $(DESTDIR)$(lispdir)/ol*.el* $(DESTDIR)$(lispdir)/ox*.el* ; \
--
2.34.1

[-- Attachment #3: 0001-Add-cleaneln-target.patch --]
[-- Type: text/x-patch, Size: 643 bytes --]

From 6d98dfb3d72171e0231823260165b23e8b9963ee Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Mon, 11 Mar 2024 09:47:12 +0100
Subject: [PATCH 1/3] Add cleaneln target

* mk/targets.mk: add the 'cleaneln' target

---
 mk/targets.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mk/targets.mk b/mk/targets.mk
index de849c4fb..ab9ec2a1f 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -143,6 +143,9 @@ cleanall: cleandirs cleantest
 $(CLEANDIRS:%=clean%):
 	-$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} +

+cleaneln:
+	$(MAKE) -C lisp $@
+
 cleanelc:
 	$(MAKE) -C lisp $@

--
2.34.1

[-- Attachment #4: 0003-Announce-cleaneln.patch --]
[-- Type: text/x-patch, Size: 1335 bytes --]

From 0b5d791d32f26698e53299e639d7ef73581a6310 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Mon, 11 Mar 2024 09:56:05 +0100
Subject: [PATCH 3/3] Announce cleaneln

---
 etc/ORG-NEWS | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index abe62daaf..325fd412b 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -11,7 +11,8 @@ See the end of the file for license conditions.
 
 Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
 
-* Version 9.7 (not released yet)
+* V
+ersion 9.7 (not released yet)
 ** Important announcements and breaking changes
 *** When ~org-link-file-path-type~ is a function, its argument is now a filename as it is read by ~org-insert-link~; not an absolute path
 
@@ -1263,6 +1264,11 @@ optional argument =NEW-HEADING-CONTAINER= specifies where in the
 buffer it will be added.  If not specified, new headings are created
 at level 1 at the end of the accessible part of the buffer, as before.
 
+*** ~make cleaneln~ will remove the .eln files from the user emacs configuration
+
+Natively compiled Emacs lisp files generated with ~make native~ are
+now correctly located and deleted with ~make cleaneln~.
+
 ** Miscellaneous
 *** =org-crypt.el= now applies initial visibility settings to decrypted entries
 
-- 
2.34.1


  reply	other threads:[~2024-03-11  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10 11:49 Reproducible work with natively compiled Emacs Pedro A. Aranda
2024-03-11  9:11 ` Pedro Andres Aranda Gutierrez [this message]
2024-03-13 12:50   ` Ihor Radchenko
2024-03-13 16:52     ` Pedro Andres Aranda Gutierrez
2024-03-13 17:17       ` Ihor Radchenko
     [not found]         ` <CAO48Bk8v7f3ajv1P3QMvZOuLCBn8f1qp5VQKeUByX0hbKqeEmQ@mail.gmail.com>
2024-03-14  7:50           ` Pedro Andres Aranda Gutierrez
2024-03-15 14:08             ` Ihor Radchenko
2024-03-15 11:17               ` Pedro Andres Aranda Gutierrez
     [not found]                 ` <CAO48Bk9TgysKrAGmhiyR5NZ_4LYj9GMZf-LUo=fjREJYsuXFFg@mail.gmail.com>
2024-03-15 17:08                   ` Ihor Radchenko
2024-03-16  6:16                     ` Pedro Andres Aranda Gutierrez
2024-03-16 10:20                       ` Ihor Radchenko
2024-03-17  6:13                         ` Pedro Andres Aranda Gutierrez
2024-03-17  8:19                           ` Max Nikulin
2024-03-17 10:16                           ` Ihor Radchenko
2024-03-17 10:30                             ` Pedro Andres Aranda Gutierrez
2024-03-17 14:26                               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO48Bk883_Jq-WhsmAymXJw0tKzSBNpGwC3TFfjV9+-t6XDvkQ@mail.gmail.com \
    --to=paaguti@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).