From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: slack syntax exporter/copier Date: Mon, 22 Oct 2018 16:00:50 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000073d9fd0578d6b340" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEgcm-0003KM-IT for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 16:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEgN3-0005iC-Ph for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 16:00:14 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:42295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEgN3-0005hw-JJ for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 16:00:13 -0400 Received: by mail-io1-xd2b.google.com with SMTP id n18-v6so27812359ioa.9 for ; Mon, 22 Oct 2018 13:00:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --00000000000073d9fd0578d6b340 Content-Type: text/plain; charset="UTF-8" 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 If people are interested, I will be happy to package it up & put on melpa or whatever (would be the first time for me). 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! --00000000000073d9fd0578d6b340 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A = while ago I asked about a slack syntax exporter.=C2=A0 I cpy text from org = to slack often enough that I spent an hour or two today writing a simple on= e, which I put up in a=C2=A0 gist:

If people are interested, I will be happy to package it up & pu= t on melpa or whatever (would be the first time for me).
I mostly am interested in copy-paste, not in producing permanen= t files, so I use it with this simple utility function:

=
(defun ora-org-export-to-clipboard-as-slack ()
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "Export region to FMT, and copy to the kill ring fo= r pasting into other programs."
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (int= eractive)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let* ((org-export-with-toc nil= )
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (org-export-with-smart-quotes nil))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (kill-new (org-export-as 'slack) ))
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 )
=C2=A0=C2=A0=C2=A0 (global-set-key (kbd "C-c W s&quo= t;) 'ora-org-export-to-clipboard-as-slack)

The= "ora" prefix reflects its origins in an old oremacs function tha= t I use for (much more involved) HTML copy-paste:

SO far it see= ms OK. There are doubtless still bugs so probably it would be better to mak= e a repo after all!

--00000000000073d9fd0578d6b340--