emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: XeCycle <XeCycle@Gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Smarter fill-paragraph behaviour in #+XXX: comments
Date: Fri, 20 Jul 2012 15:11:13 +0800	[thread overview]
Message-ID: <87k3xy6h66.fsf@xc.laptop> (raw)
In-Reply-To: loom.20120720T012131-161@post.gmane.org

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

Paul Sexton <psexton.2a@gmail.com> writes:

> I became annoyed at how, when pressing M-Q (fill-paragraph) while in a 
> block like this:
>
> #+CAPTION: This is a really long caption that I need
> #+CAPTION: to describe my table in excruciating and unnecessary detail
>
> Org takes no account of the #+ directives and simply smooshes all the 
> lines together like this:
>
>
> #+CAPTION: This is a really long caption that I need +CAPTION: to describe my
> #table in excruciating and unnecessary detail
>
>
> So I wrote the following function. I have it bound to M-q in
> org-mode.

Instead of doing these, you can try setting adaptive-fill-regexp
and adaptive-fill-first-line-regexp.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

  reply	other threads:[~2012-07-20  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 23:55 Smarter fill-paragraph behaviour in #+XXX: comments Paul Sexton
2012-07-20  7:11 ` XeCycle [this message]
2012-07-20  9:06 ` Nicolas Goaziou
2012-07-29  8:20 ` 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

  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=87k3xy6h66.fsf@xc.laptop \
    --to=xecycle@gmail.com \
    --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 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).