emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Macro Argument Truncation
@ 2014-09-22  1:12 Jacob Gerlach
  2014-09-22  1:40 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Jacob Gerlach @ 2014-09-22  1:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

I am making heavy use of latex strikeout for a report I'm preparing in org
mode. I defined a macro for the necessary latex snippet, but the argument
gets truncated on export.

MWE:
----
* Section
{{{stk(The argument for this macro is several lines long. It seems
that after a certain length, the macro argument gets truncated, as the
tex output from exporting this org buffer contains a properly
terminated strikeout block with only part of this text.)}}}
#+MACRO: stk @@latex:\sout{$1}@@

----
C-c C-e l L produces:
----
....
\sout{The argument for this macro is several lines long. It seems
that after a certain length}
% Emacs 24.3.1 (Org mode 8.2.7c)
----

I see no mention of any reason for this in the macro node of the manual or
on list archives. Am I doing something wrong or is it a bug?


Note:
org-plus-contrib is an installed package.

     Status: Installed in `.../.emacs.d/elpa/org-plus-contrib-20140901/'.
    Version: 20140901

[-- Attachment #2: Type: text/html, Size: 1329 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] Macro Argument Truncation
  2014-09-22  1:12 [BUG] Macro Argument Truncation Jacob Gerlach
@ 2014-09-22  1:40 ` Thomas S. Dye
  2014-09-22  1:50   ` Jacob Gerlach
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2014-09-22  1:40 UTC (permalink / raw)
  To: Jacob Gerlach; +Cc: emacs-orgmode

Aloha Jacob,

Jacob Gerlach <jacobgerlach@gmail.com> writes:

> I am making heavy use of latex strikeout for a report I'm preparing in org
> mode. I defined a macro for the necessary latex snippet, but the argument
> gets truncated on export.
>
> MWE:
> ----
> * Section
> {{{stk(The argument for this macro is several lines long. It seems
> that after a certain length, the macro argument gets truncated, as the
> tex output from exporting this org buffer contains a properly
> terminated strikeout block with only part of this text.)}}}
> #+MACRO: stk @@latex:\sout{$1}@@
>
> ----
> C-c C-e l L produces:
> ----
> ....
> \sout{The argument for this macro is several lines long. It seems
> that after a certain length}
> % Emacs 24.3.1 (Org mode 8.2.7c)
> ----
>
> I see no mention of any reason for this in the macro node of the manual or
> on list archives. Am I doing something wrong or is it a bug?

Arguments to the macro are separated by commas.  Your text gets
truncated at the first comma.

From the manual:

/============================================================\
| You can define text snippets with                          |
|                                                            |
|      #+MACRO: name   replacement text $1, $2 are arguments |
|                                                            |
| which can be referenced {{{name(arg1, arg2)}}}.            |
\============================================================/

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] Macro Argument Truncation
  2014-09-22  1:40 ` Thomas S. Dye
@ 2014-09-22  1:50   ` Jacob Gerlach
  0 siblings, 0 replies; 3+ messages in thread
From: Jacob Gerlach @ 2014-09-22  1:50 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1814 bytes --]

Ah, of course. Right under my nose, but since I "knew" I only had one
argument, I didn't even think about it.

Thanks for the quick reply.

On Sun, Sep 21, 2014 at 9:40 PM, Thomas S. Dye <tsd@tsdye.com> wrote:

> Aloha Jacob,
>
> Jacob Gerlach <jacobgerlach@gmail.com> writes:
>
> > I am making heavy use of latex strikeout for a report I'm preparing in
> org
> > mode. I defined a macro for the necessary latex snippet, but the argument
> > gets truncated on export.
> >
> > MWE:
> > ----
> > * Section
> > {{{stk(The argument for this macro is several lines long. It seems
> > that after a certain length, the macro argument gets truncated, as the
> > tex output from exporting this org buffer contains a properly
> > terminated strikeout block with only part of this text.)}}}
> > #+MACRO: stk @@latex:\sout{$1}@@
> >
> > ----
> > C-c C-e l L produces:
> > ----
> > ....
> > \sout{The argument for this macro is several lines long. It seems
> > that after a certain length}
> > % Emacs 24.3.1 (Org mode 8.2.7c)
> > ----
> >
> > I see no mention of any reason for this in the macro node of the manual
> or
> > on list archives. Am I doing something wrong or is it a bug?
>
> Arguments to the macro are separated by commas.  Your text gets
> truncated at the first comma.
>
> From the manual:
>
> /============================================================\
> | You can define text snippets with                          |
> |                                                            |
> |      #+MACRO: name   replacement text $1, $2 are arguments |
> |                                                            |
> | which can be referenced {{{name(arg1, arg2)}}}.            |
> \============================================================/
>
> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>

[-- Attachment #2: Type: text/html, Size: 2626 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-22  1:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22  1:12 [BUG] Macro Argument Truncation Jacob Gerlach
2014-09-22  1:40 ` Thomas S. Dye
2014-09-22  1:50   ` Jacob Gerlach

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