all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Local elisp library files and variable corruption
@ 2016-06-24 18:59 Live System User
  2016-06-24 19:16 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Live System User @ 2016-06-24 18:59 UTC (permalink / raw)
  To: emacs-devel

Hi,

        I'm trying to track down a possible problem with using
        local copies of elisp library files and variable
        corruption.

        I know that some Emacs libraries are dumped into Emacs
        so this may not be a problem with usage but only with its
        interaction with functions like `describe-variable'.

        Here's an example:

0. Create a .emacs file with the contents:

(add-to-list 'load-path "~/.emacs.d/lisp")
(load-theme 'tramp t nil) ; Load an available theme

1. Put a copy of "dired.el.gz" in ~/.emacs.d/lisp

2. emacs &

3. M-x describe-variable RET after-init-hook


        The variable `after-init-hook' then appears to be corrupted:

after-init-hook is a variable defined in ‘startup.el’.
Its value is (#[0 "\305\211\b\235\203\306\b\"\301\307!\210\210	\205(\n\205 \v\205 \310 ?\311 \210\312\211)\207"
     [command-line-args desktop-save-mode desktop-restore-frames initial-window-system inhibit-startup-screen "--no-desktop" delete 0 daemonp desktop-read t]
     4]
 x-wm-set-size-hint)


        Thanks.




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

* Re: Local elisp library files and variable corruption
  2016-06-24 18:59 Local elisp library files and variable corruption Live System User
@ 2016-06-24 19:16 ` Eli Zaretskii
  2016-06-24 19:23   ` Noam Postavsky
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eli Zaretskii @ 2016-06-24 19:16 UTC (permalink / raw)
  To: Live System User; +Cc: emacs-devel

> From: Live System User <nyc4bos@aol.com>
> Date: Fri, 24 Jun 2016 14:59:05 -0400
> 
> 3. M-x describe-variable RET after-init-hook
> 
> 
>         The variable `after-init-hook' then appears to be corrupted:
> 
> after-init-hook is a variable defined in ‘startup.el’.
> Its value is (#[0 "\305\211\b\235\203\306\b\"\301\307!\210\210	\205(\n\205 \v\205 \310 ?\311 \210\312\211)\207"
>      [command-line-args desktop-save-mode desktop-restore-frames initial-window-system inhibit-startup-screen "--no-desktop" delete 0 daemonp desktop-read t]
>      4]
>  x-wm-set-size-hint)

Why do you say this is corrupted?  It looks like bytecode to me.



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

* Re: Local elisp library files and variable corruption
  2016-06-24 19:16 ` Eli Zaretskii
@ 2016-06-24 19:23   ` Noam Postavsky
  2016-06-25 20:37   ` Live System User
  2016-06-26  5:29   ` Tom
  2 siblings, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2016-06-24 19:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Live System User, emacs-devel

On Fri, Jun 24, 2016 at 3:16 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Live System User <nyc4bos@aol.com>
>> Date: Fri, 24 Jun 2016 14:59:05 -0400
>>
>> 3. M-x describe-variable RET after-init-hook
>>
>>
>>         The variable `after-init-hook' then appears to be corrupted:
>>
>> after-init-hook is a variable defined in ‘startup.el’.
>> Its value is (#[0 "\305\211 \235\203\306 \"\301\307!\210\210  \205(\n\205  \205 \310 ?\311 \210\312\211)\207"
>>      [command-line-args desktop-save-mode desktop-restore-frames initial-window-system inhibit-startup-screen "--no-desktop" delete 0 daemonp desktop-read t]
>>      4]
>>  x-wm-set-size-hint)
>
> Why do you say this is corrupted?  It looks like bytecode to me.
>

Specifically the compiled form of the anonymous function added by
desktop.el (look near the end):

(add-hook
  'after-init-hook
  (lambda ()
    (let ((key "--no-desktop"))
      (when (member key command-line-args)
...



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

* Re: Local elisp library files and variable corruption
  2016-06-24 19:16 ` Eli Zaretskii
  2016-06-24 19:23   ` Noam Postavsky
@ 2016-06-25 20:37   ` Live System User
  2016-06-25 20:54     ` Noam Postavsky
  2016-06-26  5:29   ` Tom
  2 siblings, 1 reply; 6+ messages in thread
From: Live System User @ 2016-06-25 20:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Live System User <nyc4bos@aol.com>
>> Date: Fri, 24 Jun 2016 14:59:05 -0400
>> 
>> 3. M-x describe-variable RET after-init-hook
>> 
>> 
>>         The variable `after-init-hook' then appears to be corrupted:
>> 
>> after-init-hook is a variable defined in ‘startup.el’.
>> Its value is (#[0 "\305\211\b\235\203\306\b\"\301\307!\210\210	\205(\n\205 \v\205 \310 ?\311 \210\312\211)\207"
>>      [command-line-args desktop-save-mode desktop-restore-frames initial-window-system inhibit-startup-screen "--no-desktop" delete 0 daemonp desktop-read t]
>>      4]
>>  x-wm-set-size-hint)
>
> Why do you say this is corrupted?  It looks like bytecode to me.

Aha!

Another poster, Noam, pointed out that this is from the compiled
form of the anonymous function added by desktop.el.gz.

How does one go about getting `describe-variable' to return the
non-bytecode version of a variable, including, in this case, the
add-hook `after-init-hook' value from desktop.el.gz?

Thanks.






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

* Re: Local elisp library files and variable corruption
  2016-06-25 20:37   ` Live System User
@ 2016-06-25 20:54     ` Noam Postavsky
  0 siblings, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2016-06-25 20:54 UTC (permalink / raw)
  To: Live System User; +Cc: Eli Zaretskii, emacs-devel

On Sat, Jun 25, 2016 at 4:37 PM, Live System User <nyc4bos@aol.com> wrote:
> How does one go about getting `describe-variable' to return the
> non-bytecode version of a variable, including, in this case, the
> add-hook `after-init-hook' value from desktop.el.gz?

You can't, the information is not recorded anywhere. I think the best
solution is to give a name to that function in desktop.el. Then you
would see something like

    Its value is (desktop-maybe-restore x-wm-set-size-hint)



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

* Re: Local elisp library files and variable corruption
  2016-06-24 19:16 ` Eli Zaretskii
  2016-06-24 19:23   ` Noam Postavsky
  2016-06-25 20:37   ` Live System User
@ 2016-06-26  5:29   ` Tom
  2 siblings, 0 replies; 6+ messages in thread
From: Tom @ 2016-06-26  5:29 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz <at> gnu.org> writes:
> > 
> >         The variable `after-init-hook' then appears to be corrupted:
> > 
> > after-init-hook is a variable defined in ‘startup.el’.
> > Its value is (#[0 "\305\211\b\235\203\306\b\"\301\307!\210\210
\205(\n\205 \v\205 \310 ?\311 \210\312\211)\207"
> >      [command-line-args desktop-save-mode desktop-restore-frames
initial-window-system
> inhibit-startup-screen "--no-desktop" delete 0 daemonp desktop-read t]
> >      4]
> >  x-wm-set-size-hint)
> 
> Why do you say this is corrupted?  It looks like bytecode to me.
> 

Wouldn't it be better if describe-variable didn't just dump the bytecode
there with octal sequences and stuff, confusing users who don't know
what that is? 

If it can detect a bytecoded value then it could say the value is
bytecoded and there could be a button or something to show the actual
bytecode if somebody wants to see it.

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

end of thread, other threads:[~2016-06-26  5:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24 18:59 Local elisp library files and variable corruption Live System User
2016-06-24 19:16 ` Eli Zaretskii
2016-06-24 19:23   ` Noam Postavsky
2016-06-25 20:37   ` Live System User
2016-06-25 20:54     ` Noam Postavsky
2016-06-26  5:29   ` Tom

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.