[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TeX-documentation-texdoc

From: Ikumi Keita
Subject: Re: TeX-documentation-texdoc
Date: Fri, 27 Jan 2023 19:18:26 +0900

Hi Arash,

>>>>> Arash Esbati <> writes:
> Thanks for working on this.  Reg.
> 0001-Make-TeX-documentation-texdoc-work-for-okular, I have some minor
> comments:


> I think we can shorten this by calling `thing-at-point' with the
> optional second argument NO-PROPERTIES

>   (thing-at-point THING &optional NO-PROPERTIES)

>   When the optional argument NO-PROPERTIES is non-nil,
>   strip text properties from the return value.

> => (let ((pkg (thing-at-point 'symbol t))

Indeed. I wasn't aware of the optional argument.

> Is this `save-excursion' really necessary?  Or am I missing something?

Thanks, I just copied the previous code without looking at it well.

> +                  (while (re-search-forward
> +                          ;; XXX: XEmacs doesn't support character classes in
> +                          ;; regexps, like "[:alnum:]".

> I think we can delete this comment.


> I think we should borrow some code from the compat-package[1] and
> introduce our `TeX-format-prompt' and once we're at Emacs 28, we just
> alias it to `format-prompt' or use `format-prompt' directly.  Suppose we
> have this in tex.el:

> Then we could write:
> (setq pkg (TeX-read-string (TeX-format-prompt
>                             "View documentation for" pkg)
>                            nil nil pkg))
> Adjusting the other 30 occurrences in the repo should be easy.  WDYT?

That's a good idea. Can I leave that work to you?

Ikumi Keita
#StandWithUkraine #StopWarInUkraine

Attachment: 0001-Fix-TeX-documentation-texdoc-for-okular.patch.gz
Description: revised patch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]