emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Hsiu-Khuern Tang <tangoh@gmail.com>
To: Nick Dokos <nicholas.dokos@hp.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Bug: source code editing using C-c ' (org-edit-special) eats characters
Date: Tue, 23 Oct 2012 14:16:09 -0700	[thread overview]
Message-ID: <20121023211606.GB21957@localhost> (raw)
In-Reply-To: <7429.1351024314@alphaville.americas.hpqcorp.net>

* On Tue 04:31PM, 23 Oct 2012, Nick Dokos (nicholas.dokos@hp.com) wrote:
> Hsiu-Khuern Tang <tangoh@gmail.com> wrote:
> 
> > Hi,
> > 
> > Sorry if this has been reported -- a brief search didn't turn up anything.
> > 
> > Start with this 3-line org file:
> > 
> > --------------------------------------------------
> > #+begin_example
> > 
> > #+end_example
> > --------------------------------------------------
> > 
> > Do these steps:
> > - go to the 2nd line
> > - type C-c ' to edit the source example
> > - type some text in the new buffer, such as "test"
> > - type C-c ' to exit
> > 
> > What I get is this:
> > --------------------------------------------------
> > #+begin_example  test#+end_example
> > --------------------------------------------------
> > 
> > Anyone else able to reproduce this?
> > 
> 
> ...
> It depends on what you type exactly: typing "test" with no extra
> newlines produces the result above for me. If I add newlines, I get
> "funny-looking" results with the #+END_EXAMPLE indented some.
> 
> Since it does not know a language, the buffer is in fundamental mode
> and you get (modulo funny indentation perhaps) whatever you type.
> 
> Nick

Thanks for checking.  The problem also shows up if I replace begin_example by begin_src r (say), so it's not just because Org doesn't know the language.

Also, if I start with

--------------------------------------------------
#+begin_example
#+end_example
--------------------------------------------------

and repeat the above steps (but typing C-c ' on the /first/ line), the output becomes

--------------------------------------------------
#+begin_exampl  test
  +end_example
--------------------------------------------------

Note that the last "e" of "begin_example" got dropped!

-- 
Best,
Hsiu-Khuern.

  parent reply	other threads:[~2012-10-23 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 18:03 Bug: source code editing using C-c ' (org-edit-special) eats characters Hsiu-Khuern Tang
2012-10-23 20:07 ` Myles English
2012-10-23 20:31 ` Nick Dokos
2012-10-23 21:04   ` myles english
2012-10-23 21:16   ` Hsiu-Khuern Tang [this message]
2012-10-25  8:53 ` Bastien
2012-10-30 17:20   ` Hsiu-Khuern Tang
2012-11-07 13:38   ` Andy Moreton
2012-11-07 23:02     ` Eric S Fraga
2012-11-08  3:20       ` Eric S Fraga
2012-11-08 13:04       ` Andy Moreton
2012-11-08 17:27         ` Eric Schulte
2012-11-09  3:19           ` Eric Fraga

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=20121023211606.GB21957@localhost \
    --to=tangoh@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).