From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Jerram Subject: Re: slack syntax exporter/copier Date: Mon, 22 Oct 2018 22:29:04 +0100 Message-ID: <87zhv5brhb.fsf@ossau.homelinux.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEhlA-0003YM-VP for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 17:29:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEhl7-0000NB-48 for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 17:29:12 -0400 Received: from ossau.homelinux.net ([18.217.239.99]:55310 helo=ip-172-31-40-63.us-east-2.compute.internal) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEhl6-0000Jh-VB for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 17:29:09 -0400 In-Reply-To: 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: Matt Price , emacs-orgmode@gnu.org Matt Price 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!