From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: bug#30961: Byte compilation problem with emacs-org Date: Tue, 27 Mar 2018 16:20:24 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0pTF-0001Gn-Hp for bug-guix@gnu.org; Tue, 27 Mar 2018 10:21:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0pTC-0000fY-6q for bug-guix@gnu.org; Tue, 27 Mar 2018 10:21:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0pTC-0000fS-23 for bug-guix@gnu.org; Tue, 27 Mar 2018 10:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f0pTB-0007iJ-Uh for bug-guix@gnu.org; Tue, 27 Mar 2018 10:21:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0pSi-0000n6-8W for bug-guix@gnu.org; Tue, 27 Mar 2018 10:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0pSe-0000Ql-Ue for bug-guix@gnu.org; Tue, 27 Mar 2018 10:20:32 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f0pSe-0000Q8-Jb for bug-guix@gnu.org; Tue, 27 Mar 2018 10:20:28 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 30961@debbugs.gnu.org An Emacs installation that includes package emacs-org exhibits a well-documented bug: certain uses of org-babel, such as using the R language, lead to the error message Invalid function: org-babel-header-args-safe-fn For a discussion of this bug in other contexts, see for example: https://lists.gnu.org/archive/html/emacs-orgmode/2016-02/msg00415.html I do not claim to fully understand the cause of this bug, but the explanations mention a conflict between the org-mode version shipped with Emacs and the later one being installed afterwards. This conflict happens when the newer org-mode is byte-compiled, and leads to wrong .elc files. It is easy to verify that the Guix version also suffers from this byte-compilation problem. Removing the "build" step, and thus byte compilaion, by adding (arguments `(#:phases (modify-phases %standard-phases (delete 'build)))) to the definition of emacs-org removes the error message. What I do not understand yet is why this happens within Guix. The explanations for the bug concentrate on the built-in org-mode version having been initialized before byte compilation of the new one, and recommend starting Emacs with the =E2=80=93quick option for the byte compil= ation session. This is what Guix does as well, so the problem should not exist. I tried to remove the old org-mode from load-path during byte compilation of the new version by manipulating EMACSLOADPATH, so far without success. If Emacs' basic "lisp" dir is not on EMACSLOADPATH, Emacs fails to do anything, but if it is, Emacs automatically adds "lisp/org" via lisp/subdir.el. Konrad.