From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: can the symbol for leading stars be changed? Date: Mon, 16 Mar 2009 11:04:33 +0100 Message-ID: <878wn5g4we.fsf@thinkpad.tsdh.de> References: 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 1Lj9gj-0000pX-Bh for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 06:04:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lj9gf-0000p3-S9 for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 06:04:53 -0400 Received: from [199.232.76.173] (port=37215 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lj9gf-0000p0-O1 for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 06:04:49 -0400 Received: from main.gmane.org ([80.91.229.2]:35493 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 1Lj9gf-0003j6-7C for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 06:04:49 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Lj9gZ-0004Wt-Jp for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 10:04:43 +0000 Received: from dhcp115.uni-koblenz.de ([141.26.71.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Mar 2009 10:04:43 +0000 Received: from tassilo by dhcp115.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Mar 2009 10:04:43 +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 Gray Calhoun writes: Hi Gray, > Is there a way for users to easily replace the leading stars with > another symbol? In particular, I want to replace the '*' with '#' so > that I use org mode to write pseduocode for R in outline form -- R > uses # to designate comments and this would ensure that the headers > wouldn't be read as code. I guess you want to use `orgstruct-mode' in R files, right? I also had the idea to do that, but till now I failed. As a workaround I use `outline-minor-mode' and set the `outline-regexp' to . Here's the code from my .emacs. --8<---------------cut here---------------start------------->8--- (defun th-outline-regexp () "Calculate the outline regexp for the current mode." (let ((comment-starter (replace-regexp-in-string "[[:space:]]+" "" comment-start))) (when (string= comment-start ";") (setq comment-starter ";;")) (concat "^" comment-starter "\\*+"))) (defun th-outline-minor-mode-init () (interactive) (setq outline-regexp (th-outline-regexp))) (add-hook 'outline-minor-mode-hook 'th-outline-minor-mode-init) --8<---------------cut here---------------end--------------->8--- I wonder if I cannot make `orgstruct-mode' work the same way. I've always thought that it uses `outline-regexp' for the cycling and stuff, but maybe I'm wrong. What's the correct regexp that's used for `org-cycle'? `org-complex-heading-regexp'? Bye, Tassilo