emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question: org-remember and level>1 target headline
@ 2010-05-10 17:40 Martin Pohlack
  2010-05-11  9:18 ` Martin Pohlack
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Pohlack @ 2010-05-10 17:40 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-06-22 13:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 17:40 Question: org-remember and level>1 target headline Martin Pohlack
2010-05-11  9:18 ` Martin Pohlack
2010-05-13 15:48   ` Martin Pohlack
2010-05-13 17:26     ` Eric S Fraga
2010-05-14  3:42     ` Samuel Wales
2010-05-15  6:42       ` Carsten Dominik
2010-05-18 17:39         ` Martin Pohlack
2010-05-27  9:43         ` Question: org-remember and level>1 target headline [resent] Martin Pohlack
2010-06-22 12:54           ` Carsten Dominik
2010-06-22 13:38             ` Martin Pohlack
2010-06-22 13:43               ` Carsten Dominik
2010-06-22 13:44               ` Martin Pohlack

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).