[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Electric insert of headline stars
From: |
Seweryn Kokot |
Subject: |
[Orgmode] Re: Electric insert of headline stars |
Date: |
Thu, 25 Oct 2007 13:53:14 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
"Piotr Zielinski" <address@hidden> 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-bol) (point)))
> (insert "*"))
>
> (define-key org-mode-map "*" 'local-org-insert-stars)
>
Very nice idea!
A minor inconvenience is a warning when compiling the code
.emacs:2604:30:Warning: `replace-string' used from Lisp code
That command is designed for interactive use only.
How to get rid of this?
regards,
--
Seweryn Kokot