emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] Strange behavior of property-search and org-tags-view
@ 2012-11-01 12:06 Sven Bretfeld
  2012-11-04 20:21 ` [Bug] Bug in org-depend, was: " Sven Bretfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Bretfeld @ 2012-11-01 12:06 UTC (permalink / raw)
  To: emacs-org

Hi all

Whenever I do a property-search (C-a / p) or an org-tags-view, some
org-buffers are touched and need to be saved again, i.e. they display
the ** flag in the status line and in Ibuffer.

It is always the same three files, that seemingly have changed (in fact,
they didn't change at all). They all belong to my org-agenda-files but
this contains many other files too, which remain unchanged. So, there
are two wired miracles involved:

1. What makes these three files so specially vulnerable?
2. Why does any file (apparently) "change" at all by a search operation?

I'm using Emacs 23.3.1 under Ubuntu 11.10 and org-mode 7.8.03 of the
sticky branch.

Thanks for help

Sven

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug] Bug in org-depend, was: Strange behavior of property-search and org-tags-view
  2012-11-01 12:06 [Bug] Strange behavior of property-search and org-tags-view Sven Bretfeld
@ 2012-11-04 20:21 ` Sven Bretfeld
  2012-12-25  4:08   ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Bretfeld @ 2012-11-04 20:21 UTC (permalink / raw)
  To: emacs-org

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> Whenever I do a property-search (C-a / p) or an org-tags-view, some
> org-buffers are touched and need to be saved again, i.e. they display
> the ** flag in the status line and in Ibuffer.
>
> It is always the same three files, that seemingly have changed (in fact,
> they didn't change at all). They all belong to my org-agenda-files but
> this contains many other files too, which remain unchanged. So, there
> are two wired miracles involved:
>
> 1. What makes these three files so specially vulnerable?
> 2. Why does any file (apparently) "change" at all by a search operation?
>
> I'm using Emacs 23.3.1 under Ubuntu 11.10 and org-mode 7.8.03 of the
> sticky branch.

Hi 

It took me a good hour to find the package that produced the problem.
It's org-depend. I narrowed down my .emacs to a minimum:

(add-to-list 'load-path "~/elisp/org")
(add-to-list 'load-path "~/elisp/org/lisp")
(require 'org-install)
(add-to-list 'load-path "~/elisp/org/contrib/lisp")
(require 'org-depend)

(setq org-agenda-files (list "~/myconf/mygtd.org" "~/myconf/googlecalendar.org" "~/myconf/from-mobile.org" "~/myconf/diary.org" "~/aktuell/orthodoxy/hab-diary.org"))

(global-set-key "\C-ca" 'org-agenda)

When I comment out the fifth line (require 'org-depend), everything is
fine. With org-depend loaded, a "org-tags-view keywords={Something}"
affects the buffers of some of the open org-agenda-files. I still don't
know why only some files are affected. It happens only if actually some
matches are found by the query. But it's not only the corresponding
files which are corrupted.

So, I think org-depend needs some revision. It's a useful package, but
this bug is annoying. 

Sven

P.S. I had updated to the latest stable version of orgmode, so it's not
an obsolete bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug] Bug in org-depend, was: Strange behavior of property-search and org-tags-view
  2012-11-04 20:21 ` [Bug] Bug in org-depend, was: " Sven Bretfeld
@ 2012-12-25  4:08   ` Bastien
  2012-12-29  9:26     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2012-12-25  4:08 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

Hi Sven,

"Sven Bretfeld" <sven.bretfeld@gmx.ch> writes:

> It took me a good hour to find the package that produced the problem.

Thanks for this.

Please let me know if the attached patch fixes the problem for you.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-entry-blocked-p.patch --]
[-- Type: text/x-patch, Size: 926 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 0fabaf6..e62ba25 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11770,15 +11770,16 @@ changes because there are unchecked boxes in this entry."
 
 (defun org-entry-blocked-p ()
   "Is the current entry blocked?"
-  (if (org-entry-get nil "NOBLOCKING")
-      nil ;; Never block this entry
-    (not
-     (run-hook-with-args-until-failure
-      'org-blocker-hook
-      (list :type 'todo-state-change
-	    :position (point)
-	    :from 'todo
-	    :to 'done)))))
+  (with-buffer-modified-unmodified
+   (if (org-entry-get nil "NOBLOCKING")
+       nil ;; Never block this entry
+     (not
+      (run-hook-with-args-until-failure
+       'org-blocker-hook
+       (list :type 'todo-state-change
+	     :position (point)
+	     :from 'todo
+	     :to 'done))))))
 
 (defun org-update-statistics-cookies (all)
   "Update the statistics cookie, either from TODO or from checkboxes.

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Bug] Bug in org-depend, was: Strange behavior of property-search and org-tags-view
  2012-12-25  4:08   ` Bastien
@ 2012-12-29  9:26     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2012-12-29  9:26 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: emacs-org

Hi Sven,

Bastien <bzg@altern.org> writes:

> Please let me know if the attached patch fixes the problem for you.

Just FYI I've applied a slightly enhanced patch.

Thanks for reporting this,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-29  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-01 12:06 [Bug] Strange behavior of property-search and org-tags-view Sven Bretfeld
2012-11-04 20:21 ` [Bug] Bug in org-depend, was: " Sven Bretfeld
2012-12-25  4:08   ` Bastien
2012-12-29  9:26     ` Bastien

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).