emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Results with #+begin_example/#+end_example don't get overwritten
Date: Tue, 28 Nov 2017 23:24:56 +0000	[thread overview]
Message-ID: <CAFyQvY2vVV7v97Z7bv1rwzTLgHioOj=a0MxYXKbeoHdZFzCAKw@mail.gmail.com> (raw)
In-Reply-To: <87tvxeouy5.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

On Tue, Nov 28, 2017 at 6:16 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

>
> AFAICT, there is no place in the manual that explains what is the
> RESULTS keyword


OK, may be that's the first step :)

and under what circumstances it could be useful to write
> it manually.
>

No, I wasn't suggesting a use case where someone writes the #+RESULTS:
contents manually.

Here's what can happen though:

A user could have this to begin with:

=====
#+BEGIN_SRC emacs-lisp
(message "Hello")
#+END_SRC
#+RESULTS:
: Hello

| some | thing | important |
=====

Then for whatever reason, they choose to delete the RESULTS manually.. and
the blank line after that too!

=====
#+BEGIN_SRC emacs-lisp
(message "Hello")
#+END_SRC
#+RESULTS:
| some | thing | important |
=====

Now C-c C-c in the src block will wipe out the user-entered table!

=====
#+BEGIN_SRC emacs-lisp
(message "Hello")
#+END_SRC
#+RESULTS:
: Hello
=====

That's why I proposed earlier to wrap the Org generated results in
something like #+begin_results/#+end_results.

That way, Org is always sure that what it's deleting/overwriting is not
user-entered data.

The current behavior is risky, or at least should somehow be documented.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2172 bytes --]

  reply	other threads:[~2017-11-28 23:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 21:58 Results with #+begin_example/#+end_example don't get overwritten Kaushal Modi
2017-11-28 22:07 ` Kaushal Modi
2017-11-28 22:36   ` Nicolas Goaziou
2017-11-28 22:45     ` Kaushal Modi
2017-11-28 23:16       ` Nicolas Goaziou
2017-11-28 23:24         ` Kaushal Modi [this message]
2017-11-29 18:10           ` Nicolas Goaziou

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='CAFyQvY2vVV7v97Z7bv1rwzTLgHioOj=a0MxYXKbeoHdZFzCAKw@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).