Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948121 - app-emacs/cask: Symbol's function definition is void: cask-initialize
Summary: app-emacs/cask: Symbol's function definition is void: cask-initialize
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-14 21:34 UTC by opensauce04
Modified: 2025-01-15 15:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description opensauce04 2025-01-14 21:34:17 UTC
After updating to Cask 0.9.0, I am experiencing the following error in Emacs:

```
Symbol's function definition is void: cask-initialize
```

Additionally, as could be expected, none of my Cask packages are loading.
Comment 1 opensauce04 2025-01-15 00:46:16 UTC
Actually upon looking at this closer this seems to be an upstream change where the function you must call to perform the same functionality is named `cask--initialize`, indicating that it is now intended as an internal function of the package, and there is an accompanying comment indicating that the `cask-initialize` functionality was dropped in an official capacity as of 0.9.0:

> I would not =require cask= in your dot.emacs
since cask is now largely a command-line tool independent of
whatever you do within emacs.  If you are calling
=cask-initialize= in your dot.emacs [...] I'm
afraid you're on your own.

Would it be better to un-drop 0.8.8 to maintain the "intended" way of leveraging this functionality, or should users just call this internal function externally (kind of jank)?
Comment 2 opensauce04 2025-01-15 00:48:27 UTC
For clarification I am not suggesting a downgrade, I am simply suggesting that an ebuild for 0.8.8 would be available.
Comment 3 Maciej Barć gentoo-dev 2025-01-15 08:05:08 UTC
If I understand correctly you ARE using `(require cask)`? If so, you should not do that, Cask is only to be used on the CLI.

There is no `cask-initialize` in Cask 0.9.0.
Comment 4 opensauce04 2025-01-15 12:19:53 UTC
> If I understand correctly you ARE using `(require cask)`? If so, you should not do that, Cask is only to be used on the CLI.
> There is no `cask-initialize` in Cask 0.9.0.

Correct, but I want to use this functionality. That is why I am suggesting the possible re-introduction of 0.8.8, as this functionality exists there in an intentional capacity.

As I mentioned, it is possible to get the same effect by calling `cask--initialize`, but this seems to be more of a happy accident than an intended feature as of 0.9.0.
Comment 5 Maciej Barć gentoo-dev 2025-01-15 14:49:10 UTC
(In reply to opensauce04 from comment #4)
> As I mentioned, it is possible to get the same effect by calling
> `cask--initialize`, but this seems to be more of a happy accident than an
> intended feature as of 0.9.0.

Again, Cask is intended to be used on the CLI. I think that function being "adevertised as public" ("-" instead of "--") had nothing to do with it being part of any ELisp lib API. 

There was another pkg clearly made to be loaded by Emacs - cask-mode, so it it clear which was made as a CLI tool and which ass a lib.

Furthermore, if you really wish to use `cask-initialize` or `cask--initialize` there are mechanisms in Emacs to bind/use the function you have.

Marking as *invalid* since this is "unsupported" by upstream pkg itself.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-15 15:07:19 UTC
You're free to put an old Cask in a local repository, see e.g. https://wiki.gentoo.org/wiki/Downgrading_a_package_to_removed_version.
Comment 7 opensauce04 2025-01-15 15:45:35 UTC
> There was another pkg clearly made to be loaded by Emacs - cask-mode, so it it clear which was made as a CLI tool and which ass a lib.

FYI the cask-mode package provides a major mode for syntax highlighting when editing files related to cask, and is entirely unrelated to Cask's functionality