Subject: 30.0.50; Show man pages on remote systems

From: Michael Albinus <[email-masked]>
Date: Thu, 26 Oct 2023 12:38:34 +0200

Severity: wishlist

It has been mentioned several times over the last years, now I've tried
it. Appended is a patch, which allows to show man pages on remote
systems via Tramp.

There is a new user option `Man-support-remote-systems'. When this is
non-nil, the `man' command runs on the remote system determined by
`default-directory'. When the `man' command is called with a prefix
argument, the value of`Man-support-remote-systems' is reverted.

Following references in man pages to other man pages, or to files, shall
happen on the remote system. Invoking `man' from dired (typing "N" on a
man file) shall also work on remote systems.

Comments?

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.18.0) of 2023-10-07 built on gandalf
Repository revision: b583cb81c90ee452c754777e33571dbd23f159ff
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302001
System Description: Fedora Linux 39 (Workstation Edition)

Configured using:
 'configure --with-tree-sitter'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  display-time-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  global-goto-address-mode: t
  goto-address-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs-guix hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-guix
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-browse
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-compat hides /home/albinus/.emacs.d/elpa/debbugs-0.37/debbugs-compat
/home/albinus/.emacs.d/elpa/helm-3.9.5/helm-packages hides /home/albinus/.emacs.d/elpa/helm-core-3.9.5/helm-packages
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/.emacs.d/elpa/hydra-0.15.0/lv hides /home/albinus/.emacs.d/elpa/lv-0.15.0/lv
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/site-lisp/tramp-sh
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/site-lisp/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/site-lisp/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/site-lisp/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/site-lisp/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/site-lisp/tramp-adb
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/site-lisp/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/site-lisp/tramp-cache
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/site-lisp/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/site-lisp/tramp-compat
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/site-lisp/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/site-lisp/tramp-archive
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/site-lisp/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/site-lisp/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/site-lisp/tramp-uu
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/site-lisp/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/site-lisp/trampver
/home/albinus/.emacs.d/elpa/transient-20230919.2146/transient hides /usr/local/share/emacs/30.0.50/lisp/transient
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-texinfo hides /usr/local/share/emacs/30.0.50/lisp/org/ox-texinfo
/home/albinus/.emacs.d/elpa/org-9.6.10/oc hides /usr/local/share/emacs/30.0.50/lisp/org/oc
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-rmail hides /usr/local/share/emacs/30.0.50/lisp/org/ol-rmail
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-matlab hides /usr/local/share/emacs/30.0.50/lisp/org/ob-matlab
/home/albinus/.emacs.d/elpa/org-9.6.10/org-refile hides /usr/local/share/emacs/30.0.50/lisp/org/org-refile
/home/albinus/.emacs.d/elpa/org-9.6.10/org-habit hides /usr/local/share/emacs/30.0.50/lisp/org/org-habit
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-eshell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-eshell
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-icalendar hides /usr/local/share/emacs/30.0.50/lisp/org/ox-icalendar
/home/albinus/.emacs.d/elpa/org-9.6.10/org-crypt hides /usr/local/share/emacs/30.0.50/lisp/org/org-crypt
/home/albinus/.emacs.d/elpa/org-9.6.10/org-inlinetask hides /usr/local/share/emacs/30.0.50/lisp/org/org-inlinetask
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-sed hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sed
/home/albinus/.emacs.d/elpa/org-9.6.10/org-goto hides /usr/local/share/emacs/30.0.50/lisp/org/org-goto
/home/albinus/.emacs.d/elpa/org-9.6.10/ox hides /usr/local/share/emacs/30.0.50/lisp/org/ox
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-python hides /usr/local/share/emacs/30.0.50/lisp/org/ob-python
/home/albinus/.emacs.d/elpa/org-9.6.10/org-agenda hides /usr/local/share/emacs/30.0.50/lisp/org/org-agenda
/home/albinus/.emacs.d/elpa/org-9.6.10/org-macs hides /usr/local/share/emacs/30.0.50/lisp/org/org-macs
/home/albinus/.emacs.d/elpa/org-9.6.10/org-archive hides /usr/local/share/emacs/30.0.50/lisp/org/org-archive
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-haskell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-haskell
/home/albinus/.emacs.d/elpa/org-9.6.10/org-footnote hides /usr/local/share/emacs/30.0.50/lisp/org/org-footnote
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-md hides /usr/local/share/emacs/30.0.50/lisp/org/ox-md
/home/albinus/.emacs.d/elpa/org-9.6.10/org-src hides /usr/local/share/emacs/30.0.50/lisp/org/org-src
/home/albinus/.emacs.d/elpa/org-9.6.10/org-list hides /usr/local/share/emacs/30.0.50/lisp/org/org-list
/home/albinus/.emacs.d/elpa/org-9.6.10/org-loaddefs hides /usr/local/share/emacs/30.0.50/lisp/org/org-loaddefs
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-R hides /usr/local/share/emacs/30.0.50/lisp/org/ob-R
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-gnus hides /usr/local/share/emacs/30.0.50/lisp/org/ol-gnus
/home/albinus/.emacs.d/elpa/org-9.6.10/ol hides /usr/local/share/emacs/30.0.50/lisp/org/ol
/home/albinus/.emacs.d/elpa/org-9.6.10/org-faces hides /usr/local/share/emacs/30.0.50/lisp/org/org-faces
/home/albinus/.emacs.d/elpa/org-9.6.10/org-datetree hides /usr/local/share/emacs/30.0.50/lisp/org/org-datetree
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-exp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-exp
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-sass hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sass
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-processing hides /usr/local/share/emacs/30.0.50/lisp/org/ob-processing
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-beamer hides /usr/local/share/emacs/30.0.50/lisp/org/ox-beamer
/home/albinus/.emacs.d/elpa/org-9.6.10/org-cycle hides /usr/local/share/emacs/30.0.50/lisp/org/org-cycle
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-scheme hides /usr/local/share/emacs/30.0.50/lisp/org/ob-scheme
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-lua hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lua
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-eval hides /usr/local/share/emacs/30.0.50/lisp/org/ob-eval
/home/albinus/.emacs.d/elpa/org-9.6.10/org-persist hides /usr/local/share/emacs/30.0.50/lisp/org/org-persist
/home/albinus/.emacs.d/elpa/org-9.6.10/oc-biblatex hides /usr/local/share/emacs/30.0.50/lisp/org/oc-biblatex
/home/albinus/.emacs.d/elpa/org-9.6.10/oc-basic hides /usr/local/share/emacs/30.0.50/lisp/org/oc-basic
/home/albinus/.emacs.d/elpa/org-9.6.10/org-keys hides /usr/local/share/emacs/30.0.50/lisp/org/org-keys
/home/albinus/.emacs.d/elpa/org-9.6.10/org-attach hides /usr/local/share/emacs/30.0.50/lisp/org/org-attach
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-gnuplot hides /usr/local/share/emacs/30.0.50/lisp/org/ob-gnuplot
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-docview hides /usr/local/share/emacs/30.0.50/lisp/org/ol-docview
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-css hides /usr/local/share/emacs/30.0.50/lisp/org/ob-css
/home/albinus/.emacs.d/elpa/org-9.6.10/org-capture hides /usr/local/share/emacs/30.0.50/lisp/org/org-capture
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-w3m hides /usr/local/share/emacs/30.0.50/lisp/org/ol-w3m
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-julia hides /usr/local/share/emacs/30.0.50/lisp/org/ob-julia
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-makefile hides /usr/local/share/emacs/30.0.50/lisp/org/ob-makefile
/home/albinus/.emacs.d/elpa/org-9.6.10/org-mouse hides /usr/local/share/emacs/30.0.50/lisp/org/org-mouse
/home/albinus/.emacs.d/elpa/org-9.6.10/org-pcomplete hides /usr/local/share/emacs/30.0.50/lisp/org/org-pcomplete
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-sql hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sql
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-mhe hides /usr/local/share/emacs/30.0.50/lisp/org/ol-mhe
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-doi hides /usr/local/share/emacs/30.0.50/lisp/org/ol-doi
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-fortran hides /usr/local/share/emacs/30.0.50/lisp/org/ob-fortran
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-calc hides /usr/local/share/emacs/30.0.50/lisp/org/ob-calc
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-awk hides /usr/local/share/emacs/30.0.50/lisp/org/ob-awk
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-odt hides /usr/local/share/emacs/30.0.50/lisp/org/ox-odt
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-lilypond hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lilypond
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-groovy hides /usr/local/share/emacs/30.0.50/lisp/org/ob-groovy
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-org hides /usr/local/share/emacs/30.0.50/lisp/org/ob-org
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-ruby hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ruby
/home/albinus/.emacs.d/elpa/org-9.6.10/org-plot hides /usr/local/share/emacs/30.0.50/lisp/org/org-plot
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-ref hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ref
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-forth hides /usr/local/share/emacs/30.0.50/lisp/org/ob-forth
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-emacs-lisp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-emacs-lisp
/home/albinus/.emacs.d/elpa/org-9.6.10/org-indent hides /usr/local/share/emacs/30.0.50/lisp/org/org-indent
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-ascii hides /usr/local/share/emacs/30.0.50/lisp/org/ox-ascii
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-table hides /usr/local/share/emacs/30.0.50/lisp/org/ob-table
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-core hides /usr/local/share/emacs/30.0.50/lisp/org/ob-core
/home/albinus/.emacs.d/elpa/org-9.6.10/oc-csl hides /usr/local/share/emacs/30.0.50/lisp/org/oc-csl
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-koma-letter hides /usr/local/share/emacs/30.0.50/lisp/org/ox-koma-letter
/home/albinus/.emacs.d/elpa/org-9.6.10/org-fold-core hides /usr/local/share/emacs/30.0.50/lisp/org/org-fold-core
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-shell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-shell
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-bibtex hides /usr/local/share/emacs/30.0.50/lisp/org/ol-bibtex
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-java hides /usr/local/share/emacs/30.0.50/lisp/org/ob-java
/home/albinus/.emacs.d/elpa/org-9.6.10/org-attach-git hides /usr/local/share/emacs/30.0.50/lisp/org/org-attach-git
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-info hides /usr/local/share/emacs/30.0.50/lisp/org/ol-info
/home/albinus/.emacs.d/elpa/org-9.6.10/org-macro hides /usr/local/share/emacs/30.0.50/lisp/org/org-macro
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-man hides /usr/local/share/emacs/30.0.50/lisp/org/ox-man
/home/albinus/.emacs.d/elpa/org-9.6.10/org-tempo hides /usr/local/share/emacs/30.0.50/lisp/org/org-tempo
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-sqlite hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sqlite
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-lisp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lisp
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-lob hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lob
/home/albinus/.emacs.d/elpa/org-9.6.10/oc-natbib hides /usr/local/share/emacs/30.0.50/lisp/org/oc-natbib
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-screen hides /usr/local/share/emacs/30.0.50/lisp/org/ob-screen
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-bbdb hides /usr/local/share/emacs/30.0.50/lisp/org/ol-bbdb
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-comint hides /usr/local/share/emacs/30.0.50/lisp/org/ob-comint
/home/albinus/.emacs.d/elpa/org-9.6.10/org-timer hides /usr/local/share/emacs/30.0.50/lisp/org/org-timer
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-ditaa hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ditaa
/home/albinus/.emacs.d/elpa/org-9.6.10/org-ctags hides /usr/local/share/emacs/30.0.50/lisp/org/org-ctags
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-publish hides /usr/local/share/emacs/30.0.50/lisp/org/ox-publish
/home/albinus/.emacs.d/elpa/org-9.6.10/org-clock hides /usr/local/share/emacs/30.0.50/lisp/org/org-clock
/home/albinus/.emacs.d/elpa/org-9.6.10/org-feed hides /usr/local/share/emacs/30.0.50/lisp/org/org-feed
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-html hides /usr/local/share/emacs/30.0.50/lisp/org/ox-html
/home/albinus/.emacs.d/elpa/org-9.6.10/ob hides /usr/local/share/emacs/30.0.50/lisp/org/ob
/home/albinus/.emacs.d/elpa/org-9.6.10/org-lint hides /usr/local/share/emacs/30.0.50/lisp/org/org-lint
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-maxima hides /usr/local/share/emacs/30.0.50/lisp/org/ob-maxima
/home/albinus/.emacs.d/elpa/org-9.6.10/org-fold hides /usr/local/share/emacs/30.0.50/lisp/org/org-fold
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-latex hides /usr/local/share/emacs/30.0.50/lisp/org/ob-latex
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-man hides /usr/local/share/emacs/30.0.50/lisp/org/ol-man
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-latex hides /usr/local/share/emacs/30.0.50/lisp/org/ox-latex
/home/albinus/.emacs.d/elpa/org-9.6.10/org-element hides /usr/local/share/emacs/30.0.50/lisp/org/org-element
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-dot hides /usr/local/share/emacs/30.0.50/lisp/org/ob-dot
/home/albinus/.emacs.d/elpa/org-9.6.10/oc-bibtex hides /usr/local/share/emacs/30.0.50/lisp/org/oc-bibtex
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-eshell hides /usr/local/share/emacs/30.0.50/lisp/org/ol-eshell
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-perl hides /usr/local/share/emacs/30.0.50/lisp/org/ob-perl
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-ocaml hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ocaml
/home/albinus/.emacs.d/elpa/org-9.6.10/org-duration hides /usr/local/share/emacs/30.0.50/lisp/org/org-duration
/home/albinus/.emacs.d/elpa/org-9.6.10/ox-org hides /usr/local/share/emacs/30.0.50/lisp/org/ox-org
/home/albinus/.emacs.d/elpa/org-9.6.10/org-protocol hides /usr/local/share/emacs/30.0.50/lisp/org/org-protocol
/home/albinus/.emacs.d/elpa/org-9.6.10/org-num hides /usr/local/share/emacs/30.0.50/lisp/org/org-num
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-plantuml hides /usr/local/share/emacs/30.0.50/lisp/org/ob-plantuml
/home/albinus/.emacs.d/elpa/org-9.6.10/org-compat hides /usr/local/share/emacs/30.0.50/lisp/org/org-compat
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-clojure hides /usr/local/share/emacs/30.0.50/lisp/org/ob-clojure
/home/albinus/.emacs.d/elpa/org-9.6.10/org-table hides /usr/local/share/emacs/30.0.50/lisp/org/org-table
/home/albinus/.emacs.d/elpa/org-9.6.10/org-mobile hides /usr/local/share/emacs/30.0.50/lisp/org/org-mobile
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-C hides /usr/local/share/emacs/30.0.50/lisp/org/ob-C
/home/albinus/.emacs.d/elpa/org-9.6.10/org hides /usr/local/share/emacs/30.0.50/lisp/org/org
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-tangle hides /usr/local/share/emacs/30.0.50/lisp/org/ob-tangle
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-js hides /usr/local/share/emacs/30.0.50/lisp/org/ob-js
/home/albinus/.emacs.d/elpa/org-9.6.10/org-version hides /usr/local/share/emacs/30.0.50/lisp/org/org-version
/home/albinus/.emacs.d/elpa/org-9.6.10/org-colview hides /usr/local/share/emacs/30.0.50/lisp/org/org-colview
/home/albinus/.emacs.d/elpa/org-9.6.10/org-entities hides /usr/local/share/emacs/30.0.50/lisp/org/org-entities
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-eww hides /usr/local/share/emacs/30.0.50/lisp/org/ol-eww
/home/albinus/.emacs.d/elpa/org-9.6.10/org-id hides /usr/local/share/emacs/30.0.50/lisp/org/org-id
/home/albinus/.emacs.d/elpa/org-9.6.10/ol-irc hides /usr/local/share/emacs/30.0.50/lisp/org/ol-irc
/home/albinus/.emacs.d/elpa/org-9.6.10/ob-octave hides /usr/local/share/emacs/30.0.50/lisp/org/ob-octave
~/lisp/dbus hides /usr/local/share/emacs/30.0.50/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-fuse hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-fuse
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/30.0.50/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-container hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-container
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-message hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-message
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/30.0.50/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-sshfs hides /usr/local/share/emacs/30.0.50/lisp/net/tramp-sshfs

Features:
(shadow warnings emacsbug ediff-vers ediff ediff-merg ediff-mult
ediff-wind ediff-diff ediff-help ediff-init ediff-util vc-hg vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util vc-dir ewoc man
help-fns radix-tree cl-print debug backtrace find-func misearch
multi-isearch vc-git diff-mode easy-mmode url-queue mm-archive gnus-fun
url-http url-gw url-auth gnus-gravatar gravatar dns url-cache sort
smiley gnus-cite mail-extr textsec uni-scripts idna-mapping
ucs-normalize uni-confusable textsec-check gnus-bcklg cl-extra
gnus-async qp gnus-ml debbugs-browse bug-reference disp-table pop3 utf-7
nndraft nnmh nnml network-stream nsm gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg
dom nnnil smtpmail gnus-demon nntp gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo
gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr face-remap
ob-shell ob ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint
ob-core org-cycle org-fold org-fold-core ob-eval org-keys oc org-compat
org-version org-macs vc vc-dispatcher time tramp-cache time-stamp
tramp-sh lxc-tramp lxd-tramp tramp trampver tramp-integration files-x
tramp-message help-mode tramp-compat xdg shell pcomplete comint ansi-osc
ring parse-time iso8601 time-date format-spec ansi-color tramp-loaddefs
rx delsel ido jka-compr icomplete cus-edit pp cus-load icons wid-edit
dired dired-loaddefs goto-addr thingatpt alert-autoloads
android-mode-autoloads auth-source-gopass-autoloads
auth-source-keytar-autoloads auth-source-kwallet-autoloads
auth-source-xoauth2-autoloads auto-sudoedit-autoloads
auto-virtualenv-autoloads auto-virtualenvwrapper-autoloads
clang-format-autoloads company-shell-autoloads company-autoloads
counsel-toki-autoloads counsel-tramp-autoloads counsel-autoloads
dbus-codegen-autoloads debbugs-autoloads dired-du-autoloads
dired-rsync-autoloads dired-toggle-sudo-autoloads direnv-autoloads
disk-usage-autoloads dockerfile-mode-autoloads ednc-autoloads
el-get-autoloads envrc-autoloads etc-sudoers-mode-autoloads
exec-path-from-shell-autoloads fontaine-autoloads forge-autoloads
closql-autoloads emacsql-autoloads friendly-tramp-path-autoloads
ggtags-autoloads ghub-autoloads gited-autoloads
gitlab-ci-mode-flycheck-autoloads gitlab-ci-mode-autoloads
flycheck-autoloads gntp-autoloads gnus-desktop-notify-autoloads
helm-gitlab-autoloads helm-projectile-autoloads helm-autoloads
helm-core-autoloads async-autoloads ibuffer-tramp-autoloads
inheritenv-autoloads ivy-gitlab-autoloads gitlab-autoloads
jarchive-autoloads journalctl-mode-autoloads keepass-mode-autoloads
keytar-autoloads kubel-autoloads kubernetes-autoloads log4e-autoloads
lsp-java-autoloads dap-mode-autoloads lsp-docker-autoloads bui-autoloads
lsp-treemacs-autoloads lsp-mode-autoloads lxc-tramp-autoloads
lxd-tramp-autoloads magit-filenotify-autoloads magit-autoloads pcase
git-commit-autoloads magit-popup-autoloads magit-section-autoloads
marcopolo-autoloads mastodon-autoloads nexus-autoloads
nnir-est-autoloads oauth2-autoloads ob-restclient-autoloads
orderless-autoloads org-autoloads org-tree-slide-autoloads
persist-autoloads pkg-info-autoloads epl-autoloads popup-autoloads
projectile-autoloads promise-autoloads pyenv-mode-autoloads
pylint-autoloads python-environment-autoloads deferred-autoloads
pythonic-autoloads f-autoloads pyvenv-autoloads
recentf-remove-sudo-tramp-prefix-autoloads relint-autoloads
request-autoloads restclient-test-autoloads restclient-autoloads
s3ed-autoloads finder-inf slime-autoloads macrostep-autoloads
spinner-autoloads ssh-deploy-autoloads su-autoloads sudo-edit-autoloads
sudo-ext-autoloads sudo-utils-autoloads swiper-autoloads ivy-autoloads
sx-autoloads markdown-mode-autoloads telepathy-autoloads
tramp-theme-autoloads transient-dwim-autoloads transient-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
pfuture-autoloads ace-window-autoloads avy-autoloads treepy-autoloads
urgrep-autoloads uuid-autoloads vdiff-autoloads hydra-autoloads
lv-autoloads vertico-autoloads virtualenv-autoloads
virtualenvwrapper-autoloads s-autoloads dash-autoloads
web-server-autoloads wfnames-autoloads with-editor-autoloads info
compat-autoloads xr-autoloads yaml-autoloads yaml-mode-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 404158 101357) (symbols 48 26135 4)
 (strings 32 104289 7218) (string-bytes 1 3127878) (vectors 16 75440)
 (vector-slots 8 1776953 237943) (floats 8 324 5998)
 (intervals 56 1773 2172) (buffers 992 27))

Best regards, Michael.

diff --git a/lisp/dired.el b/lisp/dired.el
index cc8c74839b9..2aea4f1c90a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4996,6 +4996,7 @@ dired-jump-map
 ;;; Miscellaneous commands

 (declare-function Man-getpage-in-background "man" (topic))
+(defvar Man-support-remote-systems) ; from man.el
 (defvar manual-program) ; from man.el

 (defun dired-do-man ()
@@ -5003,10 +5004,11 @@ dired-do-man
   (interactive nil dired-mode)
   (require 'man)
   (let* ((file (dired-get-file-for-visit))
+         (Man-support-remote-systems (file-remote-p file))
          (manual-program (string-replace "*" "%s"
                                          (dired-guess-shell-command
                                           "Man command: " (list file)))))
-    (Man-getpage-in-background file)))
+    (Man-getpage-in-background (file-local-name file))))

 (defun dired-do-info ()
   "In Dired, run `info' on this file."
diff --git a/lisp/man.el b/lisp/man.el
index 506d6060269..91750227d4a 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -105,6 +105,13 @@ Man-prefer-synchronous-call
   :group 'man
   :version "30.1")

+(defcustom Man-support-remote-systems nil
+  "Whether to call the Un*x \"man\" program on remote systems.
+When this is non-nil, call the \"man\" program on the remote
+system determined by `default-directory'."
+  :type 'boolean
+  :version "30.1")
+
 (defcustom Man-filter-list nil
   "Manpage cleaning filter command phrases.
 This variable contains a list of the following form:
@@ -264,6 +271,34 @@ Man-header-file-path
   :type '(repeat string)
   :group 'man)

+(defun Man-header-file-path ()
+  "C Header file search path used in Man.
+In the local case, it is the value of `Man-header-file-path'.
+Otherwise, it will be checked on the remote system."
+  (let ((remote-id (file-remote-p default-directory)))
+    (if (null remote-id)
+        ;; The local case.
+        Man-header-file-path
+      ;; The remote case.  Use connection-local variables.
+      (mapcar
+       (lambda (elt) (concat remote-id elt))
+       (with-connection-local-variables
+        (or (and (local-variable-p 'Man-header-file-path (current-buffer))
+                 Man-header-file-path)
+            (setq-connection-local
+             Man-header-file-path
+             (let ((arch (with-temp-buffer
+                           (when (zerop (ignore-errors
+                                          (process-file "gcc" nil '(t nil) nil
+                                                        "-print-multiarch")))
+                             (goto-char (point-min))
+                             (buffer-substring (point) (line-end-position)))))
+                   (base '("/usr/include" "/usr/local/include")))
+               (if (zerop (length arch))
+                   base
+                 (append
+                  base (list (expand-file-name arch "/usr/include"))))))))))))
+
 (defcustom Man-name-local-regexp (concat "^" (regexp-opt '("NOM" "NAME")) "$")
   "Regexp that matches the text that precedes the command's name.
 Used in `bookmark-set' to get the default bookmark name."
@@ -531,8 +566,9 @@ 'Man-xref-header-file

 (define-button-type 'Man-xref-normal-file
   'action (lambda (button)
-	    (let ((f (substitute-in-file-name
-		      (button-get button 'Man-target-string))))
+	    (let ((f (concat (file-remote-p default-directory)
+                             (substitute-in-file-name
+		              (button-get button 'Man-target-string)))))
 	      (if (file-exists-p f)
 		  (if (file-readable-p f)
 		      (view-file f)
@@ -545,6 +581,29 @@ 'Man-xref-normal-file
 ;; ======================================================================
 ;; utilities

+(defun Man-default-directory ()
+  "Return a default directory according to `Man-support-remote-systems'."
+  ;; Ensure that `default-directory' exists and is readable.
+  ;; We assume, that this function is always called inside the `man'
+  ;; command, so that we can check `current-prefix-arg' for reverting
+  ;; `Man-support-remote-systems'.
+  (let ((result default-directory)
+        (remote (if current-prefix-arg
+                    (not Man-support-remote-systems)
+                  Man-support-remote-systems)))
+
+    ;; Use a local directory if remote isn't possible.
+    (when (and (file-remote-p default-directory)
+               (not (and remote
+                         ;; TODO:: Test that remote processes are supported.
+                         )))
+      (setq result (expand-file-name "~/")))
+
+    ;; Check, whether the directory is accessible.
+    (if (file-accessible-directory-p result)
+        result
+      (expand-file-name (concat (file-remote-p result) "~/")))))
+
 (defun Man-init-defvars ()
   "Used for initializing variables based on display's color support.
 This is necessary if one wants to dump man.el with Emacs."
@@ -583,7 +642,9 @@ Man-init-defvars
 	     (if Man-sed-script
 		 (concat "-e '" Man-sed-script "'")
 	       "")
-	     "-e '/^[\001-\032][\001-\032]*$/d'"
+             ;; Use octal numbers.  Otherwise, \032 (Ctrl-Z) would
+             ;; suspend remote connections.
+	     "-e '/^[\\o001-\\o032][\\o001-\\o032]*$/d'"
 	     "-e '/\e[789]/s///g'"
 	     "-e '/Reformatting page.  Wait/d'"
 	     "-e '/Reformatting entry.  Wait/d'"
@@ -717,22 +778,23 @@ Man-support-local-filenames
 a \"/\" as a local filename.  The function returns either `man-db'
 `man', or nil."
   (if (eq Man-support-local-filenames 'auto-detect)
-      (setq Man-support-local-filenames
-            (with-temp-buffer
-              (let ((default-directory
-                      ;; Ensure that `default-directory' exists and is readable.
-                      (if (file-accessible-directory-p default-directory)
-                          default-directory
-                        (expand-file-name "~/"))))
-                (ignore-errors
-                  (call-process manual-program nil t nil "--help")))
-              (cond ((search-backward "--local-file" nil 'move)
-                     'man-db)
-                    ;; This feature seems to be present in at least ver 1.4f,
-                    ;; which is about 20 years old.
-                    ;; I don't know if this version has an official name?
-                    ((looking-at "^man, versione? [1-9]")
-                     'man))))
+      (with-connection-local-variables
+        (or (and (local-variable-p 'Man-support-local-filenames (current-buffer))
+                 Man-support-local-filenames)
+            (setq-connection-local
+             Man-support-local-filenames
+             (with-temp-buffer
+               (let ((default-directory (Man-default-directory)))
+                 (ignore-errors
+                   (process-file manual-program nil t nil "--help")))
+               (cond ((search-backward "--local-file" nil 'move)
+                      'man-db)
+                     ;; This feature seems to be present in at least
+                     ;; ver 1.4f, which is about 20 years old.  I
+                     ;; don't know if this version has an official
+                     ;; name?
+                     ((looking-at "^man, versione? [1-9]")
+                      'man))))))
     Man-support-local-filenames))

 
@@ -918,7 +980,8 @@ Man-completion-table
       (unless (and Man-completion-cache
                    (string-prefix-p (car Man-completion-cache) prefix))
         (with-temp-buffer
-          (setq default-directory "/") ;; in case inherited doesn't exist
+          ;; In case inherited doesn't exist.
+          (setq default-directory (Man-default-directory))
           ;; Actually for my `man' the arg is a regexp.
           ;; POSIX says it must be ERE and "man-db" seems to agree,
           ;; whereas under macOS it seems to be BRE-style and doesn't
@@ -932,7 +995,7 @@ Man-completion-table
             ;; error later.
             (when (eq 0
                       (ignore-errors
-                        (call-process
+                        (process-file
                          manual-program nil '(t nil) nil
                          "-k" (concat (when (or Man-man-k-use-anchor
                                                 (string-equal prefix ""))
@@ -1016,7 +1079,14 @@ man

 Note that in some cases you will need to use \\[quoted-insert] to quote the
 SPC character in the above examples, because this command attempts
-to auto-complete your input based on the installed manual pages."
+to auto-complete your input based on the installed manual pages.
+
+If `default-directory' is remote, and `Man-support-remote-systems'
+is non-nil, the man page will be formatted on the corresponding
+remote system.
+
+If `man' is called interactively with a prefix argument, the
+value of `Man-support-remote-systems' is reverted."

   (interactive
    (list (let* ((default-entry (Man-default-man-entry))
@@ -1082,12 +1152,7 @@ Man-start-calling
              Man-coding-system
              locale-coding-system))
 	;; Avoid possible error by using a directory that always exists.
-	(default-directory
-	  (if (and (file-directory-p default-directory)
-		   (not (find-file-name-handler default-directory
-						'file-directory-p)))
-	      default-directory
-	    "/")))
+	(default-directory (Man-default-directory)))
     ;; Prevent any attempt to use display terminal fanciness.
     (setenv "TERM" "dumb")
     ;; In Debian Woody, at least, we get overlong lines under X
@@ -1137,18 +1202,18 @@ Man-getpage-in-background
 	(Man-start-calling
 	 (if (and (fboundp 'make-process)
                   (not Man-prefer-synchronous-call))
-	     (let ((proc (start-process
+	     (let ((proc (start-file-process
 			  manual-program buffer
 			  (if (memq system-type '(cygwin windows-nt))
 			      shell-file-name
-			    "sh")
+			    "/bin/sh")
 			  shell-command-switch
 			  (format (Man-build-man-command) man-args))))
 	       (set-process-sentinel proc 'Man-bgproc-sentinel)
 	       (set-process-filter proc 'Man-bgproc-filter))
 	   (let* ((inhibit-read-only t)
 		  (exit-status
-		   (call-process shell-file-name nil (list buffer nil) nil
+		   (process-file "/bin/sh" nil (list buffer nil) nil
 				 shell-command-switch
 				 (format (Man-build-man-command) man-args)))
 		  (msg ""))
@@ -1178,7 +1243,7 @@ Man-update-manpage
 	(buffer-read-only nil))
      (erase-buffer)
      (Man-start-calling
-      (call-process shell-file-name nil (list (current-buffer) nil) nil
+      (process-file "/bin/sh" nil (list (current-buffer) nil) nil
 		    shell-command-switch
 		    (format (Man-build-man-command) Man-arguments)))
      (if Man-fontify-manpage-flag
@@ -1944,7 +2009,7 @@ Man-previous-manpage
 ;; Header file support
 (defun Man-view-header-file (file)
   "View a header file specified by FILE from `Man-header-file-path'."
-  (let ((path Man-header-file-path)
+  (let ((path (Man-header-file-path))
         complete-path)
     (while path
       (setq complete-path (expand-file-name file (car path))