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

Nahuel Greco ngreco at gmail.com
Mon Nov 30 17:21:48 UTC 2009

On Sun, Nov 29, 2009 at 2:06 AM, Sergei Golovan <sgolovan at gmail.com> wrote:
>>  (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.

I think you are wrong,"3erl" is optional as the "?" character
indicates, so Emacs will show all the manpages in the
/usr/share/man/man3 directory, not only the Erlang related ones. If
you make the "3erl" mandatory in that line by deleting the "?"
character, then some erlang manpages will not show, for example
/usr/share/man/man6/crypto.6.gz , so doing that isn't a solution.

> 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.

I agree with that.

>> 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.

Maybe you have too few packages installed in your system, in mine the
Erlang man menu is cluttered with many non-erlang related manpages.
For example, I see manpages for awk, kolf, konquest, etc.

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

I didn't propose any regex changes in that paragraph, I was only
indicating that the "3erl" string is optional.

>> 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.

Another solution is to make a "\derl" regex mandatory in emacs-mode
and change the filenames like /usr/share/man/man6/stdlib.6.gz to
/usr/share/man/man6/stdlib.6erl.gz . But probably the most
non-intrusive solution is to create the symlinks from
/usr/lib/erlang/man to /usr/share/man.

More information about the Pkg-erlang-devel mailing list