emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Ken Mankoff <mankoff@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: IDs w/ human friendly component
Date: Sun, 2 Feb 2014 12:47:49 -0500	[thread overview]
Message-ID: <CAJ51ETqLmkw7kPAc24AfoHt_RoRS5CNmZr3Q2n3boSfqUW0t7A@mail.gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.00.1402021210270.46505@tbetbambyn>

[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]

you can put some kind of prefix on like this:

* intro to a section
  :PROPERTIES:
  :ID:       intro-to-a:0f141497-f3ad-488a-b8c9-0a5c3ea53ba0
  :END:

#+BEGIN_SRC emacs-lisp
(defun get-my-id ()
  "create an org-id with prefix based on headline"
  (let ((s))
    (setq s
      (replace-regexp-in-string
       " " "-"
       (nth 4 (org-heading-components))))
    (org-id-get
     (point)
     t
     (substring
      s
      0
      (if (> (length s) 10) 10
    (length s))))))

(get-my-id)
#+END_SRC

#+RESULTS:
: intro-to-a:0f141497-f3ad-488a-b8c9-0a5c3ea53ba0



John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sun, Feb 2, 2014 at 12:10 PM, Ken Mankoff <mankoff@gmail.com> wrote:

>
> Yes that is a fairly simple and obvious solution.
>
>   -k.
>
> On Sun, 2 Feb 2014, Daniel Clemente wrote:
>
>
>> Have you tried changing the strange ID to the ID that you want? (e.g.
>> 7f3b531b-f1c9-41aa-854b-37235500495f → introduction). They should be
>> unique. I use my manually written IDs for some important headers which I
>> want to detect from outside org. In addition there's CUSTOM_ID, but I think
>> that's the id="…" you want in HTML exports.
>>
>>
>> El Sat, 1 Feb 2014 14:39:15 -0500 (EST) Ken Mankoff va escriure:
>>
>>>
>>>
>>> I've never cared that the ID field was not human friendly.
>>>
>>> But I've just learned about the Estimate Table where you can see your
>>> estimates
>>> and actual clock time to complete tasks. If you want to see the
>>> estimates for
>>> the current tree, you need to know the ID, which is not human friendly.
>>>
>>> It seems like with IDO mode, the first few characters or words of the
>>> title,
>>> stripped of whitespace, could be pre- or ap- pended onto the ID, and
>>> then it
>>> would be easy to select IDs. If this were how IDs were created, would
>>> this break
>>> some other features? Do others see this as a good or bad thing? Or is
>>> there some
>>> other way to tell the Estimate Table to work on the local tree.
>>>
>>> Cheers,
>>>
>>>   -k.
>>>
>>>
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3136 bytes --]

      reply	other threads:[~2014-02-02 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01 19:39 IDs w/ human friendly component Ken Mankoff
2014-02-02  6:47 ` Daniel Clemente
2014-02-02 17:10   ` Ken Mankoff
2014-02-02 17:47     ` John Kitchin [this message]

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=CAJ51ETqLmkw7kPAc24AfoHt_RoRS5CNmZr3Q2n3boSfqUW0t7A@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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).