From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: org-set-properties for various (all) headings
Date: Tue, 19 Jul 2022 14:07:06 -0400 [thread overview]
Message-ID: <CAFyQvY1Z=R3x=94L8UO=C+HeMaZmTCnJkhAC77V9jc35nWD4Pg@mail.gmail.com> (raw)
In-Reply-To: <87r12h59dc.fsf@mat.ucm.es>
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
On Tue, Jul 19, 2022 at 12:58 PM Uwe Brauer <oub@mat.ucm.es> wrote:
>
> > On Tue, Jul 19, 2022, 10:54 AM Uwe Brauer <oub@mat.ucm.es> wrote:
>
> > Try replacing the `org-set-property` form to:
>
> > (org-set-property "New" "[]")
>
> This does not anything (besides garbage collecting)
>
Did you replace only the `org-set-property` form with my suggestion?
In any case, I got to a computer and I tested that to work alright.
=====
* Over
:PROPERTIES:
:ID: ef19f286-8769-4fe7-8f95-8167691257a0
:COLUMNS: %5TODO(Status) %5NR(Nr)
:foo: Over
:END:
** TODO Test
:PROPERTIES:
:Sent: [X]
:END:
** WAIT Test2
:PROPERTIES:
:Sent: [X]
:END:
** TODO Test3
:PROPERTIES:
:Sent: [ ]
:END:
#+begin_src emacs-lisp
(defun test/set-property-at-heading ()
"Function to be called at the beginning of an Org heading."
(interactive)
(let ((el (org-element-at-point)))
(org-set-property "New" "[ ]")))
(org-map-entries #'test/set-property-at-heading)
#+end_src
=====
Hit C-c C-c with the cursor in that code block, say "yes" or "y" if
prompted, and then you should see that Org buffer change to:
=====
* Over
:PROPERTIES:
:ID: ef19f286-8769-4fe7-8f95-8167691257a0
:COLUMNS: %5TODO(Status) %5NR(Nr)
:foo: Over
:New: [ ]
:END:
** TODO Test
:PROPERTIES:
:Sent: [X]
:New: [ ]
:END:
** WAIT Test2
:PROPERTIES:
:Sent: [X]
:New: [ ]
:END:
** TODO Test3
:PROPERTIES:
:Sent: [ ]
:New: [ ]
:END:
#+begin_src emacs-lisp
(defun test/set-property-at-heading ()
"Function to be called at the beginning of an Org heading."
(interactive)
(let ((el (org-element-at-point)))
(org-set-property "New" "[ ]")))
(org-map-entries #'test/set-property-at-heading)
#+end_src
#+RESULTS:
=====
[-- Attachment #2: Type: text/html, Size: 2627 bytes --]
next prev parent reply other threads:[~2022-07-19 18:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 8:14 org-set-properties for various (all) headings Uwe Brauer
2022-07-19 10:56 ` Kaushal Modi
2022-07-19 14:53 ` Uwe Brauer
2022-07-19 16:30 ` Kaushal Modi
2022-07-19 16:56 ` Uwe Brauer
2022-07-19 18:07 ` Kaushal Modi [this message]
2022-07-20 5:31 ` Uwe Brauer
2022-07-20 7:33 ` Ihor Radchenko
2022-07-20 8:05 ` Uwe Brauer
2022-07-20 13:00 ` Kaushal Modi
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='CAFyQvY1Z=R3x=94L8UO=C+HeMaZmTCnJkhAC77V9jc35nWD4Pg@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--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).