emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to make a non-GPL Org-mode exporter?


From: Marcin Borkowski
Subject: Re: [O] How to make a non-GPL Org-mode exporter?
Date: Mon, 27 Jul 2015 18:32:54 +0200

On 2015-07-27, at 15:58, Scott Randby <address@hidden> wrote:

> On 07/27/2015 08:10 AM, Marcin Borkowski wrote:
>>
>> Please refrain from comments about my stupidity or stupidity of the
>> so-called IP law.  And please understand that if I'm sounding a bit
>> angry in this email, it's because I'm *very* angry about this whole
>> lawyer mafia restricting my freedom (again).  (Note: I'm all for
>> restricting people's freedom when there are important reasons for that.
>> I just consider this situation not to be one of these.)
>>
>
> If I understand correctly, you wish to use code that other people have 
> written and published under the GPL. These people made the free choice 
> put the conditions of the GPL on the code. I don't see how it is 
> anything other than improper to reuse the code in a public domain 
> setting. I prefer to respect the choices of the code's writers.

I'm afraid that you didn't understand correctly, and I'm sorry for being
too vague.  Let me include an example.

--8<---------------cut here---------------start------------->8---
(defcustom ox-my-cool-menu-key ?o
  "The dispatch key for the My-Cool exporter in the exporter
menu.")

(org-export-define-backend 'my-cool
  '((italic . org-my-cool-italic)
    (bold . org-my-cool-bold)
    (plain-list . org-my-cool-plain-list)
    (item . org-my-cool-item)
    (link . org-my-cool-link)
    (headline . org-my-cool-headline)
    (line-break . org-my-cool-line-break)
    (horizontal-rule . org-my-cool-horizontal-rule)
    (table . org-my-cool-table)
    (table-row . org-my-cool-table-row)
    (table-cell . org-my-cool-table-cell)
    (example-block . org-my-cool-example-block)
    (paragraph . org-my-cool-paragraph)
    (plain-text . org-my-cool-plain-text)
    (section . org-my-cool-section)
    (template . org-my-cool-template))
  :export-block "MY-COOL"
  :menu-entry `(,ox-my-cool-menu-key "Export to My-Cool"
                                    ((?O "As buffer" 
org-my-cool-export-as-my-cool)
                                     (?o "As file" 
org-my-cool-export-to-my-cool))))

(defun org-my-cool-paragraph (paragraph contents info)
  "Transcode PARAGRAPH element into My-Cool format.
CONTENTS is the paragraph contents.  INFO is a plist used as
a communication channel."
  contents)

(defun org-my-cool-plain-text (text info)
  "Transcode a TEXT string from Org to My-Cool.
TEXT is the string to transcode.  INFO is a plist holding
contextual information."
  text)

(defun org-my-cool-section (section contents info)
  "Transcode a SECTION element from Org to My-Cool.
CONTENTS holds the contents of the section.  INFO is a plist
holding contextual information."
  contents)

(defun org-my-cool-template (contents info)
  "Return complete document string after LaTeX conversion.
CONTENTS is the transcoded contents string.  INFO is a plist
holding export options."
  contents)

(defun org-my-cool-italic (italic contents info)
  "Transcode ITALIC from Org-mode to My-Cool."
  (concat "'" contents "'"))

(defun org-my-cool-bold (bold contents info)
  "Transcode BOLD from Org-mode to My-Cool."
  (concat "''" contents "''"))

(defun org-my-cool-plain-list (plain-list contents info)
  "Transcode PLAIN-LIST to My-Cool."
  contents)

(defun org-my-cool-export-as-my-cool
  (&optional async subtreep visible-only body-only ext-plist)
  "Export current buffer as an My-Cool buffer."
  (interactive)
  (org-export-to-buffer 'my-cool "*Org My-Cool Export*"
    async subtreep visible-only body-only ext-plist (lambda ()
                                                      (when (fboundp 
#'my-cool-mode) (my-cool-mode)))))
--8<---------------cut here---------------end--------------->8---

The above fragment was written by means of taking (a fragment of)
ox-latex, removing all LaTeX-related parts and filling in my ones (of
course, this one is rather silly).  Assume now that these functions will
be expanded when needed by code generating suitable output.

If I were an author of a (more sophisticated than the above) exporter,
and someone would want to take it, put the "meat" aside, leave the
"skeleton" (as above), fill it with his/her code and publish it under
whatever license s/he wanted, I wouldn't see anything improper about it.
(I *might* expect to be asked first, though, but this would be matter of
politeness, but probably not ethics, and definitely not law.  OTOH,
I probably *would* expect the author to include a short note, like
saying "This code is modelled after ox-whatever.")  I cannot see how
using my code in such a way would be irrespectful.

Actually, such a situation took place a few months ago, though not with
any Elisp code, but with a LaTeX document I published on my website
(someone wanted to take my document, leave the preamble and markup
commands defined by me, and put his contents inside).  He asked me if
I'm fine with it, and my answer was "Of course".  He then proceeded to
ask me how exactly the code is licensed, which I considered a nuisance;
I told him to treat it as CC-licensed (under one of the CC licenses,
I don't recall which one now), just to make him stop asking silly
questions.  (He then proceeded to complain that code should not be
licensed using CC licenses; I wrote back very shortly and ignored him
from that point, since I didn't feel like wasting time on nitpicking).

I am astonished that someone could react differently, especially that
the code is supposed to be "free".  The only regret I have is that
I shouldn't have ignored the guy, but explain (as politely as I can,
which probably means moderately politely at best...) that he's making
fool of himself, since I can license *my* code in whichever way I want,
and besides nobody really cares anyway.

> Scott Randby

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]