all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Spiers <orgmode@adamspiers.org>
To: emacs-orgmode@gnu.org
Subject: Re: Easily re-indent the #+OPTIONS lines
Date: Thu, 17 Jan 2008 17:51:27 +0000	[thread overview]
Message-ID: <20080117175127.GO18716@atlantic.linksys.moosehall> (raw)
In-Reply-To: <87prw0akek.fsf@shellarchive.co.uk>

On Thu, Jan 17, 2008 at 09:09:07AM +0000, Phil Jackson wrote:
> Bastien <bzg@altern.org> writes:
> > I often fiddle around #+AUTHOR, #+TITLE, and other such lines.  But
> > having to re-align them so that it looks better is time-consuming.
> 
>  ,----
>  | (align-regexp (point-min) (point-max) "^#\\+[A-Z_]+:\\( +\\)" 1 5)
>  `----

`align-regexp' comes from align.el which also provides
`align-rules-list', a customizable variable which defines how the
DWIM `align' function behaves.  Therefore it would be even nicer if
org-mode automatically ensured that `align-rules-list' contained the
right settings for attaining this!  The following works for me when
included in `align-rules-list':

 '(org-in-buffer-settings
   (regexp . "^#\\+[A-Z_]+:\\(\\s-*\\)\\S-+")
   (modes '(org-mode)))

When I select the region and do M-x align, it does the right thing.

So the code could check whether there is an entry with this title
`org-in-buffer-settings' in the list, and if not, add it - thereby
allowing personal customization to override the automatically provided
default.

      reply	other threads:[~2008-01-17 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 22:34 Easily re-indent the #+OPTIONS lines Bastien
2008-01-17  9:09 ` Phil Jackson
2008-01-17 17:51   ` Adam Spiers [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080117175127.GO18716@atlantic.linksys.moosehall \
    --to=orgmode@adamspiers.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.