From: Dmitry Logvinenko <dmlogv@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>, emacs-orgmode@gnu.org
Subject: Re: [POLL] Will it be ok to allow HABIT property inheritance? (optionally) (was: [BUG] org-habit does not respect STYLE property inheritance)
Date: Thu, 15 Jun 2023 20:11:38 +0300 [thread overview]
Message-ID: <CAB+pTY=6SoH3teCy+O5pk1xH==v9kC4ArUGW0wt_GV58aZVc0A@mail.gmail.com> (raw)
In-Reply-To: <87cz2xzzyq.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 31 bytes --]
--
Dmitry Logvinenko // dmlogv
[-- Attachment #2: 0001-lisp-org-habit.el-Inherit-habit-style-property.patch --]
[-- Type: application/octet-stream, Size: 1774 bytes --]
From 12ef3a940f0c7d4abf3129011440684f18686951 Mon Sep 17 00:00:00 2001
From: Dmitry Logvinenko <dmlogv@gmail.com>
Date: Thu, 15 Jun 2023 19:47:51 +0300
Subject: [PATCH] lisp/org-habit.el: Inherit habit style property
* lisp/org-habit.el (org-is-habit-p): Use `org-entry-get' with
'selective option to optionally find habit subheadings.
* etc/ORG-NEWS: Describe a breaking change.
---
etc/ORG-NEWS | 12 ++++++++++++
lisp/org-habit.el | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 7e7015064..ad7436c33 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -478,6 +478,18 @@ After:
: ("simple" "list")
#+end_src
+
+*** =org-habit.el= now optionally inherits ~:STYLE: habit~ properties
+
+Currently, the ~STYLE~ property of habits is not inherited when searching
+for entries.
+
+This change allows the property to be inherited optionally by customizing
+the ~org-use-property-inheritance~ variable.
+
+This change aims to provide more flexibility in managing habits, allowing
+users to dedicate separate subtrees or files to habits without manually
+setting the ~STYLE~ property for each sub-task.
** New features
*** Clock table can now produce quarterly reports
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index ea935fe7c..b7ba6e349 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -170,7 +170,7 @@ means of creating calendar-based reminders."
(defun org-is-habit-p (&optional pom)
"Is the task at POM or point a habit?"
- (string= "habit" (org-entry-get (or pom (point)) "STYLE")))
+ (string= "habit" (org-entry-get (or pom (point)) "STYLE" 'selective)))
(defun org-habit-parse-todo (&optional pom)
"Parse the TODO surrounding point for its habit-related data.
--
2.40.1
next prev parent reply other threads:[~2023-06-15 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 13:03 [BUG] org-habit does not respect STYLE property inheritance Дмитрий Логвиненко
2023-05-04 9:53 ` [POLL] Will it be ok to allow HABIT property inheritance? (optionally) (was: [BUG] org-habit does not respect STYLE property inheritance) Ihor Radchenko
2023-05-18 10:38 ` Ihor Radchenko
2023-05-18 16:10 ` [POLL] Will it be ok to allow HABIT property inheritance? (optionally) Colin Baxter
2023-05-18 16:25 ` Ihor Radchenko
2023-05-18 16:32 ` Colin Baxter
2023-06-15 17:11 ` Dmitry Logvinenko [this message]
2023-06-16 9:45 ` [POLL] Will it be ok to allow HABIT property inheritance? (optionally) (was: [BUG] org-habit does not respect STYLE property inheritance) Ihor Radchenko
2023-06-22 17:08 ` Dmitry Logvinenko
2023-06-23 10:51 ` Ihor Radchenko
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='CAB+pTY=6SoH3teCy+O5pk1xH==v9kC4ArUGW0wt_GV58aZVc0A@mail.gmail.com' \
--to=dmlogv@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@posteo.net \
/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).