ht.elc fails to provide feature ht - emacs

I use emacs org-mode heavily, but don't usually use emacs otherwise. I am still using emacs 25.3 but also have 26.3 installed. This evening, after a Windows Update (likely cause of the problem?), when I restarted emacs (runemacs) under 25.3 I received the following error message.
error: Required feature ‘ht’ was not provided
I have also tried running it under emacs 26.3 and receive a slightly more helpful error message "c:etc. etc. /AppData/Roaming/.emacs.d/elpa/ht-20190924.704/ht.elc failed to provide feature ‘ht’"
I have not changed or updated any of the packages in several weeks. So, it is unlikely to be a change in org-mode or emacs.
I have experimented around with a variety of different approaches but without any luck. Among other things I restored the elpa files and my customization files from a back-up of a couple of days ago without getting a different results.
package-list-package with emacs 25.3 works with the error message, and I can upgrade the packages (2) that can be upgraded. However that also makes no difference to the error message I receive when I restart emacs. This does imply that ht.elc is working since, without it, you can't install packages since the new package needs to have its hash code checked. If I delete the ht package and try to update packages without it, updates fail on the hash code check.
package-list-package with emacs 26.3 is a whole other problem which might be why I'm not using it. TLS connections fail, and it can't connect to melpa, orgmode.org, etc.
In any case, I can't load my customization files and can't use org-mode at this point. Anyone have any ideas, questions or suggestions?
Thanks in advance.

This is a solution, without being an answer.
Using package-list-packages, and looking at the details for the ht package, it showed an "alternative" version being available from melpa; same release number. So, I chose to install it and a refreshed list of packages then showed that I had the same version installed twice.
I then closed emacs and restarted it. It started with a similar error message, but this time referring to the dash package. Repeated the duplicate install process as described above.
I again closed emacs and restarted it, and now it loads and runs correctly.
I had tried previously to just delete the ht package from the elpa directory, but doing that and attempting to install a fresh package resulted in a shower of errors. I don't remember all of them but at least one of them was that emacs was unable to read the package signature.
So, problem solved, but I still have no idea why it occurred in the first place, since it had been weeks since I had updated any packages, nor why the restore of the directories from several days ago didn't solve the problem.
And before anyone yells at me about moving to the current emacs, I have now installed the missing dependencies and am running on 26.3.

Related

`Haskell` extension for `VSCode` not working on `Linux`

I installed ghcup and:
Stack 2.9.1
HLS 1.8.0
cabal 3.6.2
GHC 9.2.5
All of them are the recommended versions(I verified it using ghcup tui). Then I installed the Haskell extension in VSCode. Unfortunately, it doesn't work. I get syntax highlighting (from the Haskell Syntax Highlighting extension, which seems to be automatically installed alongside the Haskell extension) but there is no Intellisense, no code completion, no error detection and no interactive mode (-->>> evaluation). I experimented with different folders and haskell files. The filetype is correct, because every time I open a .hs file, the Haskell extension checks for updates. I even installed Codium, because I suspected a fault in VSCode, but it was the same there as well.
The hsl language server doesn't seem to be working in Neovim, either. I uninstalled ghcup (ghcup nuke) and reinstalled again. The result is exactly the same. I prepended the PATH and chose vanilla and non-vanilla Stack integration in either installations.
Am I doing something wrong?
OS: Linux Mint on Ubuntu 20.04.1, kernel 5.15.0-56.
After around 10 tries, I managed to fix the problem. It turned out I had three problems:
I had only 12 GB free on my Linux partition, but it seems more are needed. I realised it, when it turned out some haskell-language-server files were missing. I enlarged my Linux partition (something I should have done months ago). The new installation installed all files
The Haskell Language Server HLS was not added to the PATH. I solved it by putting this snippet in ~/.ghcup/config.yaml:
"haskell.serverEnvironment": {
"PATH": "${HOME}/.ghcup/bin:$PATH"
}
The server was now discovered by the Haskell VS Code extension but crashed 5 times and gave up on trying. Restarting it manually didn't help. I opened the logs: View->Output->Haskell and saw the error:
haskell-language-server-wrapper: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by haskell-language-server-wrapper)
It turns out, my Linux Mint distribution uses GLIBC_2.31, not 2.32. This is a very important library, which most applications on the system use. If you are a newbie, it is strongly advised that you DO NOT update it manually.
Instead, what I did, was install a version of the HLS, which used GLIBC_2.31. This problem occured in September and was "fixed" but apparently not very well. There are two options:
download the HLS deb10 version manually (didn't work for me):
ghcup install hls -u https://downloads.haskell.org/~hls/haskell-language-server-1.8.0.0/h
download using ghcup tui HLS version 1.7.0.0 (or whatever newest, which uses your glibc version) and a GHC, which supports that particular version of the HLS (in my case 9.0.2).
I think it's a good idea to preemptively reinstall the extension, in case it used the PATH to configure the HLS, so that its settings are restored to default. It takes up to 20 seconds to initialize the server, so be patient. You can see what's happening in the Output window and verify there are no more errors.
I hope this helps.

How to get Net-SMTP-SSL work with Bugzilla in Ubuntu 12.04?

I have installed Net-SMTP-SSL (/usr/bin/perl install-module.pl Net::SMTP::SSL) since I'd like to configure Bugzilla email with Gmail. I did't got any error. However, when I run './checksetup.pl --check-modules', I still get the result:
Checking for Net-SMTP-SSL (v1.01) not found
I also try to re-install it and I still get the same output. Here is my system information:
Ubuntu 12.04
Bugzilla 4.4.6
After having the same problem with Bugzilla recently, I ran across this rejected bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=897355
It mentions that there are some dependencies that Bugzilla isn't installing, but doesn't say which ones. So I just ran cpan and issued the upgrade command from the cpan console to upgrade all packages. This went though and installed a few dependencies from various packages that it said were missing. I didn't see which ones were related to the SMTP SSL package since it was installing stuff several levels deep in dependencies, but after running that and then running checksetup.pl in Bugzilla, the problem seemed to be fixed. Warning: It did take quite a while to upgrade all packages, though.
That fixes the issue with Bugzilla not detecting properly, but unfortunately it seems there's a bug in Net::SMTP::SSL conflicting with one of it's own dependencies. You'll get an error something like "Not a GLOB reference" if you try to run the package directly. You can see it by running this after updating all of the packages:
perl -MNet::SMTP::SSL -wE 'say $Net::SMTP::SSL::VERSION'
If you get a version number returned then it's working, but I get an error and have seen other posts about it, too. I haven't been able to fix this problem yet, but there's probably some combination of the SSL package and various versions of it's dependencies that actually works, just not the latest of each. Otherwise, I would think there would be a known issue in Bugzilla release notes as they would have run across it during testing.
I haven't had time to do it and haven't seen that anyone else has either including the package maintainer, but I suppose you could find all of the dependencies for Net::SMTP:SSL and then one by one update the packages using something like:
cpan upgrade Net::SMTP::SSL
Then replace Net::SMTP::SSL with each of it's dependencies one at a time and test using the perl command above. When it breaks, you'll know which package is conflicting. You can then roll that package back to an earlier version and update all other dependencies and hopefully it will fix the issue. It's definitely possible that no combination will work, though, and if that's the case, I'll be a little disappointed in Bugzilla's testing process.
You can find dependencies using various methods, but CPAN has one. Here's a link to an article about how to create a perl script to use it: https://metacpan.org/pod/CPAN::FindDependencies
Anyway, this may not solve your problem, but I hope it helps in tracking down the issue, and know that you are not alone. If you do find out anything, please post it here. I will do the same if I have more time to work on it later.

show changelog after M-x list-packages

After updating all installed packages via M-x list-packages, U, x, how can I easily do any or all of the following:
see a list of the packages (and their repository URLs) that were just updated
view the changelog of each updated package since the previously installed version
see a diff of the current package elisp code vs. the previous one
Only the first question can be asked easily with existing emacs packages (to my knowledge). I use pallet that uses cask to keep track of packages. Normally I just run M-x pallet-update, but to get a preview of pending updates I cd ~/.emacs.d and run cask outdated.
Pallet code might provide a good starting point to start writing code to answer the other two questions.
An other, more desperate, approach would be to try to parse the text that updating adds to emacs Messages buffer, but is not a good way to do anything.
You can't. The features aren't there. Write a feature request, or something.

Is it possible to downgrade packages installed with ELPA?

I updated today my packages in emacs with ELPA and after the update I'm stuck with the
Variable binding depth exceeds max-specpdl-size
error.
Since it is not easy to debug, is it possible to downgrade the packages that were updated? Where can I find an ELPA log where I can get the previous version of these packages?
I second #lawlist's recommendation to (setq debug-on-error t) early in your ~/.emacs file. You can also use emacs --debug-init to get a similar result. This said, sometimes the kind of error you get here can also prevent the debugger from showing up. I recommend you M-x report-emacs-bug and describe the problem, along with any additional info you find, including the solution you found, if any.
As for downgrading a package, it's technically possible, but there is no UI support for it. And there's no log of package installs either. Please do mention this in the bug-report as well, since it's indeed a good idea to try and keep track of those things.
Sorry.

How can I gracefully drop support for older emacsen in my elisp package?

I maintain a fairly well-used emacs package (ido-ubiquitous), and in the next version I plan to drop support for Emacs 23 and below. People who use Emacs 23 and below will be able to continue using the current version of my package.
However, I don't want to have Emacs 23 users upgrading via ELPA or git or something else and ending up with the new version that isn't compatible with their emacs. Is there a generally accepted way of handling this gracefully? Do I have any choice short of renaming the new version to "ido-ubiquitous-ng" or something?
ELPA/package.el
To prevent updates via package.el, add the special dependency (emacs "24.1") to the Package-Requires list. See Library Headers in the Emacs Lisp Manual, in the description of the Package-Requires: header:
[…] The package code automatically defines a package named ‘emacs’ with the version number of the currently running Emacs. This can be used to require a minimal version of Emacs for a package.
The package.el which is distributed independently for Emacs 23 and below does not provide this special package. Thus, any attempt to install your package on Emacs 23 will fail with a message complaining about “emacs” being unavailable for installation, leaving the old, compatible version in place.
However, when using this, be prepared to handle complaints from users of Emacs 24. Many users apparently do not delete their old package.el when upgrading to Emacs 24. Thus the old package.el overrides the new built-in one, leading to spurious errors on installation.
ELGet
I do not know Elget. Probably ask its author for help in this matter.
Git submodules, Tarballs and other legacy methods
I do not think, that you can really prevent updates, if users install your package in a legacy way (e.g. Git submodules, distribution packages, etc.). You can only complain after your package was updated, which is arguably too late, because the incompatible code is now already there.
You may choose to add an explicit version check, with a detailed error. I consider this superfluous, though. If you really go for Emacs 24, you will be using incompatible functions, so your package won't load successfully, whether you explicitly prevent it or not. So save yourself of superfluous code :)
TL;DR (+ personal experience)
First of all, please do not rename your package. Few users can follow the news on each and every installed package. Thus many users will not immediately realize that the package was renamed, and continue to use an outdated version without notice or warning. Effectively, you would sort of punish Emacs 24 users of your package.
Add the special dependency to prevent accidental updates via package.el. Add prominent documentation, that your package requires Emacs 24, like in the first section of your Github Readme. Then, let the matter rest. Anything else is likely more hassle that it is worth.
In my personal experience, Emacs users are not stupid (well, at least the majority isn't). They read documentation. They understand documentation.
Users of Emacs 23 know that their Emacs is outdated. Many of them expect incompatibilities and breakage. If the package suddenly breaks for them, they will seek advice on Github, realize that the package is not available for Emacs 23 anymore, and either go back to the last working release, or (hopefully) upgrade their Emacs.