emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: working with tables can be quite painful...
Date: Thu, 22 Sep 2016 21:52:59 +0200	[thread overview]
Message-ID: <87d1jvk8ys.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87zin4z3u3.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Mon, 19 Sep 2016 09:33:24 +0100")

Hello,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> I cannot send the actual table I am working on as it relates to grades
> for students.  I will try to create a similar table with random
> entries.

You could also try the imperfect (make sure to eyeball the result):

  (defun scramble-contents ()
    (interactive)
    (let ((tree (org-element-parse-buffer)))
      (org-element-map tree '(code comment comment-block example-block fixed-width
                                   keyword link node-property plain-text verbatim)
        (lambda (obj)
          (cl-case (org-element-type obj)
            ((code comment comment-block example-block fixed-width keyword
                   node-property verbatim)
             (let ((value (org-element-property :value obj)))
               (org-element-put-property
                obj :value (replace-regexp-in-string "[[:alnum:]]" "x" value))))
            (link
             (unless (string= (org-element-property :type obj) "radio")
               (org-element-put-property obj :raw-link "http://orgmode.org")))
            (plain-text
             (org-element-set-element
              obj (replace-regexp-in-string "[[:alnum:]]" "x" obj)))))
        nil nil nil t)
      (let ((buffer (get-buffer-create "*Scrambled text*")))
        (with-current-buffer buffer
          (insert (org-element-interpret-data tree))
          (goto-char (point-min)))
        (switch-to-buffer buffer))))

Regards,

-- 
Nicolas Goaziou

  parent reply	other threads:[~2016-09-22 19:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 14:53 working with tables can be quite painful Eric S Fraga
2016-09-17  8:48 ` Nicolas Goaziou
2016-09-17 15:22   ` Adam Porter
2016-09-17 15:37 ` Michael Brand
     [not found] ` <9ae6591e2754413885a96e19c2455472@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-19  8:33   ` Eric S Fraga
2016-09-19 12:58     ` Michael Welle
     [not found]     ` <df2f3c4ad6a34890ad82cd1d0d557003@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-19 14:23       ` Eric S Fraga
2016-09-19 17:54         ` Michael Welle
2016-09-22 19:52     ` Nicolas Goaziou [this message]
     [not found] ` <61c781eee3b64613a40a39b95bc54e63@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-19  8:36   ` Eric S Fraga
2016-09-20  8:54 ` Jacob Nielsen
     [not found] ` <b05decb709ba4f64932ba34835b08056@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-09-20  9:03   ` Eric S 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=87d1jvk8ys.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --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).