Re: [Orgmode] Re: Electric insert of headline stars

2007-10-25 Thread Carsten Dominik
On Oct 25, 2007, at 2:11 PM, Piotr Zielinski wrote: On 25/10/2007, Seweryn Kokot <[EMAIL PROTECTED]> wrote: A minor inconvenience is a warning when compiling the code First, here's the version after Bastien's and Carsten's comments: (defun local-org-insert-stars () (interactive) (when

Re: [Orgmode] Re: Electric insert of headline stars

2007-10-25 Thread Bastien
"Piotr Zielinski" <[EMAIL PROTECTED]> writes: > This is what I came up with after following the suggestion from the > manual, but it looks complicated to me, so I don't really like it: > > (defun local-org-insert-stars () > (interactive) > (when (looking-back "^ +" (point-at-bol)) > (save-

Re: [Orgmode] Re: Electric insert of headline stars

2007-10-25 Thread Carsten Dominik
On Oct 25, 2007, at 1:53 PM, Seweryn Kokot wrote: "Piotr Zielinski" <[EMAIL PROTECTED]> writes: which of course doesn't normally work, hence this elisp code. (defun local-org-insert-stars () (interactive) (when (looking-back "^ *" (point-at-bol)) (replace-string " " "*" nil (point-at

Re: [Orgmode] Re: Electric insert of headline stars

2007-10-25 Thread Piotr Zielinski
On 25/10/2007, Seweryn Kokot <[EMAIL PROTECTED]> wrote: > A minor inconvenience is a warning when compiling the code First, here's the version after Bastien's and Carsten's comments: (defun local-org-insert-stars () (interactive) (when (looking-back "^ +" (point-at-bol)) (replace-string