From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: org-player and switch to lexical binding in org.el Date: Mon, 1 Feb 2016 08:57:26 +0100 Message-ID: References: <877fj8j5wx.fsf@nicolasgoaziou.fr> <87oac4a4v2.fsf@nicolasgoaziou.fr> <877fiqhcgw.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ9MX-0001zz-CS for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 02:57:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQ9MW-00050L-CG for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 02:57:29 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:34929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ9MW-00050B-5Q for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 02:57:28 -0500 Received: by mail-wm0-x234.google.com with SMTP id r129so57088920wmr.0 for ; Sun, 31 Jan 2016 23:57:27 -0800 (PST) In-Reply-To: <877fiqhcgw.fsf@nicolasgoaziou.fr> 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: Org Mode , Paul Sexton Hi Nicolas and Paul On Sun, Jan 31, 2016 at 12:30 AM, Nicolas Goaziou wrote: > Michael Brand 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