From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Question: org-remember and level>1 target headline Date: Mon, 10 May 2010 19:40:19 +0200 Message-ID: <4BE84503.3020008@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=43676 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBWy4-00078U-3v for emacs-orgmode@gnu.org; Mon, 10 May 2010 13:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBWxu-000107-LI for emacs-orgmode@gnu.org; Mon, 10 May 2010 13:40:35 -0400 Received: from os.inf.tu-dresden.de ([141.76.48.99]:55892) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBWxu-0000zu-Fv for emacs-orgmode@gnu.org; Mon, 10 May 2010 13:40:26 -0400 Received: from [217.9.48.20] (helo=[165.204.15.163]) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71) id 1OBWxr-0002IW-Rx for emacs-orgmode@gnu.org; Mon, 10 May 2010 19:40:24 +0200 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 all, to practically prevent merge conflicts between the different machines that I use I want to capture new items not directly under the global "Inbox" headline, but under "Inbox/$HOSTNAME". For example, I often capture new items on my desktop and my notebook and later sync. The new items will always conflict as they are placed as last child of "Inbox". I now switched my org-remember templates from statically specifying "Inbox" as target headline to a helper function: ---------------------------------------------------------------------- (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))) ---------------------------------------------------------------------- The problem now is that I would like the target to be: * Inbox *** $HOSTNAME ***** new item Instead, I get this: * Inbox/$HOSTNAME *** new items My question now is how to specify the headline hierarchy here? Cheers, Martin