help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Elisp newbie: Getting the value from a variable


From: Fredrik Oberg
Subject: Elisp newbie: Getting the value from a variable
Date: 18 Dec 2002 02:30:25 -0800

In my .emacs I assign a variable a value which should be the height of
the default frame:

(setq my-frame-height 70)

Then I can view it's value by doing

(message "Size %d" my-frame-height) 

But when trying to use it fails. I have the following in my .emacs:

(setq default-frame-alist 
      '((menu-bar-lines . 1)
        (top . 5) 
        (left . 100)
        (width . 100) 
        (height . my-frame-height)
        (cursor-color . "white")
        (cursor-type . box)
        (foreground-color . "black")
        (background-color . "white")
        (font . "-*-Courier New-normal-r-*-*-11-82-96-96-c-*-iso8859-1")
        )
)

When starting emacs, the height is ignored. When I check out the
variable default-frame-alist it has the following value:

((tool-bar-lines . 0)
 (menu-bar-lines . 1)
 (top . 5)
 (left . 100)
 (width . 100)
 (height . my-frame-height)
 (cursor-color . "white")
 (cursor-type . box)
 (foreground-color . "black")
 (background-color . "white")
 (font . "-*-Courier New-normal-r-*-*-11-82-96-96-c-*-iso8859-1"))

my-frame-height is underlined and when I click it, its value (70) is
shown. To me it looks like I must "derefer" the variable in some way.
Is this correct? As a newbie on elisp I have no clue on how to do
that. Can somebody help me find out how to solve this?

Many thanks in advance
/Fredrik
>From help-gnu-emacs-bounces@gnu.org  Wed Dec 18 05:45:16 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!laredo.verisity.COM!not-for-mail
From: Michael Livshin <usenet@cmm.kakpryg.net>
Newsgroups: gnu.emacs.help
Date: Wed, 18 Dec 2002 12:44:16 +0200
Organization: The Church of God the Utterly Indifferent
Lines: 29
Message-ID: <s3znr3ehdr.fsf@cmm.kakpryg.net.cmm>
References: <mailman.369.1040190440.19936.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: laredo.verisity.com (212.150.223.230)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fu-berlin.de 1040208256 1402397 212.150.223.230 (16 [72362])
Mail-copies-to: never
User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Honest Recruiter,
 i686-pc-linux)
Cancel-Lock: sha1:oAxwjdOJvWAAiVWbQzWdG10Kw20=
Xref: shelby.stanford.edu gnu.emacs.help:108247
To: help-gnu-emacs@gnu.org
Subject: Re: getting Mule, Unicode & X selection to play together
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 18 Dec 2002 10:45:16 -0000

Eli Zaretskii <eliz@is.elta.co.il> writes:

>> not forgetting to explicitly map the "cyrillic-iso8859-5" encoding
>> to an iso8859-5 font in the fontset (no sir, Emacs *won't* grok it
>> by itself, how could it?)
>
> I'm surprised this is so, but if it is, it sounds like a bug, so please 
> report it (with a precise test case to reproduce) to 
> emacs-pretest-bug@gnu.org.  Thanks.

well, let me clarify.  Emacs *did* find an appropriately-encoded font,
the problem was that it took the iso8859-5 font from the "standard"
fontset and not from my fontset, even though there surely *it* a
matching font in my fontset (and it works great once I map
"cyrillic-iso8859-5" to it explicitly).

perhaps it's a kind of feature?

it would be nice to simply be able to tell Emacs to forget the
standard fontset altogether, or at least to completely ignore it.

> Btw, cyrillic-iso8859-5 is not an encoding, it's a character set.
> But that's nitpicking.

it's kind of subtle, so it's certainly worth pointing out.  thank you.

-- 
Incrementally extended heuristic algorithms tend inexorably toward the
incomprehensible.
>From eliz@is.elta.co.il Wed Dec 18 05:56:41 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18ObsW-0007zX-00
        for help-gnu-emacs@gnu.org; Wed, 18 Dec 2002 05:56:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18ObsU-0007yO-00
        for help-gnu-emacs@gnu.org; Wed, 18 Dec 2002 05:56:39 -0500
Received: from is.elta.co.il ([199.203.121.2])
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18ObsF-0007te-00
        for help-gnu-emacs@gnu.org; Wed, 18 Dec 2002 05:56:23 -0500
Received: from is (is [199.203.121.2])
        by is.elta.co.il (8.9.3/8.8.8) with SMTP id MAA08348
        for <help-gnu-emacs@gnu.org>; Wed, 18 Dec 2002 12:56:14 +0200 (IST)
Date: Wed, 18 Dec 2002 12:56:14 +0200 (IST)
From: Eli Zaretskii <eliz@is.elta.co.il>
X-Sender: eliz@is
To: help-gnu-emacs@gnu.org
In-Reply-To: <s3znr3ehdr.fsf@cmm.kakpryg.net.cmm>
Message-ID: <Pine.SUN.3.91.1021218125447.8222C-100000@is>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: Re: getting Mule, Unicode & X selection to play together
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 18 Dec 2002 10:56:41 -0000


On Wed, 18 Dec 2002, Michael Livshin wrote:

> well, let me clarify.  Emacs *did* find an appropriately-encoded font,
> the problem was that it took the iso8859-5 font from the "standard"
> fontset and not from my fontset, even though there surely *it* a
> matching font in my fontset (and it works great once I map
> "cyrillic-iso8859-5" to it explicitly).
> 
> perhaps it's a kind of feature?

I still think it's worth reporting as a possible misfeature or bug.  (I 
myself don't know enough about fontsets to give an opinion.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]