From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: How to visit every source block and modify it's NAME property with org-element? Date: Sat, 8 Aug 2015 22:06:13 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOGwC-0001IR-LE for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 23:06:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOGwA-0002gw-3y for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 23:06:16 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:34835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOGw9-0002gq-TE for emacs-orgmode@gnu.org; Sat, 08 Aug 2015 23:06:14 -0400 Received: by wibxm9 with SMTP id xm9so101580154wib.0 for ; Sat, 08 Aug 2015 20:06:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Good evening, Emacs 24.4 and Org from Git. Goal: 1) Visit every source block 2) If there is a NAME property 1) Then replace it's value with a UUID 3) If there is not an NAME property 1) Add an NAME property and give it a UUID. `org-uuid' [provides] the functionality to create a UUID. It seems like this could be re-used for this NAME property. Would that be a good idea? The code would be nearly the same (choose a UUID program, get a value, insert it). What is the best way to do it with `org-element'? This is very similar to a post I just made about headlines and the ID property but they are different enough to post separately. [provides] http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-id.el;hb=HEAD