From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seweryn Kokot Subject: Re: Electric insert of headline stars Date: Thu, 25 Oct 2007 13:53:14 +0200 Message-ID: <878x5rpg0l.fsf@poczta.po.opole.pl> References: <3c12eb8d0710250315r633d0c9au1fdcc8c8000437b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Il1Io-000436-So for emacs-orgmode@gnu.org; Thu, 25 Oct 2007 07:55:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Il1Io-00041T-2Y for emacs-orgmode@gnu.org; Thu, 25 Oct 2007 07:55:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Il1In-000417-RV for emacs-orgmode@gnu.org; Thu, 25 Oct 2007 07:55:05 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Il1In-0002PY-8z for emacs-orgmode@gnu.org; Thu, 25 Oct 2007 07:55:05 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Il1Ik-0001aS-SU for emacs-orgmode@gnu.org; Thu, 25 Oct 2007 11:55:02 +0000 Received: from nat-warynskiego.po.opole.pl ([217.173.199.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2007 11:55:02 +0000 Received: from s.kokot by nat-warynskiego.po.opole.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Oct 2007 11:55:02 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org "Piotr Zielinski" 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