From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: Question: org-remember and level>1 target headline Date: Thu, 13 May 2010 17:48:22 +0200 Message-ID: <4BEC1F46.10205@os.inf.tu-dresden.de> References: <4BE84503.3020008@os.inf.tu-dresden.de> <4BE920E9.5090109@os.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=54937 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCad7-0004xz-4T for emacs-orgmode@gnu.org; Thu, 13 May 2010 11:47:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCad3-0003Kq-Rf for emacs-orgmode@gnu.org; Thu, 13 May 2010 11:47:20 -0400 Received: from os.inf.tu-dresden.de ([141.76.48.99]:55597) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCad3-0003Ju-If for emacs-orgmode@gnu.org; Thu, 13 May 2010 11:47:17 -0400 Received: from [84.179.254.98] (helo=[192.168.2.100]) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71) id 1OCad0-0003Pv-39 for emacs-orgmode@gnu.org; Thu, 13 May 2010 17:47:14 +0200 In-Reply-To: <4BE920E9.5090109@os.inf.tu-dresden.de> 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: org-mode Hi, interest in this problem was indicated to me in private mail, so let my sum up my findings so far. I walked through the code in org-remember.el:org-remember-handler. There seems to be no support for path traversal for the non-interactive case. The first headline matching is found regardless of its depth. I now use the following structure for my plan files: * Inbox *** Inbox:host1 *** Inbox:host2 *** Inbox:host3 I use these two functions for computing the current target headline: ---------------------------------------------------------------------- (defun my-host-name () "Returns the name of the current host minus the domain." (let ((hostname (downcase (system-name)))) (save-match-data (substring hostname (string-match "^[^.]+" hostname) (match-end 0))))) (defun my-org-remember-headline () (concatenate 'string "Inbox:" (my-host-name))) ---------------------------------------------------------------------- In one of the interactive paths in org-remember-handler, org-refile infrastructure is used for inquiring a target from the user. When refiling, "/" in headline names are replaced with "\". Verbatim "\" in headlines are also presented as "\". That means that "test/test" and "test\test" cannot be distinguished for refiling. Is there a specification of what are valid characters in a headline? Is there interest to define remember targets via paths or via ID? Cheers, Martin