unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Activating tabbar after installation via elpa on emacs 24.2.1
@ 2012-09-27 14:17 Rainer M Krug
  2012-09-27 23:02 ` Bastien
       [not found] ` <mailman.9877.1348786974.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Rainer M Krug @ 2012-09-27 14:17 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I just decided to install some standard packages via elpa, and I am running into problems with two
packages: tabbar and color-theme

I would like to acivate them in .emacs.d/emacs.el and start the tabbar-mode and set color-theme-hober

I tried
  (eval-after-load "tabbar"
      '(tabbar-mode)
    )

but this activates the tabbar mode, but does not show them. I have to disable it and enable it
again and then can I see the tabbar.

(tabbar-mode)

tells me

Debugger entered--Lisp error: (void-function tabbar-mode)

I get a similar error for

(eval-after-load "color-theme"
  'progn(
         (color-theme-initialize)
         (color-theme-hober)
         )
  )


Debugger entered--Lisp error: (invalid-function (color-theme-initialize))
  ((color-theme-initialize) (color-theme-hober))

even though I can execute ALT-x color-theme-initialize

I guess I am missing something basic...

Any ideas?

Thanks,

Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBkX/UACgkQoYgNqgF2egrt9QCeNoWW6n9/zMFYSaLnmHZfrPst
zNoAn32wOpWniIEkBaxNPIlF5wBWMy34
=Ere3
-----END PGP SIGNATURE-----




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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-27 14:17 Activating tabbar after installation via elpa on emacs 24.2.1 Rainer M Krug
@ 2012-09-27 23:02 ` Bastien
  2012-09-28  7:35   ` Rainer M Krug
       [not found] ` <mailman.9877.1348786974.855.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Bastien @ 2012-09-27 23:02 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: help-gnu-emacs

Hi Rainer,

Rainer M Krug <R.M.Krug@gmail.com> writes:

>   (eval-after-load "tabbar"
>       '(tabbar-mode)
>     )

I think it should be 

  (eval-after-load "tabbar"
      (tabbar-mode))

(no quote)

Btw, ELPA packages are initialized *after* Emacs loads your init file.
So it may often be a good idea to add (package-initialize) very early
in your init file, after you set the package-* options correctly.

-- 
 Bastien



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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
       [not found] ` <mailman.9877.1348786974.855.help-gnu-emacs@gnu.org>
@ 2012-09-28  0:02   ` Joost Kremers
  2012-09-28  7:38     ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Joost Kremers @ 2012-09-28  0:02 UTC (permalink / raw)
  To: help-gnu-emacs

Bastien wrote:
> Rainer M Krug <R.M.Krug@gmail.com> writes:
>
>>   (eval-after-load "tabbar"
>>       '(tabbar-mode)
>>     )
>
> I think it should be 
>
>   (eval-after-load "tabbar"
>       (tabbar-mode))
>
> (no quote)

eval-after-load is a funtion, so the form to be executed *should* be quoted.



-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
       [not found] <mailman.9853.1348755472.855.help-gnu-emacs@gnu.org>
@ 2012-09-28  0:14 ` Joost Kremers
  2012-09-28  8:03   ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Joost Kremers @ 2012-09-28  0:14 UTC (permalink / raw)
  To: help-gnu-emacs

Rainer M Krug wrote:
> I just decided to install some standard packages via elpa, and I am running into problems with two
> packages: tabbar and color-theme
>
> I would like to acivate them in .emacs.d/emacs.el and start the tabbar-mode and set color-theme-hober
>
> I tried
>   (eval-after-load "tabbar"
>       '(tabbar-mode)
>     )
>
> but this activates the tabbar mode, but does not show them. I have to disable it and enable it
> again and then can I see the tabbar.

see what happens when you ditch the eval-after-load completely. i
suspect that installing tabbar-mode through elpa already activates it,
so what you're doing with the eval-after-load call is deactivating it
again...

> I get a similar error for
>
> (eval-after-load "color-theme"
>   'progn(

this is wrong. it should be:

    '(progn

>          (color-theme-initialize)
>          (color-theme-hober)
>          )
>   )

note: the common way to write lisp is to not put the closing parens on a
separate line. just write:

(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)
     (color-theme-hober)))

looks much cleaner. (the parens are just there for the computer. as a
human, you should ignore them and look at the indentation.)
>
> Debugger entered--Lisp error: (invalid-function (color-theme-initialize))
>   ((color-theme-initialize) (color-theme-hober))

this is telling you that (color-theme-initialize) cannot be a function
(nor name one). which is correct, because it's a list. a list can only
be a function if its first element is the symbol `lambda'.

the reason why emacs thinks (color-theme-initialize) is a function is
because you've misplaced the paren with progn.

use the code snippet i gave above, it should (hopefully ;-) work.

HTH


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-27 23:02 ` Bastien
@ 2012-09-28  7:35   ` Rainer M Krug
  2012-09-28  7:40     ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2012-09-28  7:35 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/12 01:02, Bastien wrote:
> Hi Rainer,
> 
> Rainer M Krug <R.M.Krug@gmail.com> writes:
> 
>> (eval-after-load "tabbar" '(tabbar-mode) )
> 
> I think it should be
> 
> (eval-after-load "tabbar" (tabbar-mode))
> 
> (no quote)

Thanks - elisp is still a real challenge for me - I should spend some time on it.

> 
> Btw, ELPA packages are initialized *after* Emacs loads your init file. So it may often be a
> good idea to add (package-initialize) very early in your init file, after you set the package-*
> options correctly.

You are perfectly right here - this is the cause of the problem. I put (package-initialize) in my
init.el and it worked (after the other changes).

But what do you mean with package-* options?

I only set

(setq package-archives '(
                           ("ELPA" . "http://tromey.com/elpa/")
                           ("gnu" . "http://elpa.gnu.org/packages/")
                           ("suco" . "http://joseito.republika.pl/sunrise-commander/")
                           ("marmalade" . "http://marmalade-repo.org/packages/"))

and that in my emacs.org (el) file - should I move this into the init.el, or call
(package-initialize) in my emacs.org (el) file after I set the parameter?

Thanks,

Rainer

> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBlU18ACgkQoYgNqgF2egptHgCfc7K66Y8EPXf9nvP1LPeqPpVG
AqkAnj1QJObLObRQyrHm0D5M3aVnqaeT
=Wdhu
-----END PGP SIGNATURE-----




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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  0:02   ` Joost Kremers
@ 2012-09-28  7:38     ` Rainer M Krug
  0 siblings, 0 replies; 12+ messages in thread
From: Rainer M Krug @ 2012-09-28  7:38 UTC (permalink / raw)
  To: Joost Kremers; +Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/12 02:02, Joost Kremers wrote:
> Bastien wrote:
>> Rainer M Krug <R.M.Krug@gmail.com> writes:
>> 
>>> (eval-after-load "tabbar" '(tabbar-mode) )
>> 
>> I think it should be
>> 
>> (eval-after-load "tabbar" (tabbar-mode))
>> 
>> (no quote)
> 
> eval-after-load is a funtion, so the form to be executed *should* be quoted.

Thanks - this is the problem if one is copy-paste without knowing what these things mean - I stil
think elisp is kind of strange, ur rather unusual for me.

Cheers,

Rainer

> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBlU/QACgkQoYgNqgF2egryZQCeOS/qQf7ZCbunzF9kXnoHQhfV
MlYAn0eLs0dUb/7m18nAlbjClaz9vzLw
=6TLp
-----END PGP SIGNATURE-----



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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  7:35   ` Rainer M Krug
@ 2012-09-28  7:40     ` Bastien
  2012-09-28  8:11       ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2012-09-28  7:40 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: help-gnu-emacs

Hi Rainer,

Rainer M Krug <R.M.Krug@gmail.com> writes:

> But what do you mean with package-* options?

I mean `package-load-list' in particular.  

This defaults to '(all), which loads all packages that you downloaded
through M-x list-packages RET but you may want to load only some.

> I only set
>
> (setq package-archives '(
>                            ("ELPA" . "http://tromey.com/elpa/")
>                            ("gnu" . "http://elpa.gnu.org/packages/")
>                            ("suco" . "http://joseito.republika.pl/sunrise-commander/")
>                            ("marmalade" . "http://marmalade-repo.org/packages/"))
>
> and that in my emacs.org (el) file - should I move this into the init.el, or call
> (package-initialize) in my emacs.org (el) file after I set the parameter?

You should move this before (package-initialize), otherwise Package will
not be aware of these ELPA repos.

-- 
 Bastien



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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  0:14 ` Joost Kremers
@ 2012-09-28  8:03   ` Rainer M Krug
  2012-09-28 15:09     ` Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2012-09-28  8:03 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/12 02:14, Joost Kremers wrote:
> Rainer M Krug wrote:
>> I just decided to install some standard packages via elpa, and I am running into problems 
>> with two packages: tabbar and color-theme
>> 
>> I would like to acivate them in .emacs.d/emacs.el and start the tabbar-mode and set 
>> color-theme-hober
>> 
>> I tried (eval-after-load "tabbar" '(tabbar-mode) )
>> 
>> but this activates the tabbar mode, but does not show them. I have to disable it and enable 
>> it again and then can I see the tabbar.
> 
> see what happens when you ditch the eval-after-load completely. i suspect that installing 
> tabbar-mode through elpa already activates it, so what you're doing with the eval-after-load 
> call is deactivating it again...

Still the problems, but I saw that emacs 24 has it's own way of handling color themes, and that is
what I am using:

(load-theme 'wheatgrass t)

> 
>> I get a similar error for
>> 
>> (eval-after-load "color-theme" 'progn(
> 
> this is wrong. it should be:
> 
> '(progn
> 
>> (color-theme-initialize) (color-theme-hober) ) )
> 
> note: the common way to write lisp is to not put the closing parens on a separate line. just 
> write:
> 
> (eval-after-load "color-theme" '(progn (color-theme-initialize) (color-theme-hober)))
> 
> looks much cleaner. (the parens are just there for the computer. as a human, you should ignore 
> them and look at the indentation.)

Good point - I am used to pascal, R and a bit of C, where the brackets are closing on the new
lines, but I agree - if one looks at the indentation, it is quite easy to understand.

>> 
>> Debugger entered--Lisp error: (invalid-function (color-theme-initialize)) 
>> ((color-theme-initialize) (color-theme-hober))
> 
> this is telling you that (color-theme-initialize) cannot be a function (nor name one). which
> is correct, because it's a list. a list can only be a function if its first element is the
> symbol `lambda'.
> 
> the reason why emacs thinks (color-theme-initialize) is a function is because you've misplaced 
> the paren with progn.
> 
> use the code snippet i gave above, it should (hopefully ;-) work.

Hm - i would say many things still to learn.

Thanks a lot for your explanations,

Rainer

> 
> HTH
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBlWckACgkQoYgNqgF2egrwrgCfe4wkc2RXiTwu08caJKI8iIE6
m6AAoIiNWwCx4a7/IagnMwqdxf7dyjKi
=fIqu
-----END PGP SIGNATURE-----




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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  7:40     ` Bastien
@ 2012-09-28  8:11       ` Rainer M Krug
  2012-09-28  8:25         ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2012-09-28  8:11 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/12 09:40, Bastien wrote:
> Hi Rainer,
> 
> Rainer M Krug <R.M.Krug@gmail.com> writes:
> 
>> But what do you mean with package-* options?
> 
> I mean `package-load-list' in particular.
> 
> This defaults to '(all), which loads all packages that you downloaded through M-x list-packages
> RET but you may want to load only some.

OK - was wondering already if it is loading all packages, which might be delaying the start and
using more memory.

> 
>> I only set
>> 
>> (setq package-archives '( ("ELPA" . "http://tromey.com/elpa/") ("gnu" .
>> "http://elpa.gnu.org/packages/") ("suco" . "http://joseito.republika.pl/sunrise-commander/") 
>> ("marmalade" . "http://marmalade-repo.org/packages/"))
>> 
>> and that in my emacs.org (el) file - should I move this into the init.el, or call 
>> (package-initialize) in my emacs.org (el) file after I set the parameter?
> 
> You should move this before (package-initialize), otherwise Package will not be aware of these
> ELPA repos.

OK - but could I should be able to put these statements as first commands into my emacs.org - correct?

Rainer

> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBlW7QACgkQoYgNqgF2egrPMgCfdtFuQUK4unM1Dv9khaq0lysZ
aiYAnRYNMEz9FE66j/6XeKRVCCf1z4Oa
=lqjb
-----END PGP SIGNATURE-----




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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  8:11       ` Rainer M Krug
@ 2012-09-28  8:25         ` Bastien
  2012-09-28  8:29           ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2012-09-28  8:25 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: help-gnu-emacs

Rainer M Krug <R.M.Krug@gmail.com> writes:

> OK - but could I should be able to put these statements as first
> commands into my emacs.org - correct?

AFAIU yes.

-- 
 Bastien



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

* Re: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  8:25         ` Bastien
@ 2012-09-28  8:29           ` Rainer M Krug
  0 siblings, 0 replies; 12+ messages in thread
From: Rainer M Krug @ 2012-09-28  8:29 UTC (permalink / raw)
  To: Bastien; +Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28/09/12 10:25, Bastien wrote:
> Rainer M Krug <R.M.Krug@gmail.com> writes:
> 
>> OK - but could I should be able to put these statements as first commands into my emacs.org -
>> correct?
> 
> AFAIU yes.
> 

Great - thanks a lot

Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBlX/wACgkQoYgNqgF2egp7hQCgg6f++Q6IiqaCLFJ6F1k7vUBL
dFcAnA9s7jV3VhhH/w1pF9boVax/rcpM
=bxDE
-----END PGP SIGNATURE-----



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

* RE: Activating tabbar after installation via elpa on emacs 24.2.1
  2012-09-28  8:03   ` Rainer M Krug
@ 2012-09-28 15:09     ` Drew Adams
  0 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2012-09-28 15:09 UTC (permalink / raw)
  To: 'Rainer M Krug', help-gnu-emacs

> Still the problems, but I saw that emacs 24 has it's own way 
> of handling color themes, and that is what I am using:
> (load-theme 'wheatgrass t)

Not quite.  Emacs 24 has its own way of handling color schemes, in the general
sense of the word.

Emacs 24 has nothing to do with color themes.  It has a similar but separate
feature, called "custom" themes.  This is different from color themes, which are
what library `color-theme.el' is about.




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

end of thread, other threads:[~2012-09-28 15:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 14:17 Activating tabbar after installation via elpa on emacs 24.2.1 Rainer M Krug
2012-09-27 23:02 ` Bastien
2012-09-28  7:35   ` Rainer M Krug
2012-09-28  7:40     ` Bastien
2012-09-28  8:11       ` Rainer M Krug
2012-09-28  8:25         ` Bastien
2012-09-28  8:29           ` Rainer M Krug
     [not found] ` <mailman.9877.1348786974.855.help-gnu-emacs@gnu.org>
2012-09-28  0:02   ` Joost Kremers
2012-09-28  7:38     ` Rainer M Krug
     [not found] <mailman.9853.1348755472.855.help-gnu-emacs@gnu.org>
2012-09-28  0:14 ` Joost Kremers
2012-09-28  8:03   ` Rainer M Krug
2012-09-28 15:09     ` Drew Adams

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