emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Prevent auto-filling of export snippets
@ 2017-12-08 16:46 Kaushal Modi
  2017-12-08 17:11 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2017-12-08 16:46 UTC (permalink / raw)
  To: emacs-org list

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

Hello,

If I have a long Export Snippet like:

@@html:This HTML <b>Export Snippet</b> will also get exported for Hugo
exports, <code>verbatim</code>.@@

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

@@html:This HTML <b>Export Snippet</b> will also get exported for Hugo
exports, <code>verbatim</code>.@@

(If it is difficult to see the difference in email, auto-filling has
inserted a hard line break before the "exports, <code>verbatim</code>.@@"
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

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

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

* Re: Prevent auto-filling of export snippets
  2017-12-08 16:46 Prevent auto-filling of export snippets Kaushal Modi
@ 2017-12-08 17:11 ` Nicolas Goaziou
  2017-12-08 17:34   ` Kaushal Modi
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-12-08 17:11 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list

Hello,

Kaushal Modi <kaushal.modi@gmail.com> writes:

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

[...]

> 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

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

* Re: Prevent auto-filling of export snippets
  2017-12-08 17:11 ` Nicolas Goaziou
@ 2017-12-08 17:34   ` Kaushal Modi
  0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-12-08 17:34 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-org list

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

On Fri, Dec 8, 2017 at 12:11 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
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

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

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

* Prevent auto-filling of export snippets
@ 2017-12-09  3:03 edgar
  0 siblings, 0 replies; 4+ messages in thread
From: edgar @ 2017-12-09  3:03 UTC (permalink / raw)
  To: emacs-orgmode

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!  

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

end of thread, other threads:[~2017-12-09  3:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 16:46 Prevent auto-filling of export snippets Kaushal Modi
2017-12-08 17:11 ` Nicolas Goaziou
2017-12-08 17:34   ` Kaushal Modi
  -- strict thread matches above, loose matches on Subject: below --
2017-12-09  3:03 edgar

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