Re: [O] [PATCH] Avoid all modification hooks in org-unmodified

2013-01-31 Thread Francesco Pizzolante


Hi Bastien,

> This is great.  It's not only more efficient but also more
> consistent.  Thanks a lot for joining the "agenda optimization
> gang" with such a contribution!  I applied your patch, with
> a tiny change in the ChangeLog.

Thanks for your message and for having applied the patch.
I'm happy that it effectively helps.

I've also noticed several other spots where org-unmodified should be used
instead of simply saving and restoring buffer-modified-p.

I will submit another tiny patch in order for you to see.

Regards,
 Francesco




Re: [O] [PATCH] Avoid all modification hooks in org-unmodified

2013-01-30 Thread Bastien


Hi Francesco,

"Francesco Pizzolante"
 writes:

> I've changed org-unmodified in order to avoid all modification hooks to be
> called (not only before-change-functions and after-change-functions, but also
> first-change-hook).
>
> I've used inhibit-modification-hooks as described here:
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Change-Hooks.html
>
> In my case, this positively impacts the loading of the agenda.

This is great.  It's not only more efficient but also more
consistent.  Thanks a lot for joining the "agenda optimization
gang" with such a contribution!  I applied your patch, with
a tiny change in the ChangeLog.

-- 
 Bastien




[O] [PATCH] Avoid all modification hooks in org-unmodified

2013-01-30 Thread Francesco Pizzolante
Hello,

I've changed org-unmodified in order to avoid all modification hooks to be
called (not only before-change-functions and after-change-functions, but also
first-change-hook).

I've used inhibit-modification-hooks as described here:
http://www.gnu.org/software/emacs/manual/html_node/elisp/Change-Hooks.html

In my case, this positively impacts the loading of the agenda.

Regards,
 Francesco

>From 173526db9d9b925e9eb568a725647e4065f0e27c Mon Sep 17 00:00:00 2001
From: Francesco Pizzolante 
Date: Wed, 30 Jan 2013 16:09:22 +0100
Subject: [PATCH] Avoid all modification hooks in org-unmodified

* org-macs.el (org-unmodified): Avoid all modification hooks in org-unmodified

TINYCHANGE
---
 lisp/org-macs.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index a44bdbe..ceee306 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -93,7 +93,7 @@ Also, do not record undo information."
   `(set-buffer-modified-p
 (prog1 (buffer-modified-p)
   (let ((buffer-undo-list t)
-   before-change-functions after-change-functions)
+   (inhibit-modification-hooks t))
,@body
 (def-edebug-spec org-unmodified (body))
 
-- 
1.7.9