unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37240: [PATCH] Provide facility to ignore all marked files
@ 2019-08-30 22:07 Wolfgang Scherer
  2019-08-31  6:48 ` Eli Zaretskii
  2019-09-15 13:00 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Scherer @ 2019-08-30 22:07 UTC (permalink / raw)
  To: 37240

[-- Attachment #1: Type: text/plain, Size: 38 bytes --]

Feature request vor *vc-dir* buffer.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Provide-facility-to-ignore-all-marked-files.patch --]
[-- Type: text/x-patch; name="0001-Provide-facility-to-ignore-all-marked-files.patch", Size: 1224 bytes --]

From 7e2fd7641a15a11eca50af490c51927c170a7bb0 Mon Sep 17 00:00:00 2001
From: Wolfgang Scherer <wolfgang.scherer@gmx.de>
Date: Sat, 31 Aug 2019 00:01:40 +0200
Subject: [PATCH] Provide facility to ignore all marked files

* lisp/vc/vc-dir.el: (vc-dir-ignore) With prefix argument, ignore all
marked files.
---
 lisp/vc/vc-dir.el | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9a6f6bb..e225978 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -864,10 +864,18 @@ with the command \\[tags-loop-continue]."
    delimited)
   (fileloop-continue))

-(defun vc-dir-ignore ()
-  "Ignore the current file."
-  (interactive)
-  (vc-ignore (vc-dir-current-file)))
+(defun vc-dir-ignore (&optional arg)
+  "Ignore the current file.
+If a prefix argument is given, ignore all marked files."
+  (interactive "P")
+  (if arg
+      (ewoc-map
+       (lambda (filearg)
+	 (when (vc-dir-fileinfo->marked filearg)
+	   (vc-ignore (vc-dir-fileinfo->name filearg))
+	   t))
+       vc-ewoc)
+    (vc-ignore (vc-dir-current-file))))

 (defun vc-dir-current-file ()
   (let ((node (ewoc-locate vc-ewoc)))
--
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-17  5:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-30 22:07 bug#37240: [PATCH] Provide facility to ignore all marked files Wolfgang Scherer
2019-08-31  6:48 ` Eli Zaretskii
2019-09-15 13:00 ` Lars Ingebrigtsen
2019-09-15 15:40   ` Eli Zaretskii
2019-09-16 12:35     ` Lars Ingebrigtsen
2019-09-16 14:31       ` Eli Zaretskii
2019-09-16 20:02         ` Lars Ingebrigtsen
2019-09-17  5:45           ` Eli Zaretskii

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).