emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roger Mason <rmason@mun.ca>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Re: return column from table as a column
Date: Sat, 14 Aug 2021 08:00:11 -0230	[thread overview]
Message-ID: <y65lf54iaj0.fsf@mun.ca> (raw)
In-Reply-To: <87fsvd6zg1.fsf@posteo.net>

Hello Juan,

Juan Manuel Macías writes:

> You're welcome. Just a minor fix: although the code works fine,
> naturally the asterisk in `let' was unnecessary. This is a new version
> with the code explained, in case you find it useful:
>
> #+begin_src emacs-lisp :var data=s1 col=3
>   (let* (
> 	 ;; return a list from elemens in column number `col'
> 	 (list-from-column (mapcar (lambda (r) (format "%s" (nth col r))) data))
> 	 ;; make a list of lists = a new table that contains one single column
> 	 (new-table (mapcar 'list list-from-column)))
>     new-table)
> #+end_src

Many thanks for this.  A looong time ago I was capable of programming in
emacs-lisp.  Alas I have not maintained my skills.

Best wishes,
Roger


  reply	other threads:[~2021-08-14 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 14:17 return column from table as a column Roger Mason
2021-08-13 14:30 ` Greg Minshall
2021-08-13 16:24   ` Roger Mason
2021-08-13 18:47   ` Greg Minshall
2021-08-13 14:47 ` Juan Manuel Macías
2021-08-13 16:32   ` Roger Mason
2021-08-13 17:12     ` Juan Manuel Macías
2021-08-14 10:30       ` Roger Mason [this message]
2021-08-14 12:10 ` Maxim Nikulin
2021-08-17 20:42   ` Roger Mason

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=y65lf54iaj0.fsf@mun.ca \
    --to=rmason@mun.ca \
    --cc=emacs-orgmode@gnu.org \
    /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).