From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gray Calhoun Subject: Re: Re: can the symbol for leading stars be changed? Date: Mon, 16 Mar 2009 12:20:58 -0700 Message-ID: References: <878wn5g4we.fsf@thinkpad.tsdh.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjIMz-0007Lq-P7 for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 15:21:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjIMu-0007Iq-EU for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 15:21:04 -0400 Received: from [199.232.76.173] (port=46909 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjIMu-0007Im-4Z for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 15:21:00 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:64333) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjIMt-0000Vm-Jb for emacs-orgmode@gnu.org; Mon, 16 Mar 2009 15:20:59 -0400 Received: by wf-out-1314.google.com with SMTP id 28so3089640wfc.24 for ; Mon, 16 Mar 2009 12:20:58 -0700 (PDT) In-Reply-To: <878wn5g4we.fsf@thinkpad.tsdh.de> 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: Tassilo Horn Cc: emacs-orgmode@gnu.org Hi Tassilo, Thanks for the suggestion -- your code worked great when I loaded it on its own, but seems to be in conflict with something else in my .emacs file, so I'll have to tinker with it a little bit. This seems like an okay temporary solution, but I may look into orgstruct proper when I have some free time. Best, --Gray 2009/3/16 Tassilo Horn : > Gray Calhoun writes: > > Hi Gray, > >> =A0 Is there a way for users to easily replace the leading stars with >> another symbol? =A0In 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? =A0I also had > the idea to do that, but till now I failed. =A0As a workaround I use > `outline-minor-mode' and set the `outline-regexp' to of the language>. > > Here's the code from my .emacs. > > --8<---------------cut here---------------start------------->8--- > (defun th-outline-regexp () > =A0"Calculate the outline regexp for the current mode." > =A0(let ((comment-starter (replace-regexp-in-string > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"[[:space:]]+" "" comm= ent-start))) > =A0 =A0(when (string=3D comment-start ";") > =A0 =A0 =A0(setq comment-starter ";;")) > =A0 =A0(concat "^" comment-starter "\\*+"))) > > (defun th-outline-minor-mode-init () > =A0(interactive) > =A0(setq outline-regexp (th-outline-regexp))) > > (add-hook 'outline-minor-mode-hook > =A0 =A0 =A0 =A0 =A0'th-outline-minor-mode-init) > --8<---------------cut here---------------end--------------->8--- > > I wonder if I cannot make `orgstruct-mode' work the same way. =A0I've > always thought that it uses `outline-regexp' for the cycling and stuff, > but maybe I'm wrong. =A0What's the correct regexp that's used for > `org-cycle'? =A0`org-complex-heading-regexp'? > > Bye, > Tassilo > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --=20 Gray Calhoun Economics Department UC San Diego http://gray.calhoun.googlepages.com/