From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: NS: ns-expand-space / slider in Preferences dialog not functional Date: Wed, 4 Mar 2009 22:39:15 -0500 Message-ID: <5393D476-3312-4DF3-AF39-6D698B7FDA49@gmail.com> References: <21F51971-5679-45BF-85A0-D982CA73E722@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: multipart/signed; boundary=Apple-Mail-4-219117516; micalg=sha1; protocol="application/pkcs7-signature" X-Trace: ger.gmane.org 1236224381 30053 80.91.229.12 (5 Mar 2009 03:39:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2009 03:39:41 +0000 (UTC) Cc: 2532@emacsbugs.donarmstrong.com, Emacs-Devel devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 05 04:40:57 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lf4S7-0004lc-KV for ged-emacs-devel@m.gmane.org; Thu, 05 Mar 2009 04:40:56 +0100 Original-Received: from localhost ([127.0.0.1]:47733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lf4Qm-0005Oj-76 for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 22:39:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lf4Qg-0005OO-O2 for emacs-devel@gnu.org; Wed, 04 Mar 2009 22:39:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lf4Qg-0005NQ-3z for emacs-devel@gnu.org; Wed, 04 Mar 2009 22:39:26 -0500 Original-Received: from [199.232.76.173] (port=33704 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lf4Qf-0005NI-UR for emacs-devel@gnu.org; Wed, 04 Mar 2009 22:39:25 -0500 Original-Received: from qw-out-1920.google.com ([74.125.92.149]:1298) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lf4Qf-0003lu-FE for emacs-devel@gnu.org; Wed, 04 Mar 2009 22:39:25 -0500 Original-Received: by qw-out-1920.google.com with SMTP id 4so3007084qwk.24 for ; Wed, 04 Mar 2009 19:39:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=kMI1IMZv0o4wKCnM7ZXK5kXvn44Ng/36BS1kKzbstFM=; b=KHL1VP5vKAsH/nVvDEKQbI7mpj+LTkxHZV4+bfHFZG7wZWqnBkONoCm4K1rL7fu5og sFFhZkmlVeFFKnVHXVUdT+919OUx2nSiKwPXCSVbwZTnb+wREHfUZDCKIVG6k5MhUTdK LI+YU19KVGxV705C31VUEKeU3IKc2wUzBzCQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=exbW/W0+XYD0cUKyO1Ox33+vxruXqa5s/i+QN0RWQEVJ2Ty4dWeQqvBiPUBW/yqJl3 6GayD6UINUFvBgngdzWgPTaoFsNk6oaFhrZcufmlGqt+gzQI4TqsW0MH7mHEuMhBnMlU GjvzKUF4EmieKNPKxyx0yJJ4q96WVsTA8DS4k= Original-Received: by 10.224.45.134 with SMTP id e6mr1110243qaf.237.1236224364918; Wed, 04 Mar 2009 19:39:24 -0800 (PST) Original-Received: from scarlett.local (pool-72-65-195-138.pitbpa.east.verizon.net [72.65.195.138]) by mx.google.com with ESMTPS id 6sm3801259qwd.53.2009.03.04.19.39.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Mar 2009 19:39:22 -0800 (PST) In-Reply-To: <21F51971-5679-45BF-85A0-D982CA73E722@gmail.com> X-Mailer: Apple Mail (2.930.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109461 Archived-At: --Apple-Mail-4-219117516 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 4 Mar 2009, at 16:35, Adrian Robert wrote: >> Setting `ns-expand-space' doesn't work, and neither does changing its >> value via the slider the the preferences panel. >> >> Also, the doc string of the above variable says that one shouldn't >> set >> it directly - if so, how is one supposed to (programmatically) set >> this? >> Studying the source code (nsterm.m:setValuesFromPanel), it seems to >> me >> that setting the value should work just fine (I even tried calling >> ns- >> save-preferences). > > Emacs must be restarted, unfortunately. It mentions this in the > manual. The variable doc string should be updated. > The UI does not reflect that. Users need some indication that they need to restart Emacs for this to work. The `ns-set-resource' Elisp interface is better than none on the Elisp side, but what happened to Emacs customization variables? As said before on this list, introducing another way (beyond .emacs and customization/custom-file) creates a new failure point for people's configurations. This is bad in two respects: they won't be able to reset Emacs to a vanilla state, or troubleshoot a faulty configuration. And, second, it is going to be harder on us to troubleshoot people's problems. Right now, with GNU Emacs 22, we have ~/.emacs and ~/.emacs.d (IIRC), and maybe a few site-lisp files. I speak from experience - in Aquamacs, youthful optimism led me to add eight further locations for a version of .emacs called Preferences.el - two would have done the job to satisfy my goal of Mac compatibility. In addition to that, we split custom-file from .emacs (a good choice, per se). All of these things make it harder to support users. "emacs -q" is helpful, but at the end of the day, people want to run "emacs". Especially seasoned users will complain that they have to find and delete ~/Library/Preferences/ org.gnu.emacs.plist. In anticipation of one pro-resource argument: X Resources are much more limited than the NS parameters system. Why recreate it on NS? What follows is an excerpt from ns-win.el that shows how many of these "NS resources" are set. (ns-set-resource nil "AlternateModifier" (symbol-name ns-alternate- modifier)) (ns-set-resource nil "CommandModifier" (symbol-name ns-command- modifier)) (ns-set-resource nil "ControlModifier" (symbol-name ns-control- modifier)) (ns-set-resource nil "FunctionModifier" (symbol-name ns-function- modifier)) (ns-set-resource nil "ExpandSpace" (if ns-expand-space (number-to-string ns-expand-space) "NO")) (ns-set-resource nil "GSFontAntiAlias" (if ns-antialias-text "YES" "NO")) (ns-set-resource nil "UseQuickdrawSmoothing" (if ns-use-qd-smoothing "YES" "NO")) (ns-set-resource nil "UseSystemHighlightColor" (if ns-use-system-highlight-color "YES" "NO")) (ns-set-resource nil "ConfirmQuit" (if ns-confirm-quit "YES" "NO")) ;; Default frame parameters (let ((p (frame-parameters)) v) (if (setq v (assq 'font p)) (ns-set-resource nil "Font" (ns-font-name (cdr v)))) (if (setq v (assq 'fontsize p)) ... (let ((fl (face-list))) (while (consp fl) (or (eq 'default (car fl)) ;; dont save Default* since it causes all created faces to ;; inherit its values. The properties of the default face ;; have already been saved from the frame-parameters anyway. (let* ((name (symbol-name (car fl))) (font (face-font (car fl))) ;; (fontsize (face-fontsize (car fl))) (foreground (face-foreground (car fl))) (background (face-background (car fl))) (underline (face-underline-p (car fl))) (italic (face-italic-p (car fl))) (bold (face-bold-p (car fl))) (stipple (face-stipple (car fl)))) ;; (ns-set-resource nil (concat name ".attributeFont") ;; (if font font nil)) ;; (ns-set-resource nil (concat name ".attributeFontSize") ;; (if fontsize (number-to-string fontsize) nil)) (ns-set-resource nil (concat name ".attributeForeground") (if foreground foreground nil)) (ns-set-resource nil (concat name ".attributeBackground") (if background background nil)) (ns-set-resource nil (concat name ".attributeUnderline") ... --Apple-Mail-4-219117516 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACA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