From: David Reitter <david.reitter@gmail.com>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: 2532@emacsbugs.donarmstrong.com, Emacs-Devel devel <emacs-devel@gnu.org>
Subject: bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
Date: Wed, 4 Mar 2009 22:39:15 -0500 [thread overview]
Message-ID: <5393D476-3312-4DF3-AF39-6D698B7FDA49__28963.7562273585$1236225980$gmane$org@gmail.com> (raw)
In-Reply-To: <21F51971-5679-45BF-85A0-D982CA73E722@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4588 bytes --]
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")
...
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]
next prev parent reply other threads:[~2009-03-05 3:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 21:35 bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional Adrian Robert
2009-03-05 3:39 ` David Reitter [this message]
2009-03-05 3:39 ` David Reitter
2009-03-06 19:20 ` Adrian Robert
2009-03-06 19:35 ` bug#2532: " David Reitter
2009-03-06 19:35 ` David Reitter
2009-03-07 1:09 ` YAMAMOTO Mitsuharu
2009-03-07 2:15 ` Adrian Robert
2009-03-07 3:33 ` YAMAMOTO Mitsuharu
2009-03-07 9:28 ` Adrian Robert
2009-03-08 1:17 ` YAMAMOTO Mitsuharu
2009-03-08 17:41 ` Adrian Robert
2009-03-09 0:17 ` YAMAMOTO Mitsuharu
2009-03-09 2:46 ` Miles Bader
2009-03-09 7:53 ` Adrian Robert
2009-03-09 9:00 ` YAMAMOTO Mitsuharu
2009-03-09 9:04 ` Miles Bader
2009-03-09 13:19 ` Stefan Monnier
2009-03-09 20:50 ` Adrian Robert
2009-03-09 21:29 ` David Reitter
2009-03-09 23:15 ` Dan Nicolaescu
[not found] ` <jwvvdqihzix.fsf-monnier+emacs@gnu.org>
2009-03-10 15:33 ` Dan Nicolaescu
2009-03-10 15:59 ` Stefan Monnier
2009-03-10 2:38 ` YAMAMOTO Mitsuharu
2009-03-10 3:16 ` Miles Bader
2009-03-10 3:38 ` YAMAMOTO Mitsuharu
2009-03-07 4:27 ` David Reitter
2009-03-07 1:09 ` bug#2532: " YAMAMOTO Mitsuharu
2009-03-06 19:20 ` Adrian Robert
-- strict thread matches above, loose matches on Subject: below --
2009-03-01 23:52 David Reitter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='5393D476-3312-4DF3-AF39-6D698B7FDA49__28963.7562273585$1236225980$gmane$org@gmail.com' \
--to=david.reitter@gmail.com \
--cc=2532@emacsbugs.donarmstrong.com \
--cc=adrian.b.robert@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.