Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No .info file #228

Open
meedstrom opened this issue Mar 24, 2024 · 12 comments
Open

No .info file #228

meedstrom opened this issue Mar 24, 2024 · 12 comments

Comments

@meedstrom
Copy link

meedstrom commented Mar 24, 2024

I think you have to include an .info file (not just .texi file) for the Info doc to automatically install. At least, there's no Info doc in my Doom (which uses straight.el).

OK, I looked around. The MELPA recipe format has a default :files setting that includes docs/*.texi, among many others. So the file is included in the download. However, I think you have to add a Makefile instruction to turn it into .info. In my packages, I found it easier to just pre-generate the .info file (via org-export) and commit it to the repo.

@okomestudio
Copy link

Just to add in case it helps, as I have the same issue of missing .info file, which needs to be generated manually.

I've beeing adding the following pre-built instruction in my straight.el install procecure with use-package:

:straight
  (;; Info manual isn't generated by default, so do it here:
   :pre-build
   (("make" "org-transclusion.org")
    ("make" "-C" "./docs" "org-transclusion.texi")
    ("makeinfo" "./docs/org-transclusion.texi" "-o" "./docs/org-transclusion.info")
    ("install-info" "./docs/org-transclusion.info" "./docs/dir")))

This way I can make the info doc for org-transclusion available within Emacs, at least with straight.el and use-package.

I haven't created the issue ticket like this myself since I'm yet to understand the mechanics of registering package with Melpa, etc.; I got a clue from this ticket:

#182

I'm not sure if the missing info is caused by my particular environment (straight plus use-package), but I would like to communicate the existence of the issue and the tentative resolution that I am using to illustrate the issue.

@nobiot
Copy link
Owner

nobiot commented Mar 25, 2024

Sorry I do not know how Doom and Straight work at all.

ELPA adds .info file as you can see in the tar archive file (eg here). You can also use it as it's free to download it.

image

What's the reason why this is not a feature request / bug report for Doom or Straight? As I understand it, Straight is a third-party package, and there are other packages that provide similar functionality such as Elpaca and Quelpa. I do not think it is up to individual packages to support these arbitrarily, when the built-in package.el works.

This is not a hard "no", but because I do not know what to do (I don't use Doom or Straight), I cannot be of much help without guidance from you and other users.

Do you know what other packages that provide .info file do? Maybe that's something I can try to emulate if you can let me know the detail.

@okomestudio
Copy link

Sorry I didn't mean to burden you with a responsibility of fixing the issue; my intention was to simply report that I'm having a similar issue with (apparently) a different tool, for which the solution might be the same.

For most other packages that I usually get via MELPA (with or without straight.el), I don't have to generate the Info doc manually, so I just lazily assumed that it could be something with the way the specific repo is structured that's not generating it. (The another package that I have had to do is consult, a very popular package, so you might be correct that the problem lies elsewhere.)

When I have time, I'll see where best to apply a fix on my end, and if it's here then I'll submit a PR. Please feel free to ignore my comment above.

@nobiot
Copy link
Owner

nobiot commented Mar 26, 2024

@okomestudio

No worries. For consult.el, I suggest to get the tar file from either ELPA-devel or ELPA. For some reason, consult.el tar file on MELPA does not contain the .info file, but ELPA repos do.

I use package.el to get the tar file and have no problem with installing Info document.

I can also install Org-transclusion's info file with no issue.
image

@okomestudio @meedstrom

I really don't know what straight.el does with info documentation -- Do you also have trouble with packages such as embark orderless magit and so on? You see they are all installed properly on my end. I do not think org-transclusion does something very different to these popular packages, so I assume there is a way in straight???

As far as I can see, these packages do not include .info files in the Git repo -- some do .texi but that's what make creates for org-transclusion and, I believe, consult.el on ELPA(-devel).

@meedstrom
Copy link
Author

meedstrom commented Sep 18, 2024

I agree that it should not be necessary to write a Makefile.

I've migrated off Doom/Straight for just Elpaca. And I can test on my own packages, omitting .info, and I see that an .info file is generated. So there is something Elpaca is capable of automating. But curiously, no info files for Orderless, Embark nor Org-transclusion!

EDIT: Oh, for Orderless/Embark I just had to do M-x elpaca-rebuild... I think it's because I was switching between versions of Emacs.

@meedstrom
Copy link
Author

For what it's worth, neither .texi nor .info files are very large. They're around the same size as the original .org. That's why I include both in my repos, even though they are technically "build artifacts", by typing C-c C-e i i in the Org file instead of C-c C-e i t. It seems easiest to me, but YMMV.

@nobiot
Copy link
Owner

nobiot commented Sep 18, 2024

Just pushed a new commit simply adding /org-transclusion.texi. Judging from elpaca--compile-info and the fact that Orderless repo contains a texi file at the root of the repo, I guess this will let Elpaca build an info file from texi.

I will need to see if this breaks anything in ELPA(devel). Can you let me know if you can get Elpaca to (re)build an info file? I think you need to run M-x elpaca-rebuild, which seems to call elpaca--compile-info.

PS. this is besides the point, I don't have C-c C-e i i (C-c C-e is bound to org-export-dispatch, but there is noi option). What is it supposed to be?

@meedstrom
Copy link
Author

meedstrom commented Sep 19, 2024

If you do

M-x customize-variable RET org-export-backends RET

you can add the "texinfo" backend. Then, C-c C-e should have the i option :) It lets you generate .texi and .info files from an Org file!

I see now it is the same thing you have in your Makefile... but I wonder if (org-texinfo-export-to-texinfo) should not be (org-texinfo-export-to-info)?

I may steal this Makefile for my projects, to skip the manual labor of typing C-c C-e every time I update my readmes, as I have been doing :)

Can you let me know if you can get Elpaca to (re)build an info file?

Sure! Got this output. It could not find fdl.texi, although I can see it is inside the folder, in the docs subdirectory. Maybe it needs to be @include docs/fdl.texi?

org-transclusion               byte-compilation     Byte compilation complete                                                        25.274095
org-transclusion               info                 Compiling Info files                                                             25.274139
org-transclusion               info                 $/usr/bin/makeinfo /home/me/.emacs.d/elpaca/repos/org-transclusion/org-transclusion.texi -o /home/me/.emacs.d/elpaca/builds/org-transclusion/org-transclusion.info 25.274266
org-transclusion               info                   org-transclusion.texi:981: warning: @item missing argument                     25.588926
org-transclusion               info                   org-transclusion.texi:985: warning: @item missing argument                     25.588944
org-transclusion               info                   org-transclusion.texi:1148: @include: could not find fdl.texi                  25.588953
org-transclusion               info                 Compilation failure: exited abnormally with code 1                               25.594352
org-transclusion               finished             ✓ 1.550 secs                                                                     25.594520

@nobiot
Copy link
Owner

nobiot commented Sep 19, 2024

Thank you. There is this line: https://github.com/nobiot/org-transclusion/blob/main/org-transclusion.texi#L1148

I think I need to specify the directory path as you suggests…

@nobiot
Copy link
Owner

nobiot commented Sep 19, 2024

Re (org-texinfo-export-to-info), I think I have tried it and it did not produce the desired output, but I have forgotten what it was. Maybe the format was incorrect or it didn’t produce the dir file to let Emacs locate the info file correctly. Can’t remember exactly. Perhaps you can try it on your end and see…

@nobiot
Copy link
Owner

nobiot commented Sep 19, 2024

See #255

@meedstrom
Copy link
Author

I believe now the reason I do not get the manual is progfolio/elpaca#360. I'll let you know later if that fixes the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants