From: Eric Schulte <schulte.eric@gmail.com>
To: Jarmo Hurri <jarmo.hurri@syk.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel: the disappearing hline
Date: Wed, 13 Nov 2013 07:17:04 -0700 [thread overview]
Message-ID: <8738n0b0ot.fsf@gmail.com> (raw)
In-Reply-To: 87y54ssu1r.fsf@syk.fi
Jarmo Hurri <jarmo.hurri@syk.fi> writes:
> Rick Frankel <rick@rickster.com> writes:
>
> Greetings again.
>
>> Again, the solution is to globally set the :hline property to =yes=
>> instead of the default =no=, and you will get the results you want.
>
> The issue I am trying to raise here is the consistency of the system,
> not the way to solve this particular problem. Personally I think it
> would be clearer if the handling of hlines in _output_ were consistent
> _by default_, regardless of whether the call is made by direct
> evaluation of a block; by a post(); or by a #+CALL. I found it very
> weird when I bumped into this discrepancy - in a much more complicated
> context than the examples I have shown here.
>
> But it is your system and you know what kind of qualities you want it to
> have. I am just learning the ropes and sending you a message from the
> trenches.
>
> All the best,
>
> Jarmo
>
I understand that this particular use case is confusing, however there
are competing use cases and the case described here is not the most
common.
Take for example the following.
#+name: data
| header |
|--------|
| one |
| two |
|--------|
| three |
#+BEGIN_SRC sh :var in=data
echo "$in"
#+END_SRC
#+RESULTS:
| header |
| one |
| two |
| three |
In fact, hlines are *not* preserved by default with regular code blocks.
And in practice only emacs-lisp code blocks tend to create hlines
themselves. In general babel does a good deal of hline and colnames
processing.
#+name: with-a-header
| numbers |
|---------|
| one |
| two |
| three |
| four |
Strips both the header *and* the top hline by default.
#+begin_src emacs-lisp :var in=with-a-header
(mapcar (lambda (row) (mapcar #'length row)) in)
#+end_src
#+RESULTS:
| 3 |
| 3 |
| 5 |
| 4 |
Applies the code block only to the body of the input table.
#+begin_src emacs-lisp :var in=with-a-header :colnames yes
(mapcar (lambda (row) (mapcar #'length row)) in)
#+end_src
#+RESULTS:
| numbers |
|---------|
| 3 |
| 3 |
| 5 |
| 4 |
Perhaps we should change `org-babel-default-inline-header-args' to
include `(:hlines "yes")'. If there is no push back on that change I'd
be happy to make it.
Regards,
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D
next prev parent reply other threads:[~2013-11-13 18:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 14:35 Babel: the disappearing hline Jarmo Hurri
2013-11-11 14:53 ` Thorsten Jolitz
2013-11-11 15:11 ` Jarmo Hurri
2013-11-11 15:31 ` Thorsten Jolitz
2013-11-11 16:19 ` Eric Schulte
2013-11-11 17:26 ` Jarmo Hurri
2013-11-11 17:44 ` Eric Schulte
2013-11-12 6:16 ` Jarmo Hurri
2013-11-12 15:45 ` Rick Frankel
2013-11-12 16:09 ` Jarmo Hurri
2013-11-12 19:22 ` Rick Frankel
2013-11-13 6:19 ` Jarmo Hurri
2013-11-13 14:17 ` Eric Schulte [this message]
2013-11-13 18:52 ` Rick Frankel
2013-11-13 23:27 ` Eric Schulte
2013-11-15 6:50 ` Jarmo Hurri
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738n0b0ot.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jarmo.hurri@syk.fi \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.