From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Re: Comments in Org-mode Date: Wed, 15 Jul 2009 19:15:42 +0200 Message-ID: <87iqhtq341.fsf@kassiopeya.MSHEIMNETZ> References: <20090715000930.GC4210@laflaca.Stanford.EDU> <20090715004451.GB21248@thinkpad.adamsinfoserv.com> <877hya7nnf.fsf@kassiopeya.MSHEIMNETZ> <927aeeaf0907142045o10d4a246p95c4f6b979921449@mail.gmail.com> <20090715045229.GA1761@thinkpad.adamsinfoserv.com> <20524da70907142206m1550a830p21afb1cabc9a2593@mail.gmail.com> <927aeeaf0907142223q726152e6kbc95c0d2c777e2d4@mail.gmail.com> <877hyaqajv.fsf@fastmail.fm> 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 1MR814-0001io-3v for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 13:11:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR80z-0001dL-AL for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 13:11:37 -0400 Received: from [199.232.76.173] (port=45596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR80z-0001d3-2y for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 13:11:33 -0400 Received: from mail.gmx.net ([213.165.64.20]:35528) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MR80y-0002Vc-9u for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 13:11:32 -0400 In-Reply-To: <877hyaqajv.fsf@fastmail.fm> (Matthew Lundin's message of "Wed, 15 Jul 2009 09:35:00 -0500") 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: Matthew Lundin Cc: amador@stanford.edu, emacs-orgmode@gnu.org Matthew Lundin writes: > Manuel Amador writes: > >> I think I have found a bug (or a feature!). Sometimes when >> writing documents I tend to comment out a line by adding a "#" >> in the column 0. However, after doing this in a line at the >> middle of the document, I get the following behavior: >> >> ------------------------------------------------------------ >> * Random stuff >> >> Some initial things. >> >> # Then I comment this line out >> >> But when I keep writing a sufficiently long line such that >> # the cursor moves to the next line, a "#" character creeps in! >> # and will keep appearing for the remainder of the document. >> ---------------------------------------------------------- > > I cannot duplicate the problem (but only partially). I experienced extra > comment lines inserted only when there was no space between the initial > comment line and the uncommented line, i.e.: > > > # Then I comment this line out > But when I keep writing a sufficiently long line such that > # the cursor moves to the next line, a "#" character creeps in! > # and will keep appearing for the remainder of the document. > > I did not experience extra comment lines in lines further down the text. I can reproduce it with `emacs -Q' here (transient-mark-mode is t in current emacs 23). The trick is to use `comment-region'. Here's the recipe: sh$ emacs -Q C-x d ~/emacs/lisp/ext/org-mode/lisp RET % m \.elc$ RET L y L y L y L y L y ... until files are loaded successfully C-x C-f file.org M-x auto-fill-mode To get the error, you must select a region: C-SPACE C-n C-n C-n M-x comment-region RET # RET Note here: the indentation is wrong. You might want to correct this, before going on (comment char not in first column). It doesn't change the behavior. Now type some `C-j' more text and see what happens. The bad thing is, once it started, it never ends. No matter where text is wrapped, you get the `#' at the start of line. Also, _no_ comment char is inserted, if add a comment by hand without a preceding new line. To try this, you'll have to restart emacs -Q weoru oeori tueportpoeiurptoeiurtopueoru toeuiroeuir topewrtoeoru toeu toe ewprou oeur poeuiopuwe rteowp ru erwoi uteo t. # Asdfsdf - NOW ADD A LOT OF TEXT TO THIS COMMENT ... Sebastian