From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pohlack Subject: Re: Org-mode version 6.32trans and 6.21b; Strange interaction between whitespace-mode and cust. org-ellipsis Date: Thu, 03 Dec 2009 22:34:19 +0100 Message-ID: <4B182EDB.3070209@os.inf.tu-dresden.de> References: <4B16B9B5.5030508@os.inf.tu-dresden.de> <50ED3D70-FE6A-4903-BACC-9EC7D021EC22@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGJJe-0003TT-4D for emacs-orgmode@gnu.org; Thu, 03 Dec 2009 16:34:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGJJZ-0003PI-9i for emacs-orgmode@gnu.org; Thu, 03 Dec 2009 16:34:21 -0500 Received: from [199.232.76.173] (port=39247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGJJZ-0003Oy-3r for emacs-orgmode@gnu.org; Thu, 03 Dec 2009 16:34:17 -0500 Received: from os.inf.tu-dresden.de ([141.76.48.99]:47406) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGJJY-00062O-JA for emacs-orgmode@gnu.org; Thu, 03 Dec 2009 16:34:16 -0500 In-Reply-To: <50ED3D70-FE6A-4903-BACC-9EC7D021EC22@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik , emacs-orgmode@gnu.org Carsten Dominik wrote: > Hi Martin, this looks to me like a bug in whitespace.el, why does it > override the display table org-mode is using? Hmm, my understanding is that each buffer can have its own display table, buffer-display-table. whitespace-mode has to modify this table (or install an own one) if it wants to do buffer-local modifications. So I think it modifies org-mode's table but doesn't override it. My irritation is that by doing so, it does modifies some global state that effects other buffers. A short look into org.el shows that org-display-table is never made buffer local, so this data structure is shared across all org-mode buffers? The following hack seems to solve this problem: --- org.el.bak 2009-12-03 22:31:07.000000000 +0100 +++ org.el 2009-12-03 22:31:48.000000000 +0100 @@ -427,9 +427,6 @@ (face :tag "Face" :value org-warning) (string :tag "String" :value "...#"))) -(defvar org-display-table nil - "The display table for org-mode, in case `org-ellipsis' is non-nil.") - (defgroup org-keywords nil "Keywords in Org-mode." :tag "Org Keywords" @@ -4170,8 +4167,7 @@ (when (and org-ellipsis (fboundp 'set-display-table-slot) (boundp 'buffer-display-table) (fboundp 'make-glyph-code)) - (unless org-display-table - (setq org-display-table (make-display-table))) + (setq org-display-table (make-display-table)) (set-display-table-slot org-display-table 4 (vconcat (mapcar Cheers, Martin