From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: default face org-column Date: Sat, 1 Jun 2013 08:17:41 +0200 Message-ID: <068396FB-493D-456B-922A-D4638EBE0FA3@gmail.com> References: <657A219F-8300-4EDD-98B3-6737014F5EF4@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_E59A904B-99EA-48B3-9C34-4ADBA04F8AC9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uif8T-0004Zj-Ve for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:17:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uif8R-0007R5-Ar for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:17:53 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:42370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uif8R-0007Pl-29 for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:17:51 -0400 Received: by mail-wg0-f46.google.com with SMTP id l18so1781006wgh.1 for ; Fri, 31 May 2013 23:17:45 -0700 (PDT) In-Reply-To: <657A219F-8300-4EDD-98B3-6737014F5EF4@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xiao-Yong Jin Cc: "emacs-orgmode@gnu.org" --Apple-Mail=_E59A904B-99EA-48B3-9C34-4ADBA04F8AC9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 30.5.2013, at 04:43, Xiao-Yong Jin wrote: > Hi, >=20 > In org-faces.el, >=20 > (when (fboundp 'set-face-attribute) > ;; Make sure that a fixed-width face is used when we have a column = table. > (set-face-attribute 'org-column nil > :height (face-attribute 'default :height) > :family (face-attribute 'default :family))) Hi Xiao, I remember that I struggled with the problem that I had to make sure = that column view used a fixed-width face - and this was the solution = that worked - not a particular pretty one, admittedly. Do you have an idea on how to change this code that it will always work? = I'd be very happy to accept a good patch. - Carsten >=20 > I understand why you did this, but it is not quite logical, and = somewhat invasive. First, you certainly do not do this with org-table. = Then why org-column specifically? Second, it overwrites the the value I = set in the emacs theme or custom-set-faces. Third, the end result is = quite bizarre and odd-looking. The "default" height and "default" = family is some how not what I set for the frame, because the font family = and size is set when emacs starts up and loaded the org-mode. When I = use set-frame-font or text-scale-adjust, org-column will stick with the = old font family and size. In fact, because the font family for = org-column and org-column-title are different, the result is just bad. >=20 > I don't think it is only my problem, but I'll describe my setup for = themes/font. I use default-frame-alist to set the font family and = size=97The above code will not pick up this setup. I use load-theme and = enable-theme to load the theme I want. Sometimes I use set-frame-font = or text-scale-adjust to get a pleasantly looking texts temporary. I = usually use fixed-width font, so the above code is not doing any good. >=20 > For the time being, I commented out the above code. >=20 > Best, > Xiao-Yong >=20 --Apple-Mail=_E59A904B-99EA-48B3-9C34-4ADBA04F8AC9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 jinxiaoyong@gmail.com> = wrote:
=      :height (face-attribute 'default = :height)
    =  :family (face-attribute 'default = :family)))

Hi = Xiao,

I remember that I struggled with the = problem that I had to make sure that column view used a fixed-width face = - and this was the solution that worked - not a particular pretty one, = admittedly.

Do you have an idea on how to = change this code that it will always work?  I'd be very happy to = accept a good patch.

- = Carsten


I understand why you did this, = but it is not quite logical, and somewhat invasive.  First, you = certainly do not do this with org-table.  Then why org-column = specifically?  Second, it overwrites the the value I set in the = emacs theme or custom-set-faces.  Third, the end result is quite = bizarre and odd-looking.  The "default" height and "default" family = is some how not what I set for the frame, because the font family and = size is set when emacs starts up and loaded the org-mode.  When I = use set-frame-font or text-scale-adjust, org-column will stick with the = old font family and size.  In fact, because the font family for = org-column and org-column-title are different, the result is just = bad.

I don't think it is only my problem, but = I'll describe my setup for themes/font.  I use default-frame-alist = to set the font family and size