From: Michael Albinus <michael.albinus@gmx.de>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org
Subject: Re: Yet another global/gtags package into elpa..
Date: Tue, 29 Mar 2022 10:21:07 +0200 [thread overview]
Message-ID: <87sfr1dv9o.fsf@gmx.de> (raw)
In-Reply-To: <20220328232754.feeavepjtqauvnv5@Ergus> (Ergus's message of "Tue, 29 Mar 2022 01:27:54 +0200")
Ergus <spacibba@aol.com> writes:
> Hi:
Hi,
> If you consider that it is fine to add it; please just give me the
> steps.
>
> https://github.com/Ergus/global-xref
I gave it a cursory reading, some comments (all of them are rather minor).
The Readme.md speaks about global-tags-mode, I guess you mean
global-xref-mode.
--8<---------------cut here---------------start------------->8---
;; Copyright (C) 2022 Jimmy Aguilar Mena
;; Copyright (C) 2022 Jimmy Aguilar Mena
--8<---------------cut here---------------end--------------->8---
This line is doubled, one is sufficient. But if the package is added to
GNU ELPA it will be replaced anyway I guess.
--8<---------------cut here---------------start------------->8---
(defvar global-xref--roots-list nil
"Full list of project Global root.
The address is absolute on remote hsts.")
--8<---------------cut here---------------end--------------->8---
^^^^ Typo
--8<---------------cut here---------------start------------->8---
(defconst global-xref--output-format-regex
"^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([^ \t\]+\\)[ \t]+\\(.*\\)"
--8<---------------cut here---------------end--------------->8---
^ Typo
No backslash in front of ].
Instead of " \t" I would prefer "[:blank:]" for better readability, but
this is personal style. Same for "0-9" vs [:digit:]".
--8<---------------cut here---------------start------------->8---
(let ((criteria `(:machine ,host))
--8<---------------cut here---------------end--------------->8---
Why only the host? The user name could also be relevant. I wouldn't
think too much about, and use just (connection-local-criteria-for-default-directory).
In Emacs 29, you could even use an own :application symbol in order to
distinguish from global Tramp settings.
--8<---------------cut here---------------start------------->8---
(hack-connection-local-variables-apply
(connection-local-criteria-for-default-directory))))
--8<---------------cut here---------------end--------------->8---
Here you use it already.
--8<---------------cut here---------------start------------->8---
(defun global-xref--exec-async (command args &optional sentinel)
"Run COMMAND with ARGS asynchronously and set SENTINEL to process.
Starts an asynchronous process and sets
`global-xref--exec-async-sentinel' as the process sentinel if
SENTINEL is 'nil' or not specified. Returns the process
handler."
--8<---------------cut here---------------end--------------->8---
We don't quote nil in docstrings. And the function returns the
"process object".
--8<---------------cut here---------------start------------->8---
(defun global-xref--exec-sync (command args &optional sentinel)
"Run COMMAND with ARGS synchronously, on success call SENTINEL.
Starts a sync process; on success call SENTINEL or
`global-xref--sync-sentinel' if SENTINEL is not specified or
'nil'. Returns the output of SENTINEL or nil if any error
occurred."
--8<---------------cut here---------------end--------------->8---
The same, we don't quote nil in docstrings.
--8<---------------cut here---------------start------------->8---
(defun global-xref--filter-find-symbol (args symbol creator)
"Run `global-xref--exec-sync' with ARGS on SYMBOL and filter output with CREATOR.
Returns the results as a list of CREATORS outputs similar to
`mapcar'. Creator should be a function with 4 input arguments:
name, code, file, line."
--8<---------------cut here---------------end--------------->8---
Creator shall be CREATOR.
> Best,
> Ergus
Best regards, Michael.
next prev parent reply other threads:[~2022-03-29 8:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220328232754.feeavepjtqauvnv5.ref@Ergus>
2022-03-28 23:27 ` Yet another global/gtags package into elpa Ergus
2022-03-29 8:21 ` Michael Albinus [this message]
2022-03-29 9:56 ` Ergus
2022-03-29 10:08 ` Michael Albinus
2022-03-29 12:16 ` Dmitry Gutov
2022-03-29 16:07 ` Ergus
2022-03-29 16:16 ` Dmitry Gutov
2022-03-29 17:15 ` Ergus
2022-04-02 0:47 ` Daniel Martín
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=87sfr1dv9o.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=spacibba@aol.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.