From: Leslie Watter <leslie@watter.net>
To: "Berry, Charles" <ccberry@health.ucsd.edu>
Cc: Simon Butler <simon@floss.nu>,
emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>,
Lawrence Bottorff <borgauf@gmail.com>
Subject: Re: Best way to template a big table
Date: Thu, 12 Dec 2019 22:01:55 -0300 [thread overview]
Message-ID: <CAKoz4gkNvye_3Fn-o+BxzA0S+nrdKys6dxwGoOvEgktD=UT+0g@mail.gmail.com> (raw)
In-Reply-To: <414AEABC-42BD-4847-A03F-29E7EADBDD2D@ucsd.edu>
[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]
Hi all,
As I've understood you want to setup the structure of the table and have
some prompts to add rows to the table.
Using org-mode I have a capture skeleton here that uses
------- org capture template
#+begin_src elisp
;;
("Lu" "Fuel" table-line
(file+olp "~/org/TODO.org" "Car" "Fuel Control")
"|%<%Y-%m-%d> | %^{Price} | %^{ototanterior} | %^{ototatual} | |
%^{liters} | %^{RSxl} | %^{Average} | %^{GasType}|
")
#+end_src
And at TODO.org I have the following structure
#+begin_example
* Car
** Fuel Control
| Date | Price | otot anterior | otot atual | partial | Liters |
R$/l | Average | Fuel type |
|------------+---------+---------------+------------+--------------+--------+-------+-----------+-----------|
(...)
#+end_example
I've just written the structure of the table and every time I have a new
entry I use capture to fill in the table. You'll get a prompt with the name
of the strings asked.
Hope it helps.
Cheers,
LEslie
On Thu, Dec 12, 2019 at 3:33 PM Berry, Charles <ccberry@health.ucsd.edu>
wrote:
>
>
> > On Dec 12, 2019, at 8:03 AM, Lawrence Bottorff <borgauf@gmail.com>
> wrote:
> >
> > I just figured out that this
> >
> > #+BEGIN_SRC emacs-lisp :results table
> > '((H1 H2 H3) (text11 text12 text13) (text21 text22 text23) (... ... ...)
> (textN1 textN2 textN3))
> > #+END_SRC
> >
> > #+RESULTS:
> > | H1 | H2 | H3 |
> > | text11 | text12 | text13 |
> > | text21 | text22 | text23 |
> > | ... | ... | ... |
> > | textN1 | textN2 | textN3 |
> >
> > is probably a better way all around, i.e., "best practice." If any one
> knows how to get the horizontal lines added in. . . .
>
>
> Add an `hline' in the right place. Like this:
>
> #+BEGIN_SRC emacs-lisp :results table
> '((H1 H2 H3) hline (text11 text12 text13) (text21 text22 text23) (... ...
> ...) (textN1 textN2 textN3))
> #+END_SRC
>
> HTH,
>
> Chuck
>
>
--
Leslie H. Watter
[-- Attachment #2: Type: text/html, Size: 2983 bytes --]
prev parent reply other threads:[~2019-12-13 1:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 6:05 Best way to template a big table Lawrence Bottorff
2019-12-12 11:26 ` Simon Butler
2019-12-12 16:03 ` Lawrence Bottorff
2019-12-12 18:29 ` Berry, Charles
2019-12-13 1:01 ` Leslie Watter [this message]
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='CAKoz4gkNvye_3Fn-o+BxzA0S+nrdKys6dxwGoOvEgktD=UT+0g@mail.gmail.com' \
--to=leslie@watter.net \
--cc=borgauf@gmail.com \
--cc=ccberry@health.ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=simon@floss.nu \
/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).