emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Martin Pohlack <mp26@os.inf.tu-dresden.de>
To: org-mode <emacs-orgmode@gnu.org>
Subject: Re: Question: org-remember and level>1 target headline
Date: Thu, 13 May 2010 17:48:22 +0200	[thread overview]
Message-ID: <4BEC1F46.10205@os.inf.tu-dresden.de> (raw)
In-Reply-To: <4BE920E9.5090109@os.inf.tu-dresden.de>

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

  reply	other threads:[~2010-05-13 15:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BEC1F46.10205@os.inf.tu-dresden.de \
    --to=mp26@os.inf.tu-dresden.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).