Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76361 - [mc] missing spell checking

Attached to Project: Community Packages
Opened by Ralf Mardorf (Ralf) - Tuesday, 01 November 2022, 04:19 GMT
Last edited by George Rawlinson (rawlinsong) - Wednesday, 21 December 2022, 01:35 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Caleb Maclennan (alerque)
George Rawlinson (rawlinsong)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi, mcedit from the package community/mc 4.8.28-1 is missing spell checking. Building in a clean chroot after adding 'aspell' to makedepends and adding --enable-aspell to configure of the PKGBUILD solves the issue. Regards, Ralf


This task depends upon

Closed by  George Rawlinson (rawlinsong)
Wednesday, 21 December 2022, 01:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  4.8.28-2
Comment by Ralf Mardorf (Ralf) - Tuesday, 01 November 2022, 04:41 GMT Comment by Toolybird (Toolybird) - Tuesday, 01 November 2022, 07:33 GMT
If this is implemented, please make it an optdepend à la Debian. Not everyone who uses mc uses mcedit. FWIW, Fedora disabled it a while back [1].

[1] https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc.spec#_163-166
Comment by Ralf Mardorf (Ralf) - Tuesday, 01 November 2022, 09:33 GMT
Due to the new gtk design that isn't to my taste, I replaced Meld for the moment by mcdiff. By default mcdiff does use mcedit to edit the compared files. I'm new to mcdiff, so I don't know if the editor can be replaced by another editor. I don't necessarily need a spell check, if I edit compared files, but there is a chance that this feature be of use sometimes. I probably can replace Meld already by something else. However, at the moment I have replaced it by mcdiff and since mc supports spell checking, without becoming bloated, so why not enabling it?
Comment by Yury V. Zaytsev (zaytsev) - Tuesday, 01 November 2022, 13:06 GMT
I'm not sure what Jindrich meant with this comment. The package is weird in various other ways - instead of using official release tarballs, he's pulling stuff from GitHub and then rebootstrapping the build system.

If 1) mc is built with aspell 2) aspell libraries are installed, but 3) dictionaries are not found, the error message is shown:

https://github.com/MidnightCommander/mc/blob/7fe3f4c898d029e87faa439ebd7297214059f710/src/editor/spell.c#L318

If aspell libraries are not installed, or mc is built without aspell, then error message is not shown, even though the dictionaries are not present.

So just don't depend on aspell, and the message with not be shown. Otherwise we can change the logic (patches welcome), but so far, nobody complained in the last 10 years.
Comment by Caleb Maclennan (alerque) - Thursday, 01 December 2022, 09:07 GMT
I'm a bit lost here. Yury (or anybody) can you confirm that this package will still be fully functional (warnings notwithstanding) if compiled with aspell present and with the option enabled, but without aspell at runtime. In other words *can* we even make it an optdepends or would it have to be a hard dependency?
Comment by Yury V. Zaytsev (zaytsev) - Thursday, 01 December 2022, 10:02 GMT
Hi Caleb,

I can confirm that (for the details, check the source code I linked).

As I said, aspell libraries are loaded with `dlopen` at runtime. If they are not found, then no warning is shown. If they are found, but aspell is not functional, then a warning is shown. If they are found and aspell is functional, then spell check is enabled.

However, in order to have this functionality in the first place, aspell has to be present at the build time.

Yury.

Loading...