emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Leandro Noferini <lnoferin@cybervalley.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Error exporting org file in ics format
Date: Mon, 23 Feb 2015 18:48:46 +0100	[thread overview]
Message-ID: <878ufo5xj5.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <8761aseokg.fsf@tricheco.cybervalley.org> (Leandro Noferini's message of "Mon, 23 Feb 2015 14:37:35 +0100")

Leandro Noferini <lnoferin@cybervalley.org> writes:

> What is an ECM?

French acronym for minimal complete example.

>> or even the full file if it doesn't contain sensitive information?
>
> I could send you privately, not in list: nothing really sensitive, job
> appointments but not to be indexed in the internet for the ethernity!

OK. You can also use the following function, which will produce a copy
of the original buffer, with scrambled contents

  (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))))

However make sure you can reproduce the problem on that copy first.


Regards,

      reply	other threads:[~2015-02-23 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 11:23 Error exporting org file in ics format Leandro Noferini
2015-02-23 12:45 ` Nicolas Goaziou
2015-02-23 13:37   ` Leandro Noferini
2015-02-23 17:48     ` Nicolas Goaziou [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=878ufo5xj5.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=lnoferin@cybervalley.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).