emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Neil Jerram <neil@ossau.homelinux.net>
To: Matt Price <moptop99@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: slack syntax exporter/copier
Date: Mon, 22 Oct 2018 22:29:04 +0100	[thread overview]
Message-ID: <87zhv5brhb.fsf@ossau.homelinux.net> (raw)
In-Reply-To: <CAN_Dec_hH+i0zuozJbg=nai=_TG0buc7yirZ0-gJfphsP_mMdg@mail.gmail.com>

Matt Price <moptop99@gmail.com> writes:

> A while ago I asked about a slack syntax exporter.  I cpy text from org to
> slack often enough that I spent an hour or two today writing a simple one,
> which I put up in a  gist:
> https://gist.github.com/titaniumbones/c0c171e4df8a6ff5f0f564b8a655c079

Nice, thank you!

> If people are interested, I will be happy to package it up & put on melpa
> or whatever (would be the first time for me).

Yes, I think it's quite likely that I would use this sometimes, so I'd
love if it was conveniently available.

Best wishes,
   Neil


> I mostly am interested in copy-paste, not in producing permanent files, so
> I use it with this simple utility function:
>
> (defun ora-org-export-to-clipboard-as-slack ()
>       "Export region to FMT, and copy to the kill ring for pasting into
> other programs."
>       (interactive)
>       (let* ((org-export-with-toc nil)
>              (org-export-with-smart-quotes nil))
>         (kill-new (org-export-as 'slack) ))
>       )
>     (global-set-key (kbd "C-c W s") 'ora-org-export-to-clipboard-as-slack)
>
> The "ora" prefix reflects its origins in an old oremacs function that I use
> for (much more involved) HTML copy-paste:
> - [[
> https://github.com/abo-abo/oremacs/commit/6c86696c0a1f66bf690e1a934683f85f04c6f34d#diff-ecff87135600df0cafffb47c303ae9c6][abo-abo's
> code from oremacs]]
> - [[
> http://kitchingroup.cheme.cmu.edu/blog/2016/06/16/Copy-formatted-org-mode-text-from-Emacs-to-other-applications/#comment-2735698988][john's
> original post]]
>
>
> SO far it seems OK. There are doubtless still bugs so probably it would be
> better to make a repo after all!

  reply	other threads:[~2018-10-22 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 20:00 slack syntax exporter/copier Matt Price
2018-10-22 21:29 ` Neil Jerram [this message]
2018-10-23  1:02   ` Matt Price
2018-11-10  2:36     ` Writing Exporter Tests [was: slack syntax exporter/copier] Matt Price

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=87zhv5brhb.fsf@ossau.homelinux.net \
    --to=neil@ossau.homelinux.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=moptop99@gmail.com \
    /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).