From: Dmitry Gutov <dgutov@yandex.ru>
To: Tom Tromey <tom@tromey.com>
Cc: 25710@debbugs.gnu.org
Subject: bug#25710: Acknowledgement (25.1.91; vc-retrieve-tag does not offer branch namd completion)
Date: Fri, 17 Feb 2017 03:26:37 +0200 [thread overview]
Message-ID: <d5316b95-1b97-0f7a-8528-573de03dccaf@yandex.ru> (raw)
In-Reply-To: <87wpcsxe96.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
On 15.02.2017 06:35, Tom Tromey wrote:
> Emacs itself has 144 tags, while I have about 16 branches.
> So for me at least, for this project, that's 90% clutter and 10% things
> I might actually want to complete.
All Emacs tags start with "emacs-", so if you just input any other
character and press TAB, you won't see the tags.
> For my gdb checkout I have 32 branches and there are 636 tags, so the
> ratio is even worse there -- about 5% useful things.
I think we should consider whether it's likely to be a problem, and not
just reject the unlikely options. Because other people's workflows can
be different.
And I do anticipate having to check out a particular release version,
someday.
Further, like Artem reminded us, we already have a revisions completion
table. So the attached patch seems preferable to me. WDYT?
[-- Attachment #2: vc-retrieve-tag-completion.diff --]
[-- Type: text/x-patch, Size: 1898 bytes --]
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index c308856..358f36a 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2163,18 +2163,22 @@ vc-retrieve-tag
locked files at or below DIR (but if NAME is empty, locked files are
allowed and simply skipped)."
(interactive
- (let ((granularity
- (vc-call-backend (vc-responsible-backend default-directory)
- 'revision-granularity)))
+ (let* ((granularity
+ (vc-call-backend (vc-responsible-backend default-directory)
+ 'revision-granularity))
+ (dir
+ (if (eq granularity 'repository)
+ ;; For VC's that do not work at file level, it's pointless
+ ;; to ask for a directory, branches are created at repository level.
+ ;; XXX: Either we call expand-file-name here, or use
+ ;; file-in-directory-p inside vc-resynch-buffers-in-directory.
+ (expand-file-name (vc-root-dir))
+ (read-directory-name "Directory: " default-directory nil t))))
(list
- (if (eq granularity 'repository)
- ;; For VC's that do not work at file level, it's pointless
- ;; to ask for a directory, branches are created at repository level.
- ;; XXX: Either we call expand-file-name here, or use
- ;; file-in-directory-p inside vc-resynch-buffers-in-directory.
- (expand-file-name (vc-root-dir))
- (read-directory-name "Directory: " default-directory default-directory t))
- (read-string "Tag name to retrieve (default latest revisions): "))))
+ dir
+ (vc-read-revision "Tag name to retrieve (default latest revisions): "
+ (list dir)
+ (vc-responsible-backend dir)))))
(let ((update (yes-or-no-p "Update any affected buffers? "))
(msg (if (or (not name) (string= name ""))
(format "Updating %s... " (abbreviate-file-name dir))
next prev parent reply other threads:[~2017-02-17 1:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 23:11 bug#25710: 25.1.91; vc-retrieve-tag does not offer branch namd completion Tom Tromey
[not found] ` <handler.25710.B.148702752518881.ack@debbugs.gnu.org>
2017-02-14 3:13 ` bug#25710: Acknowledgement (25.1.91; vc-retrieve-tag does not offer branch namd completion) Tom Tromey
2017-02-14 10:24 ` Dmitry Gutov
[not found] ` <87inoczdun.fsf@tromey.com>
2017-02-14 23:31 ` Dmitry Gutov
2017-02-15 4:35 ` Tom Tromey
2017-02-17 1:26 ` Dmitry Gutov [this message]
2017-02-17 4:09 ` Tom Tromey
2017-02-19 22:13 ` Dmitry Gutov
2017-03-04 18:06 ` Tom Tromey
2017-03-06 11:42 ` Dmitry Gutov
2020-08-11 7:56 ` Stefan Kangas
2020-08-11 19:44 ` Dmitry Gutov
2020-08-19 11:39 ` Lars Ingebrigtsen
2017-02-16 3:38 ` bug#25710: Branch completion on vc-retrive-tag Artem Malyshev
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5316b95-1b97-0f7a-8528-573de03dccaf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=25710@debbugs.gnu.org \
--cc=tom@tromey.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).