[Pkg-erlang-devel] Bug#558199: erlang-mode, erlang-manpages: non erlang related manpages in the "Erlang" menu at the menubar

Sergei Golovan sgolovan at gmail.com
Sun Nov 29 05:06:47 UTC 2009

severity 558199 minor
tags 558199 + wontfix

On Fri, Nov 27, 2009 at 2:14 AM, Nahuel Greco <ngreco at gmail.com> wrote:
> erlang-mode builds the manpage menus by searching for manpages in the directory specified
> using the erlang-root-dir variable setted to "/usr/lib/erlang" in
> /etc/emacs/site-start.d/50erlang-mode.el, and the erlang-man-dirs variable setted on
> erlang-mode.el. Then uses a regex defined in erlang-mode.el as:
>  (defun erlang-man-get-files (dir)
>    "Return files in directory DIR."
>    (directory-files dir t ".*\\.\\([124-9]\\|3erl\\)?\\(\\.gz\\)?\\'"))

3erl here means that only manpages in 3erl subsection will be
searched. Which makes the most important section correct. Emacs shows
only Erlang-related manpages for section 3.

> The erlang-manpages package installs the manpages on /usr/share/man/* where non erlang
> related manpages also reside, and creates a /usr/lib/erlang/man -> /usr/share/man symlink.

It's a policy rule to put manpages under /usr/share/man (it's
convenient to use 'man' for all manpages and don't try to remember
when you should type 'man' and when 'erl -man' whatever.

> So, by traversing that symlink erlang-mode erroneously founds all manpages in the system as
> erlang ones.

Which isn't too problematic as there are not too many manpages in
sections 4 and 6. Only section 1 contains many manuals.

> Two notes about the regex: 1- there are other similar regexes used in
> erlang-mode.el 2- the "3erl" string must be optional because there are manpages like
> /usr/share/man/man6/kernel.6.gz that not contain it.

The regexp is correct.

> I think the proper solution is to modify erlang-manpages to create an
> /usr/lib/erlang/man directory instead of a symlink, and then man{3,4,6} directories
> containing  one symlink for each manpage to his corresponding file in /usr/share/man
> (or viceversa).

It seems to be too complicated for me. While I agree that the change
introduced in the Debian package creates some inconvenience for Emacs
user I think that it isn't too annoying to excuse symlinking.

Sergei Golovan

More information about the Pkg-erlang-devel mailing list