From: Martyn Jago <martyn.jago@btinternet.com> To: emacs-orgmode@gnu.org Subject: Re: Re: [BUG] Unmatched #+end-src Date: Sat, 12 Mar 2011 21:05:32 +0000 [thread overview] Message-ID: <87d3lwkq1v.fsf@btinternet.com> (raw) In-Reply-To: <87bp1gw1a4.fsf@gmail.com> Nicolas <n.goaziou@gmail.com> writes: Hi > Hello, > > Aankhen <aankhen@gmail.com> writes: > >>> --8<---------------cut here---------------start------------->8--- >>> * Unmatched #+end-src bug >>> >>> #+end_src >>> --8<---------------cut here---------------end--------------->8--- >>> >>> With the above simple org file, placing the cursor at the end of >>> #+end_src and hitting return causes emacs to hang. >>> >> The =cond= is part of a =while= loop; it just keeps looping, entering >> that branch and doing nothing (rather than moving point and picking up >> again from there). Going by the other branches, I think the correct >> thing to do is just exit the loop: > > I don't think exiting the loop that way is the right thing to do, as it > always return nil, even though the #+end_ might be in the list. > Moreover, there are other parts of the file that should also be fixed. I've supplied a patch which passes all of my tests, but I will look at providing additional tests looking at other cases within this loop since I'm currently in the habit of writing tests anyway. > > I think there are 3 options here: > > 1. Effectively stop everything, but at least throw an informative error. > 2. Consider the #+end_ as normal text after all, and resume the loop. > 3. Consider #+end_ as normal text and message the user about his syntax > problem. > > I'm not sure yet what's the best way to go, but I think option 2 is > sufficient. > > > Regards, Regards Martyn
next prev parent reply other threads:[~2011-03-12 21:05 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-12 16:56 Martyn Jago 2011-03-12 19:29 ` Aankhen 2011-03-12 20:07 ` Nicolas 2011-03-12 20:20 ` Aankhen 2011-03-12 21:05 ` Martyn Jago [this message] 2011-03-13 0:31 ` Nicolas 2011-03-13 13:49 ` Eric Schulte 2011-03-17 12:09 ` Nicolas Goaziou 2011-03-12 20:43 ` Martyn Jago 2011-03-23 17:38 ` Nicolas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87d3lwkq1v.fsf@btinternet.com \ --to=martyn.jago@btinternet.com \ --cc=emacs-orgmode@gnu.org \ --subject='Re: Re: [BUG] Unmatched #+end-src' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).