Re: [Orgmode] Electric insert of headline stars

2007-10-25 Thread Carsten Dominik
On Oct 25, 2007, at 12:15 PM, Piotr Zielinski wrote: Hi, Here's a small piece of elisp code that might be useful to some of you. Pressing '*' now inserts '*' as before, but if there are only spaces between the beginning of the current line and the point, then all of them are converted to st

Re: [Orgmode] Electric insert of headline stars

2007-10-25 Thread Bastien
Hi Piotr, "Piotr Zielinski" <[EMAIL PROTECTED]> writes: > (defun local-org-insert-stars () > (interactive) > (when (looking-back "^ *" (point-at-bol)) ^ ^ This should be "+", otherwise you get a message saying "Replaced 0 occurrence" when

[Orgmode] Electric insert of headline stars

2007-10-25 Thread Piotr Zielinski
Hi, Here's a small piece of elisp code that might be useful to some of you. Pressing '*' now inserts '*' as before, but if there are only spaces between the beginning of the current line and the point, then all of them are converted to stars. Useful for inserting new headlines. Longer explanaiti