From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: slack syntax exporter/copier Date: Mon, 22 Oct 2018 21:02:00 -0400 Message-ID: References: <87zhv5brhb.fsf@ossau.homelinux.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c69fd20578dae8d6" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEl4g-0007GO-8x for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 21:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEl4e-0001ga-Oe for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 21:01:34 -0400 Received: from mail-it1-x12c.google.com ([2607:f8b0:4864:20::12c]:36201) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEl4e-0001bA-3M for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 21:01:32 -0400 Received: by mail-it1-x12c.google.com with SMTP id c85-v6so15019202itd.1 for ; Mon, 22 Oct 2018 18:01:28 -0700 (PDT) In-Reply-To: <87zhv5brhb.fsf@ossau.homelinux.net> 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" Cc: Org Mode --000000000000c69fd20578dae8d6 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 22, 2018 at 5:29 PM Neil Jerram wrote: > 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. > > I've put it up in a repo: https://github.com/titaniumbones/ox-slack I don't know how to add something to Melpa so that might be a while, I think I'm running out of personal time :-) 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! > --000000000000c69fd20578dae8d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Oct 22, 2018 at 5:29 PM Neil Jerram <neil@ossau.homelinux.net> wrote:
Matt Price <moptop99@gmail.com>= writes:

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

Nice, thank you!

> If people are interested, I will be happy to package it up & put o= n 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= 9;d
love if it was conveniently available.



I don't know how to add= something to Melpa so that might be a while, I think I'm running out o= f personal time :-)

Best wishes,
=C2=A0 =C2=A0Neil


> 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 ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0"Export region to FMT, and copy to the = kill ring for pasting into
> other programs."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(interactive)
>=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 (org-export-with-smart= -quotes nil))
>=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(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 func= tion that I use
> for (much more involved) HTML copy-paste:
> - [[
> https://github.com/abo-abo/oremacs/= commit/6c86696c0a1f66bf690e1a934683f85f04c6f34d#diff-ecff87135600df0cafffb4= 7c303ae9c6][abo-abo's
> code from oremacs]]
> - [[
> http://kitchingroup.cheme.c= mu.edu/blog/2016/06/16/Copy-formatted-org-mode-text-from-Emacs-to-other-app= lications/#comment-2735698988][john's
> original post]]
>
>
> SO far it seems OK. There are doubtless still bugs so probably it woul= d be
> better to make a repo after all!
--000000000000c69fd20578dae8d6--