From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: var `date' lacks a prefix warnings Date: Fri, 27 Apr 2012 21:17:40 +0100 Message-ID: References: <87mx5xvwfi.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNrc5-0008ES-MD for emacs-orgmode@gnu.org; Fri, 27 Apr 2012 16:17:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNrc3-0004na-8R for emacs-orgmode@gnu.org; Fri, 27 Apr 2012 16:17:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:50257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNrc3-0004n6-1H for emacs-orgmode@gnu.org; Fri, 27 Apr 2012 16:17:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SNrc0-0002e1-Af for emacs-orgmode@gnu.org; Fri, 27 Apr 2012 22:17:52 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Apr 2012 22:17:52 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Apr 2012 22:17:52 +0200 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 Hi Achim Achim Gratz writes: > Martyn Jago writes: >> Regarding the remaining Org-mode `lacks a prefix' warnings and >> particularly in light of the recent message on emacs.devel [1] would it >> not be sufficient to simply alias date and entry locally: >> >> (defvaralias 'org--date 'date) >> (defvaralias 'org--entry 'entry) > > That doesn't work, AFAIK: defvaralias binds the symbol (it looks up > what is behind the symbol and creates another symbol for it), but > dynamic scoping does not (you look up what's behind the symbol each time > you use it). The problem is that when a symbol gets dynamically scoped > it cannot be used as a lexical symbol after that, so any code that uses > "date" and "entry" after the defvar doesn't get a lexcial binding. You > would need a language construct that would let you capture a symbol > dynamically, internalize it (in essence it would be renaming that symbol > in some scope) and then erase all traces of that symbol having been > symbolically scoped so that it can be used lexically again. I don't > think anything like that currently exists. I appreciate `defvaralias' doesn't work nicely with lexical variables, but I am assuming somewhat that we are talking about dynamic variables here? If the global date / entry are dynamic then the dynamic `defvaralias' alias will also be dynamic, and any prior use of the dynamic variable will surely be a dynamic binding? I'm going to do some further testing anyway, since I'm interested, but so far things appear to work. >> p.s. I should point out that my personal view is that a serious well >> maintained Emacs library such as Org-mode should have a zero warning >> policy for official releases. > > Here's a problem that originates outside of our control. At the very > least, we can't fix it just in org. I agree we can't fix the source of the problem but IF we can fix the warning by removing `lack of prefixes' in Org-mode, then we have demonstrated that we acknowledge the warning and have dealt with it. In other words, if we can fix the problem within Org-mode we are not propagating the problem. If we don't, then perhaps we didn't fix the warning because we don't fix warnings. However, it may indeed be impossible to fix as you pointed out! Best, Martyn