From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Removing (modify-syntax-entry ?# "<") Date: Fri, 18 Jun 2010 09:11:38 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50745 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPWLn-0004yc-Jf for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 03:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPWLl-0001Wh-Tm for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 03:50:55 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:42204) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPWLl-0001WF-Na for emacs-orgmode@gnu.org; Fri, 18 Jun 2010 03:50:53 -0400 Received: by mail-ww0-f41.google.com with SMTP id 34so650527wwb.0 for ; Fri, 18 Jun 2010 00:50:53 -0700 (PDT) In-Reply-To: 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: Leo Cc: emacs-orgmode@gnu.org Hi Leo, I have now applied this patch - hopefully it will do the right thing. Thank you for your persistence in trying to fix this old and super- annoying bug. - Carsten On Jun 7, 2010, at 1:12 PM, Leo wrote: > Hello Carsten, > > Setting a comment starter without a corresponding comment ender is > problematic and the # creeps in mysteriously under auto-fill. For > example, in my current running emacs, this happens almost certainly in > all org files that has # in their header. The only (temporary) > solution > seems to reboot emacs (which is painful and disruptive). > > If you try eval (forward-comment 1) at the beginning of an org file > that > has some "#+..." it will move to the end of file (the whole file is > regarded as one single comment). So when auto-fill a long text, it > will > find the common prefix to be #. > > In addition, I don't think org mode has clear comment syntax or > ideas on > what to do with it. > > I can't see any gain from (modify-syntax-entry ?# "<") so I am > proposing > removing it entirely and get rid of this mysterious and annoying bug > once and for all. > > The attached patch may (though I think it is quite safe) cause some > bugs > but those will be fixable unlike the one mentioned above. > > Best wishes, > > Leo > > > diff --git a/lisp/org/org.el b/lisp/org/org.el > index aae49fa..bb36ed8 100644 > --- a/lisp/org/org.el > +++ b/lisp/org/org.el > @@ -4208,7 +4208,6 @@ The following commands are available: > (org-set-tag-faces 'org-tag-faces org-tag-faces)) > ;; Calc embedded > (org-set-local 'calc-embedded-open-mode "# ") > - (modify-syntax-entry ?# "<") > (modify-syntax-entry ?@ "w") > (if org-startup-truncated (setq truncate-lines t)) > (org-set-local 'font-lock-unfontify-region-function > @@ -4237,7 +4236,7 @@ The following commands are available: > 'org-block-todo-from-checkboxes)) > > ;; Comment characters > -; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping > + (org-set-local 'comment-start "#") > (org-set-local 'comment-padding " ") > > ;; Align options lines > > > > -- > CCL-USER> (if you fail to plan (plan to fail)) > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten