From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: cautionary tale: avoid creating/using a macro called "title" Date: Thu, 22 Mar 2018 09:22:03 +0000 Message-ID: <87woy48nyc.fsf@ucl.ac.uk> References: <87y3iuh82n.fsf@gmail.com> <87po3y5jaw.fsf@gnu.org> <87vadp7kvc.fsf@delle7240.chemeng.ucl.ac.uk> <87k1u4wlsx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eywQH-0001pi-G7 for emacs-orgmode@gnu.org; Thu, 22 Mar 2018 05:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eywQB-0005Ty-LV for emacs-orgmode@gnu.org; Thu, 22 Mar 2018 05:22:13 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thursday, 22 Mar 2018 at 09:34, Bastien wrote: > Yes it works both with my configuration and with emacs -Q here, with > GNU Emacs 27.0.50 (build 51, i686-pc-linux-gnu) and Org mode version > 9.1.8. Very strange. Just tried with emacs -Q, org up to date from git, and it still doesn't work for me. Actual contents of file are: #+begin_src org ,#+macro: title This is the actual title ,#+title: @@latex:\fbox{@@ {{{title}}} @@latex:}@@ ,* heading this is some text. #+end_src The backtrace, after waiting a little bit, is: =2D-8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (quit) org-macro-replace-all((("n" . "(eval (org-macro--counter-increment $1 $2)= )") ("modification-time" . "(eval\n(format-time-string $1\n = (or (and (org-string-nw-p $2)\n (org-macr= o--vc-modified-time \"/tmp/t.org\"))\n '(23219 29867 47= 6148 871000))))") ("input-file" . "t.org") ("time" . "(eval (format-time-st= ring $1))") ("property" . "(eval (save-excursion\n (let ((l $2))\n = (when (org-string-nw-p l)\n (condition-case _\n = (let ((org-link-search-must-match-exact-headline t))\n = (org-link-search l nil t))\n (error\n (error= \"Macro property failed: cannot find location %s\"\n = l)))))\n (org-entry-get nil $1 'selective)))") ("results" . "$1") ("= keyword" . "(eval (org-macro--find-keyword-value $1))") ("email") ("date") = ("author") ("title" . "@@latex:\\fbox{@@ {{{title}}} @@latex:}@@")) ("DESCR= IPTION" "KEYWORDS" "SUBTITLE" "DATE" "TITLE" "DATE" "AUTHOR")) org-export-as(latex nil nil nil (:output-file "t.tex")) org-export-to-file(latex "t.tex" nil nil nil nil nil) org-latex-export-to-latex(nil nil nil nil) org-export-dispatch(nil) funcall-interactively(org-export-dispatch nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch) =2D-8<---------------cut here---------------end--------------->8--- I am not surprised that there is an infinite loop given that title is being replaced by something that includes the title macro? Or am I misreading the backtrace? Interestingly, although I have updated org and the log says that 8 hours ago you created the 9.1.8 release, the org version is still 9.1.6. In any case, no worries as simply changing the macro name (& subsequent use) to titlecontents or similar does the job. thanks, eric =2D-=20 Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-341-g3a4fd3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWrN1uwAKCRDIkZPY//z2 febMAJ4/unnygRVZlTduNWEJOZsy2vWvsgCfT+ItdAkZE37KN8//GZxZGOUVhMY= =jN5U -----END PGP SIGNATURE----- --=-=-=--