unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
@ 2009-03-01 23:52 ` David Reitter
  2009-05-04 16:35   ` bug#2532: marked as done (NS: ns-expand-space / slider in Preferences dialog not functional) Emacs bug Tracking System
  0 siblings, 1 reply; 7+ messages in thread
From: David Reitter @ 2009-03-01 23:52 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

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).

This is with a vanilla 23/NS build from today's CVS.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
@ 2009-03-04 21:35 Adrian Robert
  2009-03-05  3:39 ` David Reitter
       [not found] ` <5393D476-3312-4DF3-AF39-6D698B7FDA49@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian Robert @ 2009-03-04 21:35 UTC (permalink / raw)
  To: 2532; +Cc: David Reitter

> 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.







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
  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
       [not found] ` <5393D476-3312-4DF3-AF39-6D698B7FDA49@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread
From: David Reitter @ 2009-03-05  3:39 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 2532, Emacs-Devel devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
       [not found] ` <5393D476-3312-4DF3-AF39-6D698B7FDA49@gmail.com>
@ 2009-03-06 19:20   ` Adrian Robert
       [not found]   ` <D847E263-9F65-417B-B881-CD1471860821@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Adrian Robert @ 2009-03-06 19:20 UTC (permalink / raw)
  To: David Reitter; +Cc: 2532, Emacs-Devel devel


On Mar 5, 2009, at 5:39 AM, David Reitter wrote:

> 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.
> ...
> 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.

This is no longer true -- running -q or -Q now ignores the plist --  
though not X resources, I believe.  The one difference between the NS  
defaults and X resources is that the defaults system is read/write,  
whereas X resources are for some strange reason read-only by design.   
After various discussion here, I now believe this difference is  
fundamental, and that the NS defaults system should therefore be used  
in Emacs only internally for parameters that are specific to NS and  
not set by users.  This includes reading existing system settings  
like anti-aliasing threshold, as well as storing previous directories  
and window locations for file open/save dialogs.  Completely behind- 
the-scenes stuff.

I would advocate transitioning all of the ns-xxx lisp variables that  
are not stored in defaults to the customization system.

I am not sure if it is appropriate to do this under pretest,  
however.  It would be a user-visible change and potentially cause  
unexpected side effects.







^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
       [not found]   ` <D847E263-9F65-417B-B881-CD1471860821@gmail.com>
@ 2009-03-06 19:35     ` David Reitter
  2009-03-07  1:09     ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 7+ messages in thread
From: David Reitter @ 2009-03-06 19:35 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 2532, Emacs-Devel devel

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

On 6 Mar 2009, at 14:20, Adrian Robert wrote:

> This is no longer true -- running -q or -Q now ignores the plist --  
> though not X resources, I believe.  The one difference between the  
> NS defaults and X resources is that the defaults system is read/ 
> write, whereas X resources are for some strange reason read-only by  
> design.  After various discussion here, I now believe this  
> difference is fundamental, and that the NS defaults system should  
> therefore be used in Emacs only internally for parameters that are  
> specific to NS and not set by users.  This includes reading existing  
> system settings like anti-aliasing threshold, as well as storing  
> previous directories and window locations for file open/save  
> dialogs.  Completely behind-the-scenes stuff.

Yes, I agree.  It's great that there is now a way to access the NS  
defaults system.

I would advocate, however, to only use the NS prefs systems for  
variables that cannot be implemented with the customization system,  
i.e. stuff that needs to be initialized on startup, because user files  
are read.

> I am not sure if it is appropriate to do this under pretest,  
> however.  It would be a user-visible change and potentially cause  
> unexpected side effects.

Up to the maintainers to decide:
Is "user-visibility" the right criterion?  (Bug fixes are user-visible!)
Shouldn't it be "dangerous" vs. not, and "bug fixes" vs. "features",  
and "recent regressions" vs. not?


--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional
       [not found]   ` <D847E263-9F65-417B-B881-CD1471860821@gmail.com>
  2009-03-06 19:35     ` David Reitter
@ 2009-03-07  1:09     ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 7+ messages in thread
From: YAMAMOTO Mitsuharu @ 2009-03-07  1:09 UTC (permalink / raw)
  To: Adrian Robert; +Cc: David Reitter, 2532, Emacs-Devel devel

>>>>> On Fri, 6 Mar 2009 21:20:13 +0200, Adrian Robert <adrian.b.robert@gmail.com> said:

> I would advocate transitioning all of the ns-xxx lisp variables that
> are not stored in defaults to the customization system.

> I am not sure if it is appropriate to do this under pretest,
> however.  It would be a user-visible change and potentially cause
> unexpected side effects.

Emacs already has the line-spacing setting as frame parameter,
buffer-local variable, and text property.  So, ns-expand-space
can/should be removed.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#2532: marked as done (NS: ns-expand-space / slider in  Preferences dialog not functional)
  2009-03-01 23:52 ` bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional David Reitter
@ 2009-05-04 16:35   ` Emacs bug Tracking System
  0 siblings, 0 replies; 7+ messages in thread
From: Emacs bug Tracking System @ 2009-05-04 16:35 UTC (permalink / raw)
  To: David Reitter

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]


Your message dated Mon, 4 May 2009 12:26:14 -0400
with message-id <74542FC5-AA1A-4CC1-A73E-D5284DE5CD34@gmail.com>
and subject line fixed
has caused the Emacs bug report #2532,
regarding NS: ns-expand-space / slider in Preferences dialog not functional
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
2532: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2532
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 6964 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 484 bytes --]

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).

This is with a vanilla 23/NS build from today's CVS.

[-- Attachment #2.1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

[-- Attachment #3: Type: message/rfc822, Size: 2484 bytes --]

From: David Reitter <david.reitter@gmail.com>
To: 2532-done@emacsbugs.donarmstrong.com
Subject: fixed
Date: Mon, 4 May 2009 12:26:14 -0400
Message-ID: <74542FC5-AA1A-4CC1-A73E-D5284DE5CD34@gmail.com>

fixed by taking out Preferences dialog and ns-expand-space


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-05-04 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <74542FC5-AA1A-4CC1-A73E-D5284DE5CD34@gmail.com>
2009-03-01 23:52 ` bug#2532: NS: ns-expand-space / slider in Preferences dialog not functional David Reitter
2009-05-04 16:35   ` bug#2532: marked as done (NS: ns-expand-space / slider in Preferences dialog not functional) Emacs bug Tracking System
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
     [not found] ` <5393D476-3312-4DF3-AF39-6D698B7FDA49@gmail.com>
2009-03-06 19:20   ` Adrian Robert
     [not found]   ` <D847E263-9F65-417B-B881-CD1471860821@gmail.com>
2009-03-06 19:35     ` David Reitter
2009-03-07  1:09     ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).