Re: [O] Bilingual text in org

2017-12-08 Thread org-mode
I have added @@latex: to my template in order to generate an HTML preview.

Here ist the current version:

#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline author:t
#+OPTIONS: broken-links:nil c:nil creator:nil d:(not "LOGBOOK")
#+OPTIONS: date:t e:t email:nil f:t inline:t num:t p:nil pri:nil
#+OPTIONS: prop:nil stat:t tags:nil tasks:t tex:t timestamp:t title:t
#+OPTIONS: toc:nil todo:t |:t
#+TITLE: Übersetzung
#+DATE: <2017-12-08 Fri>
#+AUTHOR: Axel Kielhorn
#+LANGUAGE: de
# +SELECT_TAGS: export german
# +SELECT_TAGS: export english
#+EXCLUDE_TAGS: noexport new glossar
#+CREATOR: Emacs 25.3.1 (Org mode 9.1.2)
#+LATEX_CLASS: komaarticle
#+LATEX_CLASS_OPTIONS: [english, german]
# +LATEX_HEADER: \usepackage[noindent,parskip]{stdpage}
#+TAGS_ALL: german english new glossar

* Text deutsch:german:
@@latex:\begin{otherlanguage}{german}@@ 
  Hier ist ein Text.
@@latex:\end{otherlanguage}@@

* Text englisch   :english:
@@latex:\begin{otherlanguage}{english}@@
  Here is some text.
@@latex:\end{otherlanguage}@@

* Glossar   :glossar:

Greetings
Axel


[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-08 Thread Eli Zaretskii
> From: Nicolas Goaziou 
> Cc: dov.grobg...@gmail.com,  11...@debbugs.gnu.org
> Date: Mon, 04 Dec 2017 22:02:00 +0100
> 
> Eli Zaretskii  writes:
> 
> > Such tests can only be run interactively, because bidi reordering is a
> > display-time feature in Emacs.  Is that OK with you?
> 
> That's better than no test at all in my book, so I'm fine with it, yes.

OK.

Can one of you please provide a short Lisp snippet that generates a
2x2 Org table and inserts it in a buffer, which I could use as the
basis for the test?  That would get me off the ground quicker, since
I'm a very infrequent user of Org tables.

> I can use isolation characters instead (if anyone cares to point me to
> what those are), if you think that's better.

I will experiment with both and see which one is better.





[O] Prevent auto-filling of export snippets

2017-12-08 Thread Kaushal Modi
Hello,

If I have a long Export Snippet like:

@@html:This HTML Export Snippet will also get exported for Hugo
exports, verbatim.@@

and with auto-fill-mode enabled (70 cols), if I hit Enter at the end of the
line, I becomes:

@@html:This HTML Export Snippet will also get exported for Hugo
exports, verbatim.@@

(If it is difficult to see the difference in email, auto-filling has
inserted a hard line break before the "exports, verbatim.@@"
part in the second snippet above.)

So then, obviously, that auto-filled export snippet doesn't get parsed by
Org as an Export Snippet.

Can the rules in Org set to prevent auto-filling (like in Headings) be set
for Export Snippets too?

I am using the master branch, but I believe the same issue would be on
maint too.

Thanks.

-- 

Kaushal Modi


[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-08 Thread Nicolas Goaziou
Hello,

Eli Zaretskii  writes:

> Can one of you please provide a short Lisp snippet that generates a
> 2x2 Org table and inserts it in a buffer, which I could use as the
> basis for the test?  That would get me off the ground quicker, since
> I'm a very infrequent user of Org tables.

For tests, we use `org-test-with-temp-text' macro, e.g.,

  (org-test-with-temp-text "| a | b |\n| c | d |"
... do something in that buffer ...)

> I will experiment with both and see which one is better.

OK. Thank you.

Regards,

-- 
Nicolas Goaziou





Re: [O] Prevent auto-filling of export snippets

2017-12-08 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> and with auto-fill-mode enabled (70 cols), if I hit Enter at the end of the
> line, I becomes:
>
> @@html:This HTML Export Snippet will also get exported for Hugo
> exports, verbatim.@@

[...]

> So then, obviously, that auto-filled export snippet doesn't get parsed by
> Org as an Export Snippet.

Why obviously? AFAICT, the parser can handle snippets that span over
multiple lines.

Regards,

-- 
Nicolas Goaziou



Re: [O] Prevent auto-filling of export snippets

2017-12-08 Thread Kaushal Modi
On Fri, Dec 8, 2017 at 12:11 PM Nicolas Goaziou 
wrote:

> > So then, obviously, that auto-filled export snippet doesn't get parsed by
> > Org as an Export Snippet.
>
> Why obviously? AFAICT, the parser can handle snippets that span over
> multiple lines.
>

Ah, sorry, pilot error.

I had something like @@abc
def@@ in my actual test.. forgot the backend: string after @@.

Thanks!

-- 

Kaushal Modi


[O] run shell command after publishing project

2017-12-08 Thread Matt Price
Hi everyone,
Feeling a little rude after a long absence in which I dropped all my
non-work commitments -- but still here to ask a question!

I'm setting up a new workflow using Kauhsal's ox-hugo.  I keep all my
course materials in a few org files & publish to hugo-flavoured markdown.
My source materials live in one git repo, and my website in another.  After
exporting any of my my courses to the local hugo directory, I'd like to run
a shell script that I'll keep in my org-files directory.

That script
- cds to the website repo directory, commits changes to the website master
branch, - runs hugo,
- switches to the "public" directory of compiled html pages, which has a
worktree checked out to  the  gh-pages branch,
- commits changes there as well, and then
- pushes both branches to github.

The script seems to work OK, and now I would like to run it every time I
export from the appropriate projects. Is there a good way for me to do
this? I guess a hook that only runs under certain conditions?

If I can get this to work, and then also auto export every time I commit
the org-files to master (maybe with a post-commit git hook of ~emacsclient
-e '(org-publish-project "course1"~ ?), then I will maybe be almost happy!

thanks as always,
matt


Re: [O] run shell command after publishing project

2017-12-08 Thread Kaushal Modi
On Fri, Dec 8, 2017, 2:29 PM Matt Price  wrote:

> Hi everyone,
> Feeling a little rude after a long absence in which I dropped all my
> non-work commitments -- but still here to ask a question!
>

Hello!

I'm setting up a new workflow using Kauhsal's ox-hugo.  I keep all my
> course materials in a few org files & publish to hugo-flavoured markdown.
>

Awesome! :D

  My source materials live in one git repo, and my website in another.
> After exporting any of my my courses to the local hugo directory, I'd like
> to run a shell script that I'll keep in my org-files directory.
>
> That script
> - cds to the website repo directory, commits changes to the website master
> branch, - runs hugo,
> - switches to the "public" directory of compiled html pages, which has a
> worktree checked out to  the  gh-pages branch,
> - commits changes there as well, and then
> - pushes both branches to github.
>
> The script seems to work OK, and now I would like to run it every time I
> export from the appropriate projects. Is there a good way for me to do
> this? I guess a hook that only runs under certain conditions?
>
> If I can get this to work, and then also auto export every time I commit
> the org-files to master (maybe with a post-commit git hook of ~emacsclient
> -e '(org-publish-project "course1"~ ?), then I will maybe be almost happy!
>

I haven't yet got to ox-publish to work with ox-hugo, because of the unique
flow for subtree-based exports where we want to export only subtrees with a
specific property (EXPORT_FILE_NAME).

But I was finally able to achieve something like that using a Makefile [1]
+ Netlify (or GitHub Pages/Travis CI or GitLab CI).

A very recent example (few days) is how I helped set up the use-package
website publishing flow.

- ox-hugo + Hugo using Makefile + GitHub Pages.

You *only* need to commit the use-package.org[2] to the GitHub repo, and
https://jwiegley.github.io/use-package/ updates in a minute or so. The
Travis CI simply calls "make doc". That takes care of:
- Installing dependencies if needed on the CI machine
- Exporting Org to Markdown using ox-hugo
- Running hugo
- Commiting published HTML to the gh-pages branch
- And the site gets deployed, just like that :)

PS: I publish the ox-hugo package website[3] the same way too, but using
Netlify (/which is the better than GitHub Pages or Gitlab CI IMO -- free
too/). See the footer of that site for the 1-file Org source.

[1]: https://github.com/jwiegley/use-package/blob/master/doc/Makefile

[2]: https://github.com/jwiegley/use-package/blob/master/use-package.org

[3]: https://ox-hugo.scripter.co/

-- 

Kaushal Modi


Re: [O] [patch] structure snippet completions

2017-12-08 Thread Rasmus
Kaushal Modi  writes:

> On Thu, Dec 7, 2017 at 6:51 PM Rasmus  wrote:
>
>> Rasmus  writes:
>> One possible "bug" that I discovered is illustrated by the following
>> example.
>>
>> * foo
>>   suggested indention
>> >
>>   When I tab at point ("|") extra indention will be stripped.  I don’t
>>   know if this is something that should be fixed.
>>
>
> That's does look like a bug. The preservation of indentation is especially
> useful if you want source block in nested lists.
>
> #+BEGIN_EXAMPLE
> Outside list
> #+END_EXAMPLE
>
> - list level 1
>
>   #+BEGIN_EXAMPLE
>   At level 1
>   #+END_EXAMPLE
>
>   - list level 2
>
> #+BEGIN_EXAMPLE
> At level 2
> #+END_EXAMPLE

In that example everything would work fine, though.  For it not to work
you’d have alter your example to something like this:

#+BEGIN_EXAMPLE
Outside list
#+END_EXAMPLE

- list level 1

   #+BEGIN_EXAMPLE
   example with extra indention
   #+END_EXAMPLE

Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




Re: [O] [patch] structure snippet completions

2017-12-08 Thread Berry, Charles

> On Dec 7, 2017, at 3:37 PM, Rasmus  wrote:
> 
> I have also pushed the code.  " enabled by requiring org-tempo.
> 

Thanks. I was in a deep funk without " Let me know about any issues.
> 

Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it will match 
things like "

Re: [O] [patch] structure snippet completions

2017-12-08 Thread Rasmus
"Berry, Charles"  writes:

>> On Dec 7, 2017, at 3:37 PM, Rasmus  wrote:
>> 
>> I have also pushed the code.  "> enabled by requiring org-tempo.
>> 
>
> Thanks. I was in a deep funk without "> Let me know about any issues.
>> 
>
> Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it will
> match things like " the user customize it.

At the moment snippets with more than one character isn’t supported.  Note
that the car of org-structure-template-alist elements is now a character.
"Snippet-strings" (like "la") will be re-added soon cf. the email from
Eric earlier on in this thread.


> A minor gotcha: if you `(require 'org-tempo)' after an org buffer has
> been created you will need to (org-mode-restart) the buffer to enable
> completions.  I got stuck trying to add custom templates until I
> realized this.

It shouldn’t do that since this is near the bottom of org-tempo:

(when (eq major-mode 'org-mode) (org-tempo-setup))

On my system it works in the first buffer where I require org-tempo, even
without reloading.

Which version of Emacs are you using?

Rasmus

-- 
A clever person solves a problem. A wise person avoids it




Re: [O] run shell command after publishing project

2017-12-08 Thread Matt Price
This sounds fantastic, Kaushal. I'm struggling to follow, so wl lask some
questions inline.

On Fri, Dec 8, 2017 at 2:58 PM, Kaushal Modi  wrote:

> On Fri, Dec 8, 2017, 2:29 PM Matt Price  wrote:
>
>> Hi everyone,
>> Feeling a little rude after a long absence in which I dropped all my
>> non-work commitments -- but still here to ask a question!
>>
>
> Hello!
>
> I'm setting up a new workflow using Kauhsal's ox-hugo.  I keep all my
>> course materials in a few org files & publish to hugo-flavoured markdown.
>>
>
> Awesome! :D
>
>   My source materials live in one git repo, and my website in another.
>> After exporting any of my my courses to the local hugo directory, I'd like
>> to run a shell script that I'll keep in my org-files directory.
>>
>> That script
>> - cds to the website repo directory, commits changes to the website
>> master branch, - runs hugo,
>> - switches to the "public" directory of compiled html pages, which has a
>> worktree checked out to  the  gh-pages branch,
>> - commits changes there as well, and then
>> - pushes both branches to github.
>>
>> The script seems to work OK, and now I would like to run it every time I
>> export from the appropriate projects. Is there a good way for me to do
>> this? I guess a hook that only runs under certain conditions?
>>
>> If I can get this to work, and then also auto export every time I commit
>> the org-files to master (maybe with a post-commit git hook of ~emacsclient
>> -e '(org-publish-project "course1"~ ?), then I will maybe be almost happy!
>>
>
> I haven't yet got to ox-publish to work with ox-hugo, because of the
> unique flow for subtree-based exports where we want to export only subtrees
> with a specific property (EXPORT_FILE_NAME).
>
> But I was finally able to achieve something like that using a Makefile [1]
> + Netlify (or GitHub Pages/Travis CI or GitLab CI).
>

ok, great.

>
> A very recent example (few days) is how I helped set up the use-package
> website publishing flow.
>
> - ox-hugo + Hugo using Makefile + GitHub Pages.
>
> You *only* need to commit the use-package.org[2] to the GitHub repo, and
> https://jwiegley.github.io/use-package/ updates in a minute or so. The
> Travis CI simply calls "make doc". That takes care of:
> - Installing dependencies if needed on the CI machine
> - Exporting Org to Markdown using ox-hugo
> - Running hugo
> - Commiting published HTML to the gh-pages branch
> - And the site gets deployed, just like that :)
>
> so,
- the doc/ directory contains the full Hugo source directory, with
config.toml, content/, layouts, etc., as well as the theme, which looks
like it's statically installed
- looks like maybe the hugo html ends up in public, but then it gets moved
somehow (can't quite figure out how)
- the ox-hugo files are kept somewhere I guess
- presumably any personal config has to be replicated somewhere on the web
where travis can access it
- is there any more setup that needs to be done on Travis?
- I have 4 main org files; 3 of them get copied per-header, and one as a
whole file.  Is that an issue?

This all looks really ocol; too bad it's a bit out of my range, I'd like to
understand it a little better!

To me the shell script idea feels easier, but I guess it's also a little
brittle


> PS: I publish the ox-hugo package website[3] the same way too, but using
> Netlify (/which is the better than GitHub Pages or Gitlab CI IMO -- free
> too/). See the footer of that site for the 1-file Org source.
>

Sticking with Github for now since all my course stuff is there, probably
easiest for my studnets ot have everything in the same place.


thank you!

>
> [1]: https://github.com/jwiegley/use-package/blob/master/doc/Makefile
>
> [2]: https://github.com/jwiegley/use-package/blob/master/use-package.org
>
> [3]: https://ox-hugo.scripter.co/
>
> --
>
> Kaushal Modi
>


Re: [O] run shell command after publishing project

2017-12-08 Thread Kaushal Modi
On Fri, Dec 8, 2017 at 4:38 PM Matt Price  wrote:

> This sounds fantastic, Kaushal. I'm struggling to follow, so wl lask some
> questions inline.
>

Sure, my answers are below.

- the doc/ directory contains the full Hugo source directory, with
> config.toml, content/, layouts, etc., as well as the theme, which looks
> like it's statically installed
>

Correct.


> - looks like maybe the hugo html ends up in public, but then it gets moved
> somehow (can't quite figure out how)
>

Travis CI deals with that. You can look at the use-package Travis setup
here[1]. The revelant portion for the site deployment is:

=
before_deploy: cd doc && make doc
deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GITHUB_TOKEN
  local_dir: public
  on:
branch: master
condition: $EMACS_VERSION = 26
=

(I use emacs 26 specifically to build the site as it comes with Org 9.1.4..
so then I don't need to install Org on the Travis CI machine.)


> - the ox-hugo files are kept somewhere I guess
>

No. The latest ox-hugo version available on Melpa is used. That is done via
the same Makefile.. it loads a setup file I have: setup-ox-hugo.el[2].


> - presumably any personal config has to be replicated somewhere on the web
> where travis can access it
>

The same setup-ox-hugo.el has some minimal "sane settings" (Look at the
"(with-eval-after-load 'org" in there for example). You can also add your
personal setup to that as needed.


> - is there any more setup that needs to be done on Travis?
>

1. The .travis.yml file mentioned above.
2. Get your GITHUB_TOKEN (minimum permission level: public_repo) to assign
to Travis[3].
3. Set the GITHUB_TOKEN and HUGO_BASE_URL env variables in the Travis
settings for your repo on https://travis-ci.org/USER/REPO/settings.

- I have 4 main org files; 3 of them get copied per-header, and one as a
> whole file.  Is that an issue?
>

No. The latest ox-hugo version now has org-hugo-export-wim-to-md. "wim"
stands for What I Mean. See https://ox-hugo.scripter.co/#export-bindings or
the comment header in ox-hugo.el for details.

In setup-ox-hugo.el, I define this simple wrapper function:

(defun org-hugo-export-all-wim-to-md ()
  (org-hugo-export-wim-to-md :all-subtrees nil nil :noerror))

In the Makefile, that function is used in the "md1" rule.
And that rule is called in loop by the "md" rule:

md: $(org_files)
$(org_files):
@$(MAKE) md1 ORG_FILE=$@ TIMEZONE=UTC # Use UTC/Universal time zone for
tests

So you only need to tweak the "org_files" rule which is a simple find
command to collect an array of all the Org files you want to export
(doesn't matter if they are file-based or subtree-based).

If there's any subtree that you don't want to export or any file that you
don't want to export in this process, tag the subtree with "foo" tag
(example) and the file with #+FILETAGS keyword set to "foo", and add the
same "foo" tag to org-export-exclude-tags in the setup-ox-hugo.el. More
info:
https://ox-hugo.scripter.co/doc/tags-and-categories/#marking-files-to-not-be-exported

This all looks really ocol; too bad it's a bit out of my range, I'd like to
> understand it a little better!
>

I hope above helps!

To me the shell script idea feels easier, but I guess it's also a little
> brittle
>
>
>> PS: I publish the ox-hugo package website[3] the same way too, but using
>> Netlify (/which is the better than GitHub Pages or Gitlab CI IMO -- free
>> too/). See the footer of that site for the 1-file Org source.
>>
>
> Sticking with Github for now since all my course stuff is there, probably
> easiest for my studnets ot have everything in the same place.
>

Netlify can be thought of just a CI machine. Your site can live in
Github/Gitlab/etc. repos, but Netlify will link to those. So the site
source will stay exactly where it is.. just that now Netlify will be
receptive to the git commit actions on your repo and auto-deploy the site
with each commit. For example: The ox-hugo doc site source is on GitHub,
but it is published using Netlify (https://ox-hugo.scripter.co).

Another thing: GitHub Pages does not support https on custom domains..
Netlify does.


> thank you!
>

You are welcome.

And finally, let's move all non-Org discussion off the Org mailing list.

[1]: https://github.com/jwiegley/use-package/blob/master/.travis.yml

[2]:
https://github.com/jwiegley/use-package/blob/master/doc/setup-ox-hugo.el

[3]: https://github.com/blog/1509-personal-api-tokens

-- 

Kaushal Modi


[O] Broken org-mode "Column width and alignment" in latest version

2017-12-08 Thread Ruy Exel
The "Column width and alignment" feature of org-mode (
http://orgmode.org/manual/Column-width-and-alignment.html) is not working
in the latest GIT version (as of Fri Dec 8 20:06:59 BRST 2017).

I have just tested it in the table

  |---+--|
  |   | <6>  |
  | 1 | one  |
  | 2 | two  |
  | 3 | This is a long chunk of text |
  | 4 | four |
  |---+--|

which is actually the example given in the manual.  It fails under the
latest version (column width is unchanged upon alignment) but it works OK
in an older version (Org version 7.9.3f - GNU Emacs 24.3).

Regards,
Ruy


Re: [O] Broken org-mode "Column width and alignment" in latest version

2017-12-08 Thread Kaushal Modi
On Fri, Dec 8, 2017 at 5:21 PM Ruy Exel  wrote:

> The "Column width and alignment" feature of org-mode (
> http://orgmode.org/manual/Column-width-and-alignment.html) is not working
> in the latest GIT version (as of Fri Dec 8 20:06:59 BRST 2017).
>
> I have just tested it in the table
>
>   |---+--|
>   |   | <6>  |
>   | 1 | one  |
>   | 2 | two  |
>   | 3 | This is a long chunk of text |
>   | 4 | four |
>   |---+--|
>
> which is actually the example given in the manual.  It fails under the
> latest version (column width is unchanged upon alignment)
>

I am assuming you are using the master/development version of Org from git?
If so, see this in ORG-NEWS:

*** =align= STARTUP value no longer narrow table columns

Columns narrowing (or shrinking) is now dynamic. See [[*Dynamically
narrow table columns]] for details. In particular, it is decoupled from
aligning.

If you need to automatically shrink columns upon opening an Org
document, use =shrink= value instead, or in addition to align:

#+BEGIN_EXAMPLE
,#+STARTUP: align shrink
#+END_EXAMPLE




> but it works OK in an older version (Org version 7.9.3f - GNU Emacs 24.3).
>

Wow! That's a very old version!

As you are making this big version upgrade, it would be worthwhile to go
through the whole of
http://orgmode.org/cgit.cgi/org-mode.git/tree/etc/ORG-NEWS and make a note
of new features and few breaking changes since that version.
-- 

Kaushal Modi


Re: [O] Broken org-mode "Column width and alignment" in latest version

2017-12-08 Thread Kaushal Modi
Hello Ruy,

First of all, thanks for confirming that this worked for you.

Secondly, no question is a newbie question :) This mailing list is one of
the friendliest mailing lists I've participated in. So don't worry about
upsetting someone, or getting offended. So I am continuing this thread on
the mailing list.

Feel free to ask any kind of Org question you might have, and there are
many folks here to help you out.

Further comments are inline below.

On Fri, Dec 8, 2017, 5:56 PM Ruy Exel  wrote:

>
> > #+BEGIN_EXAMPLE
> > ,#+STARTUP: align shrink
> > #+END_EXAMPLE
>
> Got it!  Thanks very much.
>

You're welcome.

I am in fact a brand new user of org-mode and 7.9.3f is just the version
> which was dormant in my computer before I updated to the GIT version.
> Sometimes I use it for comparison.
>

If you are a brand new user, it's my personal opinion that that stick to
the stable release. You get that by cloning the maint branch instead, or
getting org or org-plus-contrib via Org Elpa.

The master branch isn't unstable, it's perfectly fine as a daily driver,
but some features could be in flux, which could get confusing if you just
started using Org.

However I noticed that the online manual at (http://orgmode.org/manual/
> Column-width-and-alignment.html) is more compatible with that old version
> than the GIT version.
>

The online version is synced with the stable releases of Org, which I
mentioned above. It's not in sync with the version you think (7.9.3f), but
with the latest stable release 9.1.4 (as of today).

It just happens that the column shrink feature was recently (few months)
added to the Org master branch. So you don't see its reference in the
online manual. That feature will go out in the next major release of the
stable version.. 9.2.

Of course I do not expect to have a fully working manual for a changing
> system such as the GIT version,
>

You're in for a treat here :). This is Emacs, and in my experience the best
way to access the Info manuals.  The Info manuals that get built along with
Org are always in sync with the respective versions.

So,

Org master > Manuals: Info (synced with Org master)

Org maint > Manuals: Info, online (synced with Org maint)

If you haven't used Info manuals, do C-h i h to learn how to use those from
within Emacs. They are vastly better searchable than the online version.
And you always access the correct version of the Org Info manual from
within Emacs.

but in case the above manual is superseded by some other one, I'd like to
> know where it is.
>

As above, if using master branch Org, you get the correct version of the
manual from within Emacs.

PS:  I figure this newbie message is not relevant to the folks at
> emacs-orgmode@gnu.org, so I'am not CCing it there anymore.
>

As I said in the beginning of the email, don't worry. We are all here to
learn and share.

> --

Kaushal Modi


[O] Prevent auto-filling of export snippets

2017-12-08 Thread edgar

Hello,

AFAIK, you are an Org guru (or at least have much more experience than I 
do), and I know that you are asking this for the benefit of everyone. I 
just want to say:


and with auto-fill-mode enabled (70 cols), if I hit Enter at the end of 
the line, I becomes:


I recommend using visual-fill-column-mode
  ;; Wrap text
  ;; http://danlovesprogramming.com/making-text-look-good-in-org-mode/
  ;; https://caolan.org/dotfiles/emacs.html
  (use-package visual-fill-column
:ensure t)
or

  (with-eval-after-load "org"
  (require 'visual-fill-column))

and add indent mode (I didn't keep the reference to the source of this; 
this may go inside the :config part of use-package org):


(add-hook 'org-mode-hook (lambda ()
 (org-indent-mode)
 (auto-fill-mode -1)
 (visual-fill-column-mode)
 (setq visual-line-fringe-indicators 
'(left-curly-arrow right-curly-arrow))

 (visual-line-mode 1)
 ))

Can the rules in Org set to prevent auto-filling (like in Headings) be 
set for Export Snippets too?

In that way, you really don't need auto-filling.

Note: I tried to set the right snippets to get visual-fill-column-mode 
working, but I don't know if more than that is needed.


Cheers!

---
Vive la liberté!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!