From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Org-mode version 6.32trans and 6.21b; Strange interaction between whitespace-mode and cust. org-ellipsis Date: Fri, 4 Dec 2009 13:26:32 +0100 Message-ID: <6A083B8A-17A3-40C1-9503-CE07FF660F7D@gmail.com> References: <4B16B9B5.5030508@os.inf.tu-dresden.de> <50ED3D70-FE6A-4903-BACC-9EC7D021EC22@gmail.com> <4B182EDB.3070209@os.inf.tu-dresden.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGXFS-00013l-Ox for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 07:26:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGXFN-0000wf-Dn for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 07:26:57 -0500 Received: from [199.232.76.173] (port=38559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGXFN-0000wL-8J for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 07:26:53 -0500 Received: from mail-ew0-f209.google.com ([209.85.219.209]:53138) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGXFM-0000r7-DS for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 07:26:53 -0500 Received: by ewy1 with SMTP id 1so2270517ewy.34 for ; Fri, 04 Dec 2009 04:26:49 -0800 (PST) In-Reply-To: <4B182EDB.3070209@os.inf.tu-dresden.de> 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: Martin Pohlack Cc: emacs-orgmode@gnu.org On Dec 3, 2009, at 10:34 PM, Martin Pohlack wrote: > 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? Yes, this is the idea, and it seems only logical to me. So why do you want different settings in different Org buffers for whitespace? So far I am unconvinced that creating a new table in each buffer with the right thing to do. - Carsten > > 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 - Carsten