all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* (require) is still required, even after (package-initialize)
@ 2019-10-28 18:16 Pankaj Jangid
  2019-10-29 19:02 ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Pankaj Jangid @ 2019-10-28 18:16 UTC (permalink / raw)
  To: Emacs mailing list


The documentation says that (require 'package) is not required if
(package-initialize) is already invoked in init.el.

But flymake is reporting "server-running-p is not known to be defined"
in the below statement,

(unless (server-running-p) (server-start))

I have also tried to call,

(eval-when-compile (package-initialize)) instead of just
(package-initialize). But still flymake is reporting the error.

(require 'server) solves the error.

Am I using package-initialize wrongly?

-- 
Pankaj Jangid



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

* Re: (require) is still required, even after (package-initialize)
  2019-10-28 18:16 (require) is still required, even after (package-initialize) Pankaj Jangid
@ 2019-10-29 19:02 ` Michael Heerdegen
  2019-10-30  3:06   ` Pankaj Jangid
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2019-10-29 19:02 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

Pankaj Jangid <pankaj.jangid@gmail.com> writes:

> The documentation says that (require 'package) is not required if
> (package-initialize) is already invoked in init.el.
>
> But flymake is reporting "server-running-p is not known to be defined"
> in the below statement,
>
> (unless (server-running-p) (server-start))
>
> I have also tried to call,
>
> (eval-when-compile (package-initialize)) instead of just
> (package-initialize). But still flymake is reporting the error.
>
> (require 'server) solves the error.
>
> Am I using package-initialize wrongly?

No, probably not.  "server" is built-in Emacs, so (package-initialize)
will not help.  Maybe it's a bug in a flymake addon package you use?  I
don't the the flymake source files in Emacs doing anything with the
server.  What's your setup - or do you have a recipe?

Regards,

Michael.



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

* Re: (require) is still required, even after (package-initialize)
  2019-10-29 19:02 ` Michael Heerdegen
@ 2019-10-30  3:06   ` Pankaj Jangid
  2019-10-30 10:35     ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Pankaj Jangid @ 2019-10-30  3:06 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Emacs mailing list

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Pankaj Jangid <pankaj.jangid@gmail.com> writes:
>
>> The documentation says that (require 'package) is not required if
>> (package-initialize) is already invoked in init.el.
>>
>> But flymake is reporting "server-running-p is not known to be defined"
>> in the below statement,
>>
>> (unless (server-running-p) (server-start))
>>
>> I have also tried to call,
>>
>> (eval-when-compile (package-initialize)) instead of just
>> (package-initialize). But still flymake is reporting the error.
>>
>> (require 'server) solves the error.
>>
>> Am I using package-initialize wrongly?
>
> No, probably not.  "server" is built-in Emacs, so (package-initialize)
> will not help.  Maybe it's a bug in a flymake addon package you use?  I
> don't the the flymake source files in Emacs doing anything with the
> server.  What's your setup - or do you have a recipe?
>

I am using the built-in flymake only. Have installed only two
extensions:

flymake-rust
flymake-lua

But I don't think this is causing any issue in init.el. For server
setup, I have only this in my init.el:

;; start server for emacsclient support
(require 'server)			; I don't know why this is
					; required after
					; package-initialize
(unless (server-running-p) (server-start))


Regards,
-- 
Pankaj Jangid



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

* Re: (require) is still required, even after (package-initialize)
  2019-10-30  3:06   ` Pankaj Jangid
@ 2019-10-30 10:35     ` Michael Heerdegen
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Heerdegen @ 2019-10-30 10:35 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Emacs mailing list

Pankaj Jangid <pankaj.jangid@gmail.com> writes:

> But I don't think this is causing any issue in init.el. For server
> setup, I have only this in my init.el:
>
> ;; start server for emacsclient support
> (require 'server)			; I don't know why this is
> 					; required after
> 					; package-initialize
> (unless (server-running-p) (server-start))

Ok, so there is no relation to flymake.

"server" is a built-in library, and `server-running-p' is not an
autoload function, so (require 'server) is needed in your init file.

package.el is the Emacs package manager to install packages from outside
repositories.  `package-intitialize' activates your installed packages
(it doesn't load them).  But that doesn't matter here since server is
not a package at all.  You want to keep `package-intitialize' and you
use it correctly, it just doesn't cover as much as you thought.

Did that answer all of your questions?


Regards,

Michael.



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

end of thread, other threads:[~2019-10-30 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-28 18:16 (require) is still required, even after (package-initialize) Pankaj Jangid
2019-10-29 19:02 ` Michael Heerdegen
2019-10-30  3:06   ` Pankaj Jangid
2019-10-30 10:35     ` Michael Heerdegen

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.