From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "numbchild\@gmail.com" <numbchild@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] improve ol-man.el with occur searching
Date: Sun, 16 Aug 2020 11:54:56 +0200 [thread overview]
Message-ID: <87h7t2q5jj.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAL1eYu+71i6drtR4RjOaZSAeAp3n6Zx_mx5MuudfvDn8oDhdyw@mail.gmail.com> (numbchild@gmail.com's message of "Fri, 14 Aug 2020 12:41:00 +0800")
Hello,
"numbchild@gmail.com" <numbchild@gmail.com> writes:
> With this patch, ol-man.el link type can be a link like this:
> ```org
> [[man:grep::--extended-regexp][grep --extended-regexp]]
> ```
> Occur will auto search "--extended-regexp" string in man page buffer.
Thanks.
> +PATH should be a topic that can be thrown at the man command.
> +If PATH contains extra ::STRING which will use `occur' to search
> +matched strings in man buffer."
> + (string-match "\\(.*?\\)\\(?:::\\(.*\\)\\)?$" path)
> + (let* ((command (match-string 1 path))
> + (search (match-string 2 path)))
> + (funcall org-man-command command)
> + (with-current-buffer (concat "*Man " command "*")
This should only be called if search is non-empty.
> + (occur search))))
Why occur? Org uses `search-forward' for [[foo.org::text]] text links,
and uses `occur' with [[foo.org::/text/]] links.
Wouldn't it be more idiomatic to use a regular text search here?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2020-08-16 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 4:41 [PATCH] improve ol-man.el with occur searching numbchild
2020-08-16 9:54 ` Nicolas Goaziou [this message]
2020-08-17 3:22 ` numbchild
2020-08-31 10:34 ` numbchild
2020-09-05 8:05 ` Bastien
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=87h7t2q5jj.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=numbchild@gmail.com \
/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.