Dear Ikumi, On Wed, Sep 18, 2024 at 1:37 AM Ikumi Keita <ik...@ikumi.que.jp> wrote:
> Hi Leo, > > >>>>> Leo Stein <leo.st...@gmail.com> writes: > > Changing the subject of this thread because I went off on the tangent of > > making graphicx.el parse \graphicspath commands, so that extra paths > could > > be searched when prompting for \includegraphics. The patch is attached. I > > assume there are things that I did that are not idiomatic, because I > don't > > know this codebase (or really much emacs development at all). Please let > me > > know if this is useful for inclusion or not. Obvious missing feature: > What > > about multi-file documents? Also I did not try to make things robust, > > frankly because I don't know how. > > It basically looks good to me. I'd like to ask one question. It searches > for \graphicspath{...} repeatedly by > (while (re-search-forward graphicspath-regex nil t) > loop. Is it expected that \graphicspath{...} appears multiple times in a > document? > Probably not, but I didn't want to make any assumptions. One example might be that a user includes a comment just before/after their \graphicspath{...} command, reminding themselves of the syntax, e.g. % The syntax for \graphicspath is \graphicspath{{path1/}{path2/}{path3/}} \graphicspath{{figs/}{../scripts/figs/}} I now realize that even the \graphicspath command inside the comment will be parsed. Should it be ignored? I think that LaTeX won't mind extra whitespace or ignored comments inside a graphicspath command, e.g. \graphicspath{% {figs/} % my handmade figures {../scripts/figs/} % figures generated by my analysis code } but my current regex won't match this example. > (There are some other minor concerns in the patch, but I think I can > tweak them when I incorporate it.) > > Have you signed FSF copyright assignment form before? If not, please > have a look at > > https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future Ok, I have sent the appropriate email. Best Leo > > > Regards, > Ikumi Keita > #StandWithUkraine #StopWarInUkraine > #Gaza #StopMassiveKilling #CeasefireNOW >