Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You had mail, but the super-user read it, and deleted it!


computers / gnu.emacs.help / use-package configuration for calc not run at startup

SubjectAuthor
* use-package configuration for calc not run at startupLoris Bennett
`* Re: use-package configuration for calc not run at startupGarjola Dindi
 `- Re: use-package configuration for calc not run at startupLoris Bennett

1
use-package configuration for calc not run at startup

<875y5phnlq.fsf@debian-BULLSEYE-live-builder-AMD64>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=6&group=gnu.emacs.help#6

  copy link   Newsgroups: gnu.emacs.help
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: loris.bennett@fu-berlin.de (Loris Bennett)
Newsgroups: gnu.emacs.help
Subject: use-package configuration for calc not run at startup
Date: Tue, 08 Aug 2023 11:47:45 +0200
Organization: ZEDAT, Freie Universität Berlin
Lines: 46
Message-ID: <875y5phnlq.fsf@debian-BULLSEYE-live-builder-AMD64>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: news.uni-berlin.de 0Ul4L0MlSGGt0sE4wwuEHA1GHMEYT71EQlbtIOKMZPnPHm
Cancel-Lock: sha1:hKqcjMCgl2N942VXVMewvZyXo2M= sha1:4ecDTXMe1XutI2CjAtlECrYrn+M= sha256:qmzebmtGfbLiDCiR/PQoJsSJCly1al1YIHo4X1K+piU=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
 by: Loris Bennett - Tue, 8 Aug 2023 09:47 UTC

Hi,

In my initialisation for Emacs I have:

(use-package calc
:demand t
:custom
(math-additional-units
'((bits nil "bits")
(B "8 * bits" "Bytes")

;; Decimal units
(kB "1000 B" "kilobyte")
(MB "1000^2 B" "megabyte")
(GB "1000^3 B" "gigabyte")
(TB "1000^4 B" "terabyte")
(PB "1000^5 B" "petabyte")
(EB "1000^6 B" "exabyte")
(ZB "1000^7 B" "zettabyte")
(YB "1000^8 B" "yottabyte")

;; Binary units
(KiB "1024 B" "kibibyte")
(MiB "1024^2 B" "mebibyte")
(GiB "1024^3 B" "gibibyte")
(TiB "1024^4 B" "tebibyte")
(PiB "1024^5 B" "pebibyte")
(EiB "1024^6 B" "exbibyte")
(ZiB "1024^7 B" "zebibyte")
(YiB "1024^8 B" "yobibyte")))
:config
(setq math-units-table nil))

However, this seems never to be run when Emacs is started, as calc is
unaware of units thus defined. However, the code before and after the
calc configuration is run. If I then go to the initialisation file and
explicitly eval the above code, everything works as expected.

Can anyone see what I am doing wrong?

Cheers,

Loris

--
This signature is currently under constuction.

Re: use-package configuration for calc not run at startup

<878r97gx8n.fsf@pc-117-162.gandi.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=15&group=gnu.emacs.help#15

  copy link   Newsgroups: gnu.emacs.help
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: garjola@garjola.net (Garjola Dindi)
Newsgroups: gnu.emacs.help
Subject: Re: use-package configuration for calc not run at startup
Date: Fri, 15 Sep 2023 19:30:32 +0200
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <878r97gx8n.fsf@pc-117-162.gandi.net>
References: <875y5phnlq.fsf@debian-BULLSEYE-live-builder-AMD64>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="04b0b194742325c834504ca8f4bba733";
logging-data="3520401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gk/+gIKeo8IcB8Xg5QKPc"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:3Dy1+VmFD/gobs/5XWdiJYkSzBc=
sha1:Kfyga6RywnIuW9zqW4PdDzCYqao=
 by: Garjola Dindi - Fri, 15 Sep 2023 17:30 UTC

Hi,

Would replacing :custom by :init work?

--

Re: use-package configuration for calc not run at startup

<87ttnuj01f.fsf@zedat.fu-berlin.de>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=37&group=gnu.emacs.help#37

  copy link   Newsgroups: gnu.emacs.help
Path: i2pn2.org!i2pn.org!news.niel.me!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!fu-berlin.de!uni-berlin.de!not-for-mail
From: loris.bennett@fu-berlin.de (Loris Bennett)
Newsgroups: gnu.emacs.help
Subject: Re: use-package configuration for calc not run at startup
Date: Wed, 03 Jan 2024 09:25:48 +0100
Organization: FUB-IT (ex-ZEDAT), Freie Universität Berlin
Lines: 45
Message-ID: <87ttnuj01f.fsf@zedat.fu-berlin.de>
References: <875y5phnlq.fsf@debian-BULLSEYE-live-builder-AMD64>
<878r97gx8n.fsf@pc-117-162.gandi.net>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: news.uni-berlin.de XGhGQhTWYtCoqbqXTxNuKgCwdWa5nypWbDRVcpDP1AaR3a
Cancel-Lock: sha1:j3SFswRfkgiCVmqmGbSZ95yV6sU= sha1:gexY3uTnx7AKLsv0rZWIuBarcJY= sha256:qVsyzrVOpyMEwMcQGz8SDcmOyEWu+F1W1G5uehzYHz0=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
 by: Loris Bennett - Wed, 3 Jan 2024 08:25 UTC

Garjola Dindi <garjola@garjola.net> writes:

> Hi,
>
> Would replacing :custom by :init work?

The replacement on its own didn't work, but the following did:

(use-package calc
:defines (math-additional-units math-units-table)
:init
(setq math-additional-units
'((bits nil "bits")
(B "8 * bits" "Bytes")

;; Decimal units
(kB "1000 B" "kilobyte")
(MB "1000^2 B" "megabyte")
(GB "1000^3 B" "gigabyte")
(TB "1000^4 B" "terabyte")
(PB "1000^5 B" "petabyte")
(EB "1000^6 B" "exabyte")
(ZB "1000^7 B" "zettabyte")
(YB "1000^8 B" "yottabyte")

;; Binary units
(KiB "1024 B" "kibibyte")
(MiB "1024^2 B" "mebibyte")
(GiB "1024^3 B" "gibibyte")
(TiB "1024^4 B" "tebibyte")
(PiB "1024^5 B" "pebibyte")
(EiB "1024^6 B" "exbibyte")
(ZiB "1024^7 B" "zebibyte")
(YiB "1024^8 B" "yobibyte")))
(setq math-units-table nil))

The main issue seems to have been that the 'setq' in front of
'math-additional-units' was missing in my original configuration.

Cheers,

Loris

--
This signature is currently under constuction.


computers / gnu.emacs.help / use-package configuration for calc not run at startup

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor