On Thu, Jan 17, 2008 at 09:09:07AM +0000, Phil Jackson wrote:
> Bastien <[EMAIL PROTECTED]> 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.


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to