emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>, Paul Sexton <psexton.2a@gmail.com>
Subject: Re: org-player and switch to lexical binding in org.el
Date: Mon, 1 Feb 2016 08:57:26 +0100	[thread overview]
Message-ID: <CALn3zojzqVpBATtdkNi=6baLJ8z3uLMgGZ1_Kf5giHi5SCU-Tw@mail.gmail.com> (raw)
In-Reply-To: <877fiqhcgw.fsf@nicolasgoaziou.fr>

Hi Nicolas and Paul

On Sun, Jan 31, 2016 at 12:30 AM, Nicolas Goaziou
<mail@nicolasgoaziou.fr> wrote:

> Michael Brand <michael.ch.brand@gmail.com> writes:
>
>> Only slowly I begin to get it partially. My observation is that if the
>> current `org-open-file' would be changed to
>>
>>     (eval cmd
>>           ;; LEXICAL argument.
>>           `((file . ,(convert-standard-filename file))
>>             (link . ,dlink)))
>
> Actually, that should be (eval cmd t). Providing an alist is not
> necessary here.
>
>> to provide also the `link' symbol then a
>>
>>     (add-to-list 'org-file-apps
>>                  (cons (concat org-player-file-extensions-regexp
>>                                "::\\([0-9]+:[0-9]+\\(:[0-9]+\\)?\\)")
>>                        '(org-player-play-file file (match-string 1 link))))
>>
>> which is simple enough for me to understand in org-player.el works.
>> This situation looks favorable to me at least for a first step because
>> it would mean a version of org-player.el that remains compatible with
>> "any" Org before lexical binding in org.el
>> (release_8.3.3-426-g1f49e9f) but would also become compatible again
>> starting with one of the next commits in Org master.
>>
>> Do I understand correct that this would not break any backward
>> compatibility with all other existing and correct use of
>> `org-file-apps'?
>
> Although it does the job, it would leave an `eval' in the code base,
> which is not very pretty, and more difficult to maintain (scope is less
> obvious). That's why I prefer the functions. Of course, it may not be
> worth the trouble if introduced backward incompatibility is really
> nasty.

I see the pros and cons of either solution with a slight bias to not
break backward compatibility and am OK with what you and others
decide.

(Corrigenda: In my code examples earlier in this thread I should have
used `link' instead of `dlink' which is ~(downcase link)~.)

Michael

  reply	other threads:[~2016-02-01  7:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 18:58 org-player and switch to lexical binding in org.el Michael Brand
2016-01-17 20:40 ` Nicolas Goaziou
2016-01-17 21:02   ` Michael Brand
2016-01-17 21:05   ` Michael Brand
     [not found]     ` <CAK5Vzd2aV7WGGVr=+VF-LCCDCOZXJzUYEnCgbuzgGea4i5BR7Q@mail.gmail.com>
2016-02-07 11:49       ` Michael Brand
2016-01-28 11:37   ` Michael Brand
2016-01-29 13:32     ` Nicolas Goaziou
2016-01-29 20:39       ` Michael Brand
2016-01-30 23:30         ` Nicolas Goaziou
2016-02-01  7:57           ` Michael Brand [this message]
2016-02-03 17:33             ` Nicolas Goaziou
2016-02-03 20:41               ` Michael Brand
2016-02-03 20:56                 ` Nicolas Goaziou
2016-02-03 22:02                   ` Michael Brand
2016-02-04  8:36                     ` Nicolas Goaziou
2016-02-04 11:44                       ` Michael Brand
2016-02-04 12:46                         ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALn3zojzqVpBATtdkNi=6baLJ8z3uLMgGZ1_Kf5giHi5SCU-Tw@mail.gmail.com' \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=psexton.2a@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).