emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal <kaushal.modi@gmail.com>
To: Richard Lawrence <richard.lawrence@berkeley.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Enforcing newlines in plain text export
Date: Fri, 26 Sep 2014 23:59:52 -0400	[thread overview]
Message-ID: <CAFyQvY0KkSyts+FWc+bjaFuFLFbC4b32MxQRDCsWztcP0KZsXQ@mail.gmail.com> (raw)
In-Reply-To: <87ppehao11.fsf@berkeley.edu>

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

I am requesting a consistent solution.

If "//" at the end of a line inserts newline when exporting in all formats,
then it should do the same when used in between a line too for ALL export
formats.

Example: #+TITLE: Line one // Line two

I am simply trying to explain why we need another solution for the sake of
consistency across all org exported formats. But I understand if the org
team doesn't think it worthwhile to implement.

I'll look into the export filter configuration.

Thanks.
Kaushal
On Sep 26, 2014 8:47 PM, "Richard Lawrence" <richard.lawrence@berkeley.edu>
wrote:

> Kaushal <kaushal.modi@gmail.com> writes:
>
> > Interesting thing is that `\\` work fine at the end of the lines.
>
> Yes, this is the behavior documented in the manual.
>
> > I need to force line breaks in cases like these
> >
> > -----
> > For example, to execute the =example_1= test and run in the {{{NEWLINE}}}
> >
> >
> =/some/long/path/that/wouldn't/fit/along/with/the/above/line/in/the/same/line=
> > directory,
> > do the following..
> > -----
> >
> > In the above example, org-export will not wrap the text between the
> > verbatim formatting characters "=".
> > To ensure that the exported formats (html/pdf/ascii) look clean, I have
> to
> > force a newline character just before that long string.
> >
> > Now using "\\" here instead of {{{NEWLINE}}} works but then I have to
> > ensure that I place the "\\" character at the very end. If they are
> placed
> > mid-line then they will be interpreted as newline by latex but simply
> "\\"
> > character by html exporter.
>
> As you say, "\\" at the end of the line works fine in this case.  So it
> seems you do not have a need for another solution.
>
> > For consistency, the {{{NEWLINE}}} approach looks better; hoping that
> > org-mode will support a special newline character for ascii exports at
> some
> > time:
> >
> > -----
> > #+MACRO: NEWLINE @@latex:\\@@ @@html:<br>@@ @@ascii:NEWLINE_CHARACTERS_
> > FOR_ASCII_EXPORT@@
> > -----
>
> This would really not be a great solution, and I don't think you should
> expect Org mode to support it.  If you really need something like this,
> you could write an export filter for yourself (e.g., one that replaces
> the string "ASCII_NEWLINE_CHARACTER" with "\n" in the exported buffer).
> See the "Advanced configuration" section of the Exporting chapter in the
> manual.
>
> A better and more general solution, I think, would be to allow "\\" to
> be used in other contexts, such as in headlines, title/author/date
> declarations, etc.  But that is a change to the currently documented
> syntax, and it is probably a fair amount of work to implement, so it
> probably isn't going to happen unless a variety of users really need it
> and the maintainers think it would be an improvement to Org.
>
> Best,
> Richard
>

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

  reply	other threads:[~2014-09-27  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFyQvY2PtupGAuDX_UDMHiJgSvTUYYGKeVqfvCzZFAU9m-KJ7g@mail.gmail.com>
2014-09-26 15:52 ` Fwd: Enforcing newlines in plain text export Richard Lawrence
2014-09-26 16:04   ` Kaushal
2014-09-26 16:14     ` Kaushal
2014-09-27  0:46     ` Richard Lawrence
2014-09-27  3:59       ` Kaushal [this message]
2014-09-27 15:59         ` Richard Lawrence
2014-09-27 21:17           ` Nicolas Goaziou
2014-09-27 21:37             ` Kaushal
2014-09-28  1:30           ` Alexis

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=CAFyQvY0KkSyts+FWc+bjaFuFLFbC4b32MxQRDCsWztcP0KZsXQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=richard.lawrence@berkeley.edu \
    /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).