issue4: User variable default value reported incorrectly

Priority: bug Status: resolved
Messages
msg5 (view) Author: nicktastic Date: 2008-09-19.15:25:36
The default value of variables defined with define_variable is remembered for
use by the help system; however if the variable is changed the default value is
incorrectly reported. This may only apply to certain types of variables.

1. Change one of the default MIME type external handlers:
define_mime_type_external_handler("application/pdf", "xpdf");
2. C-h v mime_type_external_handlers
3. Notice that the default listed for /^application\/pdf$/ is xpdf when it
should be evince.
msg7 (view) Author: nicktastic Date: 2008-09-19.15:27:21
<retroj`> M-x describe-variable tells a default value for variables.  I wonder
where it gets that information.  it seems to be incorrect
<retroj`> at least it's incorrect for mime_type_external_handlers
<nicktastic> Are you looking into it, or shall I file a bug?
<retroj`> I shouldn't spend more time on conkeror today :)  :(
<jbms> nicktastic: it gets the information from the call to define_variable
<jbms> nicktastic: perhaps the default value should not be listed if it is an object
<nicktastic> Make a deep copy of the original?
<jbms> I don't think it is a good idea
<jbms> it probably just shouldn't be listed
<jbms> it isn't that useful, anyway, I don't think
<nicktastic> I think it is useful but I can't give an example at the moment.
I'll give it some thought after work.
<jbms> well, the point is you can always hit \ to view the definition in the
source code
<jbms> and that will be more reliable
<nicktastic> Incidentally, why would deep copies be a bad idea? Memory wasted
for no good reason?
<jbms> yeah
<jbms> I guess realistically it is not very much memory
<jbms> deep copying doesn't necessarily work, though
<retroj`> agree... that would waste memory
<retroj`> it could serialize it instead, but I see no compelling reason to go to
such lengths
<jbms> I seems though that putting a lot of complexity into the describe
variable feature doesn't make too much sense
<jbms> because in a lot of cases it might be some number that is actually taken
from a set of constants, for instance
<jbms> and then showing the default value as a number isn't very helpful
<nicktastic> Aye, like OPEN_NEW_BUFFER_BACKGROUND
msg105 (view) Author: jbms Date: 2008-10-15.01:25:57
The default value is no longer displayed if it is an object and identical to the current value.
History
Date User Action Args
2008-10-15 01:25:57jbmssetstatus: chatting -> resolved
messages: + msg105
2008-09-19 15:27:21nicktasticsetmessages: + msg7
2008-09-19 15:26:55nicktasticsetmessages: - msg6
2008-09-19 15:26:50nicktasticsetstatus: unread -> chatting
messages: + msg6
2008-09-19 15:25:36nicktasticcreate