emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* slack syntax exporter/copier
@ 2018-10-22 20:00 Matt Price
  2018-10-22 21:29 ` Neil Jerram
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Price @ 2018-10-22 20:00 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]

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!

[-- Attachment #2: Type: text/html, Size: 2195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: slack syntax exporter/copier
  2018-10-22 20:00 slack syntax exporter/copier Matt Price
@ 2018-10-22 21:29 ` Neil Jerram
  2018-10-23  1:02   ` Matt Price
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Jerram @ 2018-10-22 21:29 UTC (permalink / raw)
  To: Matt Price, emacs-orgmode

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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: slack syntax exporter/copier
  2018-10-22 21:29 ` Neil Jerram
@ 2018-10-23  1:02   ` Matt Price
  2018-11-10  2:36     ` Writing Exporter Tests [was: slack syntax exporter/copier] Matt Price
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Price @ 2018-10-23  1:02 UTC (permalink / raw)
  Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

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.  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!
>

[-- Attachment #2: Type: text/html, Size: 3444 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Writing Exporter Tests [was:  slack syntax exporter/copier]
  2018-10-23  1:02   ` Matt Price
@ 2018-11-10  2:36     ` Matt Price
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Price @ 2018-11-10  2:36 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 2850 bytes --]

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 <moptop99@gmail.com> wrote:

>
>
> 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.  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!
>>
>

[-- Attachment #2: Type: text/html, Size: 4591 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-10  2:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 20:00 slack syntax exporter/copier Matt Price
2018-10-22 21:29 ` Neil Jerram
2018-10-23  1:02   ` Matt Price
2018-11-10  2:36     ` Writing Exporter Tests [was: slack syntax exporter/copier] Matt Price

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).