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-- 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! 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Writing Exporter Tests [was: slack syntax exporter/copier] Date: Fri, 9 Nov 2018 21:36:51 -0500 Message-ID: References: <87zhv5brhb.fsf@ossau.homelinux.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005de899057a4655f5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLJ8K-0003zt-TQ for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:36:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLJ8J-0006l4-6w for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:36:24 -0500 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]:54978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLJ8I-0006gc-U4 for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:36:23 -0500 Received: by mail-it1-x143.google.com with SMTP id a205-v6so150287itd.4 for ; Fri, 09 Nov 2018 18:36:22 -0800 (PST) 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 Cc: Org Mode --0000000000005de899057a4655f5 Content-Type: text/plain; charset="UTF-8" OK, I have a minimal working example and would like to add some unit tests to this project, largely as a way to learn more about testing in emacs/org so that I can start writing tests for some other projects. However... I don't really understand how to build tests in org (and in fact I don't really understand ert much at all). Looks like the worg page is largely a stub. Does anyone have any hints for getting started? Like, should i be able to use ~testing/test-ox.el~ to test my exporter? I would like to start doing a better job of developing in elisp, but I am having trouble getting started on my own, so, once again, I appreciate any help you cna give! Thanks, Matt On Mon, Oct 22, 2018 at 9:02 PM Matt Price wrote: > > > 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! >> > --0000000000005de899057a4655f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK, I have a minimal working example and would like to add= some unit tests to this project, largely as a way to learn more about test= ing in emacs/org so that I can start writing tests for some other projects.= =C2=A0=C2=A0

However... I don't really understand how to build t= ests in org (and in fact I don't really understand ert much at all). Lo= oks like the worg page is largely a stub. Does anyone have any hints for ge= tting started? Like, should i be able to use ~testing/test-ox.el~ to test m= y exporter?=C2=A0

I would like to start doing a better j= ob of developing in elisp, but I am having trouble getting started on my ow= n, so, once again, I appreciate any help you cna give!=C2=A0

=
Thanks,
Matt


On Mon, Oct 22, 2018 at 9:02 P= M Matt Price <moptop99@gmail.com> wrote:


<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Matt Price <moptop99@gmail.com> wri= tes:

> 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&#= 39;m running out of 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!
--0000000000005de899057a4655f5--