From: Eric S Fraga <esflists@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: cautionary tale: avoid creating/using a macro called "title"
Date: Thu, 22 Mar 2018 09:22:03 +0000 [thread overview]
Message-ID: <87woy48nyc.fsf@ucl.ac.uk> (raw)
In-Reply-To: 87k1u4wlsx.fsf@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2620 bytes --]
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:
--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-macro--vc-modified-time \"/tmp/t.org\"))\n '(23219 29867 476148 871000))))") ("input-file" . "t.org") ("time" . "(eval (format-time-string $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:}@@")) ("DESCRIPTION" "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)
--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
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-341-g3a4fd3
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
next prev parent reply other threads:[~2018-03-22 9:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 17:37 cautionary tale: avoid creating/using a macro called "title" Eric S Fraga
2018-03-21 1:06 ` Bastien
2018-03-21 11:01 ` Eric S Fraga
2018-03-22 8:34 ` Bastien
2018-03-22 8:55 ` Eric S Fraga
2018-03-22 9:22 ` Eric S Fraga [this message]
2018-03-22 9:43 ` Bastien
2018-03-22 12:12 ` Eric S Fraga
2018-03-22 12:23 ` Kaushal Modi
2018-03-22 15:34 ` Eric S Fraga
2018-03-22 13:28 ` Nicolas Goaziou
2018-03-22 16:39 ` Eric S Fraga
2018-03-23 22:42 ` Nicolas Goaziou
2018-03-24 17:54 ` Eric S Fraga
2018-04-26 23:34 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87woy48nyc.fsf@ucl.ac.uk \
--to=esflists@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.