From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Shlyakhter Subject: org-get-local-archive-location Date: Fri, 10 Sep 2010 13:20:57 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=51762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ou7HX-0005Sk-VT for emacs-orgmode@gnu.org; Fri, 10 Sep 2010 13:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ou7HX-0004N5-0C for emacs-orgmode@gnu.org; Fri, 10 Sep 2010 13:20:59 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:40228) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ou7HW-0004Mu-Qj for emacs-orgmode@gnu.org; Fri, 10 Sep 2010 13:20:58 -0400 Received: by ewy28 with SMTP id 28so2216939ewy.0 for ; Fri, 10 Sep 2010 10:20:57 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode In the routine org-get-local-archive-location, is the call to (match-string 1) at the end extraneous? Seems like you want to return org-archive-location in this case. (defun org-get-local-archive-location () "Get the archive location applicable at point." (let ((re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$") prop) (save-excursion (save-restriction (widen) (setq prop (org-entry-get nil "ARCHIVE" 'inherit)) (cond ((and prop (string-match "\\S-" prop)) prop) ((or (re-search-backward re nil t) (re-search-forward re nil t)) (match-string 1)) (t org-archive-location (match-string 1)))))))