emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Why :ID: properties?


From: David Maus
Subject: Re: [Orgmode] Why :ID: properties?
Date: Sun, 12 Sep 2010 17:30:06 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Rainer M Krug wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1

>On 07/09/10 16:40, Bastien wrote:
>> Rainer M Krug <address@hidden> writes:
>>
>>> On 07/09/10 16:16, Erik Iverson wrote:
>>>> Did you recently start using MobileOrg?
>>>
>>> No - I only inserted a link, and around that time the :ID:s appeared. I
>>> deleted them all manually, but they came back.
>>
>> I suspect you need this:
>>
>> (set org-link-to-org-use-id nil)

>That sounds like the most likely solution - thanks.

>Now I just have to find an easy way to delete all the :PROPERTIES blocks.

This one should do the trick:

(defun dmj:org:remove-empty-propert-drawers ()
  "*Remove all empty property drawers in current file."
  (interactive)
  (unless (eq major-mode 'org-mode)
    (error "You need to turn on Org mode for this function."))
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward ":PROPERTIES:" nil t)
      (save-excursion
        (org-remove-empty-drawer-at "PROPERTIES" (match-beginning 0))))))

If called interactively in an Org mode buffer it searches for the
string ":PROPERTIES:" and tells Org to remove the drawer if it is
empty.  Just used it to get rid of empty CLOCK drawers -- but beware:
It is a very stupid function, i.e. it does not check if the
string :PROPERTIES: is actually a property drawer or not.

HTH,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpOWVDT6zcbZ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]