From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org capture contexts not working? Date: Sun, 20 Apr 2014 08:44:23 +0200 Message-ID: <87a9bgqz3s.fsf@bzg.ath.cx> References: <87d2gcwqp1.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WblUQ-0007tC-8H for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 02:44:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WblUK-0000vs-EH for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 02:44:34 -0400 Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]:54811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WblUK-0000vl-6Z for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 02:44:28 -0400 Received: by mail-we0-f172.google.com with SMTP id t61so2827344wes.31 for ; Sat, 19 Apr 2014 23:44:27 -0700 (PDT) In-Reply-To: <87d2gcwqp1.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 20 Apr 2014 13:20:24 +0800") 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: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hi Eric, Eric Abrahamsen writes: > This was slightly mis-aligned in the source file, leading me to believe > it's just a nesting error. As it is, any template which *isn't using* > the not-in-file predicate is going to flag as acceptable for the current > context. I think it should just be: > > (when (and (eq (car rr) 'not-in-file) > (buffer-file-name)) > (not (string-match (cdr rr) (buffer-file-name)))) > > Testing indicates it works, am I missing anything? You are not! You just nailed down something quite not obvious. I applied the change in maint, thanks a lot for tracking this, -- Bastien