From: Yuri Lensky <ydl@ydl.cm>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [Patch] Fix check of previous-sibling in org-depend
Date: Tue, 11 Jul 2017 17:37:30 -0700 [thread overview]
Message-ID: <CAC38U-eqEKGxMUydLKa4cJqk1FCOOnqLHHEdvvZO671xm75D1A@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 119 bytes --]
The "previous-sibling" blocker sometimes checked the previous /visible/
heading,
instead of the true previous sibling.
[-- Attachment #1.2: Type: text/html, Size: 186 bytes --]
[-- Attachment #2: 0001-org-depend.el-Fix-check-for-previous-sibling-blocker.patch --]
[-- Type: application/octet-stream, Size: 1107 bytes --]
From 0b5ae17e7832a22c276a7afa3439fdb2a313de4b Mon Sep 17 00:00:00 2001
From: "Yuri D. Lensky" <ydlensky@gmail.com>
Date: Mon, 10 Jul 2017 16:21:52 -0700
Subject: [PATCH 1/2] org-depend.el: Fix check for previous-sibling blocker.
The "previous-sibling" blocker checked the previous /visible/ heading,
instead of the true previous sibling.
---
contrib/lisp/org-depend.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/contrib/lisp/org-depend.el b/contrib/lisp/org-depend.el
index cd570c5..d1b9844 100644
--- a/contrib/lisp/org-depend.el
+++ b/contrib/lisp/org-depend.el
@@ -388,9 +388,8 @@ this ID property, that entry is also checked."
(save-excursion
(goto-char pos)
;; find the older sibling, exit if no more siblings
- (condition-case nil
- (outline-backward-same-level 1)
- (error (throw 'ignore t)))
+ (unless (org-get-last-sibling)
+ (throw 'ignore t))
;; Check if this entry is not yet done and block
(unless (org-entry-is-done-p)
;; return nil, to indicate that we block the change!
--
2.9.2.windows.1
next reply other threads:[~2017-07-12 0:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 0:37 Yuri Lensky [this message]
2017-07-12 12:12 ` [Patch] Fix check of previous-sibling in org-depend Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC38U-eqEKGxMUydLKa4cJqk1FCOOnqLHHEdvvZO671xm75D1A@mail.gmail.com \
--to=ydl@ydl.cm \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.