From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: How to make a non-GPL Org-mode exporter? Date: Mon, 27 Jul 2015 18:32:54 +0200 Message-ID: <87io95v9vt.fsf@mbork.pl> References: <87pp3dvm18.fsf@mbork.pl> <55B63902.7060800@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJlKz-0002FR-4O for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJlKv-00023x-G1 for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:33:13 -0400 Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:37449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJlKv-00023B-5E for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:33:09 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id A83EB8F2004 for ; Mon, 27 Jul 2015 18:33:04 +0200 (CEST) Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YIfd+2n1NSD1 for ; Mon, 27 Jul 2015 18:33:00 +0200 (CEST) Received: from localhost (unknown [109.232.24.146]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 9F3598F2003 for ; Mon, 27 Jul 2015 18:32:59 +0200 (CEST) In-reply-to: <55B63902.7060800@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 2015-07-27, at 15:58, Scott Randby 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