From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Why :ID: properties? Date: Sun, 19 Sep 2010 23:49:22 +0200 Message-ID: <878w2xh09p.fsf@gnu.org> References: <4C8647D8.1010105@gmail.com> <4C864920.1030404@ccbr.umn.edu> <4C864C75.1010202@gmail.com> <87hbi11us6.fsf@gnu.org> <4C86878C.2070303@gmail.com> <87vd6b9dz5.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=57350 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxRlE-0001rW-BH for Emacs-orgmode@gnu.org; Sun, 19 Sep 2010 17:49:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxRlC-0006h5-Un for Emacs-orgmode@gnu.org; Sun, 19 Sep 2010 17:49:24 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:61532) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxRlC-0006gz-Lb for Emacs-orgmode@gnu.org; Sun, 19 Sep 2010 17:49:22 -0400 Received: by wyb36 with SMTP id 36so4940951wyb.0 for ; Sun, 19 Sep 2010 14:49:21 -0700 (PDT) In-Reply-To: <87vd6b9dz5.wl%dmaus@ictsoc.de> (David Maus's message of "Sun, 12 Sep 2010 17:30:06 +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: David Maus Cc: Emacs-orgmode@gnu.org, Rainer M Krug David Maus writes: >>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)))))) I added an entry about this in org-hacks.org - thanks! -- Bastien