From: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 37189@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing
Date: Wed, 12 Feb 2020 18:23:32 +0100 [thread overview]
Message-ID: <b0e313e3-8fee-b0cb-51fb-a20af44acf4a@gmx.de> (raw)
In-Reply-To: <83zhdpqbas.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2953 bytes --]
Hi Eli,
I have refactored the API change request according to the latest
discussion. I assume, that the "file path" use case must be
implemented anyway, correct?
I have changed the code, such that the user visible changes are
absolutely minimized. Only one change remains, which never worked
before anyway.
I have also attached a complete sequence diagram, with annotations to
show, that it is not possible to determine the correct ignore file in
a subdirectory with an escaped pattern in all cases.
### API change
Function func:vc-ignore is modified to handle both the "pattern" and the
"file path" use cases.
- The parameter FILE of *cv-ignore* is renamed to PATTERN-OR-FILE to
clarify its dual purpose.
- The additional optional parameter is-file is introduced to determine
how the PATTERN-OR-FILE argument should be treated. If it is nil
(the default) the behavior is unchanged. Otherwise, a file path is
expected, which is transformed to fit the ignore file location and
then escaped according to the VC pattern syntax.
- The documenation string of *vc-ignore* is clarified to avoid
possible misconceptions,like a file somehow being equivalent to a
wildcard, or that glob(7) patterns are the only type of patterns for
version control systems.
- For the "file path" use case, users have come to expect that they
can mark several file in *vc-dir-mode* and *dired-mode* to perform
VC operations on that fileset. This is implemented in function
*vc-ignore-fileset*. in *dired-mode* the user is prompted before
making any changes (similar to a delete operation).
- The new function *vc-ignore-pattern* is an alias for *vc-ignore* to
allow for a clear and unambiguous documentation string that does not
mix use cases.
- The new function *vc-ignore-file*, when called interactively, either
operates on the current fileset in *vc-dir-mode* and *dired-mode* or
prompts for a file to ignore.
- The function *vc-dir-ignore* is modified to call
*vc-ignore-pattern* interactively. After processing, a message is
displayed in the echo area with a hint to press "F" for ignoring files.
### Proposed keyboard shortcuts
`C-x v F` => *vc-ignore-file*\
`C-x v G` => *vc-ignore-pattern* ; functionality unchanged
in *vc-dir-mode*:
`F` => *vc-ignore-file*\
`G` => *vc-dir-ignore* ; functionality was broken
### User-visible changes
The only user-visible change in the current features is the keyboard
shortcut "G" in *vc-dir-mode*. It does no longer write an invalid
absolute file path into the ignore file, but prompts for a pattern
instead. An additional hint to press "F" for ignoring files is displayed
afterwards.
The only new feature is *vc-ignore-file* for ignoring an unescaped |file path|.
Greetings, Wolfgang
[-- Attachment #2: vc-ignore-sequence-diagram.png --]
[-- Type: image/png, Size: 94935 bytes --]
next prev parent reply other threads:[~2020-02-12 17:23 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 0:21 bug#37189: 25.4.1: vc-hg-ignore implementation is missing Wolfgang Scherer
[not found] ` <handler.37189.B.15667808855126.ack@debbugs.gnu.org>
2019-08-26 23:25 ` bug#37189: Acknowledgement (25.4.1: vc-hg-ignore implementation is missing) Wolfgang Scherer
2019-08-27 7:45 ` Eli Zaretskii
2019-08-28 1:46 ` bug#37189: *** GMX Spamverdacht *** " Wolfgang Scherer
2019-08-28 6:16 ` Eli Zaretskii
2019-08-29 1:23 ` bug#37189: 25.4.1: vc-hg-ignore implementation is missing Wolfgang Scherer
2019-08-29 0:38 ` Wolfgang Scherer
2019-08-29 15:52 ` Wolfgang Scherer
2019-12-25 0:16 ` Dmitry Gutov
2020-01-05 3:46 ` Wolfgang Scherer
2020-01-05 8:58 ` Andreas Schwab
2020-01-05 17:25 ` Wolfgang Scherer
2020-01-14 1:14 ` Dmitry Gutov
2020-02-01 1:20 ` Wolfgang Scherer
2020-02-01 8:27 ` Eli Zaretskii
2020-02-03 1:16 ` Wolfgang Scherer
2020-02-04 18:55 ` Eli Zaretskii
2020-02-05 5:18 ` Wolfgang Scherer
2020-02-05 19:06 ` Wolfgang Scherer
2020-02-07 9:57 ` Eli Zaretskii
2020-02-08 9:57 ` Dmitry Gutov
2020-02-08 19:45 ` Wolfgang Scherer
2020-02-08 20:05 ` Eli Zaretskii
2020-02-08 23:12 ` Wolfgang Scherer
2020-02-09 13:57 ` Wolfgang Scherer
2020-02-09 14:07 ` Wolfgang Scherer
2020-02-09 13:57 ` Wolfgang Scherer
2020-02-09 13:57 ` Wolfgang Scherer
2020-02-10 16:02 ` Eli Zaretskii
2020-02-11 1:45 ` Wolfgang Scherer
2020-02-11 17:32 ` Eli Zaretskii
2020-02-11 22:28 ` Wolfgang Scherer
2020-02-12 18:34 ` Eli Zaretskii
[not found] ` <6f3ba261-e1f9-cf19-cc22-ec8c24cf3298@gmx.de>
2020-02-12 23:20 ` Wolfgang Scherer
2020-02-13 1:18 ` Wolfgang Scherer
2020-02-13 15:09 ` Eli Zaretskii
2020-02-13 16:30 ` Wolfgang Scherer
2020-02-13 23:43 ` Richard Stallman
2020-02-14 1:49 ` Wolfgang Scherer
2020-02-16 2:29 ` Richard Stallman
2020-02-13 15:21 ` Eli Zaretskii
2020-02-13 23:40 ` Dmitry Gutov
2020-02-14 9:23 ` Eli Zaretskii
2020-02-21 0:05 ` Dmitry Gutov
2020-02-21 8:10 ` Eli Zaretskii
2020-02-21 22:22 ` Wolfgang Scherer
2020-02-22 7:44 ` Eli Zaretskii
2020-02-22 13:46 ` Wolfgang Scherer
2020-02-22 14:30 ` Eli Zaretskii
2020-02-22 19:14 ` Dmitry Gutov
2020-02-22 22:04 ` Wolfgang Scherer
2020-02-22 23:32 ` Wolfgang Scherer
2020-02-23 15:20 ` Eli Zaretskii
2020-02-23 19:16 ` Wolfgang Scherer
2020-02-22 19:30 ` Dmitry Gutov
2020-02-22 22:00 ` Wolfgang Scherer
2020-02-22 23:58 ` Dmitry Gutov
2020-02-23 0:29 ` Wolfgang Scherer
2020-02-24 23:07 ` Dmitry Gutov
2020-02-25 2:22 ` Wolfgang Scherer
2020-03-19 23:42 ` Dmitry Gutov
2020-07-03 20:53 ` Wolfgang Scherer
2020-07-03 21:49 ` Dmitry Gutov
2020-02-12 17:23 ` Wolfgang Scherer [this message]
2020-02-08 23:59 ` Wolfgang Scherer
2020-02-09 21:06 ` Wolfgang Scherer
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=b0e313e3-8fee-b0cb-51fb-a20af44acf4a@gmx.de \
--to=wolfgang.scherer@gmx.de \
--cc=37189@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
/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).