all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: Mark Oteiza <mvoteiza@udel.edu>
Cc: 27833@debbugs.gnu.org
Subject: bug#27833: 25.2; Add support for manpath command to woman.el
Date: Wed, 26 Jul 2017 09:43:22 +0100	[thread overview]
Message-ID: <CAOnWdoj4dO+qB-YmBJkouKOe7gH=g7eLUNqHH2rLDE=DHUo=pA@mail.gmail.com> (raw)
In-Reply-To: <87pocot7al.fsf@holos>


[-- Attachment #1.1: Type: text/plain, Size: 958 bytes --]

On 26 July 2017 at 00:40, Mark Oteiza <mvoteiza@udel.edu> wrote:

>
> Reuben Thomas <rrt@sc3d.org> writes:
> > +       (woman-parse-colon-path (condition-case nil
> > +                                   (chomp (with-output-to-string
> > +                                            (with-current-buffer
> > +                                                standard-output
> > +                                              (call-process "manpath"
> nil t nil))))
> > +                                 (error nil))))
> > +      (woman-manpath-add-locales
>
> I suspect your chomp is analogous to string-trim-right in subr-x.el
>

​Thanks! I'd had chomp in my Emacs init for so long I had forgotten it
wasn't part of Emacs, and didn't know about string-trim-right. Updated
patch attached (and that function purged from my init, and my personal uses
of it replaced by string-trim-right).

-- 
https://rrt.sc3d.org <http://rrt.sc3d.org>

[-- Attachment #1.2: Type: text/html, Size: 1708 bytes --]

[-- Attachment #2: 0001-Try-to-set-woman-manpath-from-output-of-manpath-comm.patch --]
[-- Type: text/x-patch, Size: 1319 bytes --]

From 20b8b7be22910454e6c151f3655bdd39f6e32c94 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Tue, 25 Jul 2017 23:37:17 +0100
Subject: [PATCH] Try to set woman-manpath from output of manpath command

* lisp/woman.el (woman-manpath): Try running manpath, provided by
recent man-db, to get man page paths.
---
 lisp/woman.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lisp/woman.el b/lisp/woman.el
index aa856c3..06d01bb 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -633,6 +633,13 @@ woman-manpath-add-locales
 (defcustom woman-manpath
   ;; Locales could also be added in woman-expand-directory-path.
   (or (woman-manpath-add-locales
+       (woman-parse-colon-path (condition-case nil
+                                   (string-trim-right (with-output-to-string
+                                                        (with-current-buffer
+                                                            standard-output
+                                                          (call-process "manpath" nil t nil))))
+                                 (error nil))))
+      (woman-manpath-add-locales
        (woman-parse-colon-path (getenv "MANPATH")))
       '("/usr/man" "/usr/share/man" "/usr/local/man"))
   "List of DIRECTORY TREES to search for UN*X manual files.
-- 
2.7.4


  reply	other threads:[~2017-07-26  8:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 22:41 bug#27833: 25.2; Add support for manpath command to woman.el Reuben Thomas
2017-07-25 23:40 ` Mark Oteiza
2017-07-26  8:43   ` Reuben Thomas [this message]
2017-07-26 14:26 ` Eli Zaretskii
2017-07-26 14:33   ` Reuben Thomas
2017-07-26 15:17     ` Eli Zaretskii
2017-07-26 16:29       ` Reuben Thomas
2019-09-29  2:03 ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOnWdoj4dO+qB-YmBJkouKOe7gH=g7eLUNqHH2rLDE=DHUo=pA@mail.gmail.com' \
    --to=rrt@sc3d.org \
    --cc=27833@debbugs.gnu.org \
    --cc=mvoteiza@udel.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.