all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22892: 25.1.50; dired-get-marked-files distinguish marks
@ 2016-03-03  9:36 Tino Calancha
  2016-03-04 12:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Tino Calancha @ 2016-03-03  9:36 UTC (permalink / raw)
  To: 22892

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


* lisp/dired.el(dired-get-marked-files):

Added optional argument `marker-char'. If non-nil,
the files retrieved are those marked with MARKER-CHAR.
Otherwise the returned files are those marked with
`dired-marker-char'.

Callers are not affected: the arg is optional and
added at the end of the parameter list.



In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29)
  of 2016-03-03 built on calancha-pc
Repository revision: 887f6126c5ce9084f93083765ac026ca6b28175c

[-- Attachment #2: Type: text/plain, Size: 1976 bytes --]

diff --git a/lisp/dired.el b/lisp/dired.el
index 6c7445c..b69e611 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -627,7 +627,7 @@ dired-map-over-marks
      ;; save-excursion loses, again
      (dired-move-to-filename)))
 
-(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked)
+(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked marker-char)
   "Return the marked files' names as list of strings.
 The list is in the same order as the buffer, that is, the car is the
   first marked file.
@@ -644,22 +644,26 @@ dired-get-marked-files
 
 If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
 return (t FILENAME) instead of (FILENAME).
-Don't use that together with FILTER."
-  (let ((all-of-them
-	 (save-excursion
-	   (delq nil (dired-map-over-marks
-		      (dired-get-filename localp 'no-error-if-not-filep)
-		      arg nil distinguish-one-marked))))
-	result)
+Don't use that together with FILTER.
+
+Optional arg MARKER-CHAR, if non-nil, then it is the marker
+char to search. Otherwise `dired-marker-char' is used."
+  (let* ((dired-marker-char (or marker-char dired-marker-char))
+         (all-of-them
+          (save-excursion
+            (delq nil (dired-map-over-marks
+                       (dired-get-filename localp 'no-error-if-not-filep)
+                       arg nil distinguish-one-marked))))
+         result)
     (when (equal all-of-them '(t))
       (setq all-of-them nil))
     (if (not filter)
-	(if (and distinguish-one-marked (eq (car all-of-them) t))
-	    all-of-them
-	  (nreverse all-of-them))
+    (if (and distinguish-one-marked (eq (car all-of-them) t))
+        all-of-them
+      (nreverse all-of-them))
       (dolist (file all-of-them)
-	(if (funcall filter file)
-	    (push file result)))
+    (if (funcall filter file)
+        (push file result)))
       result)))
 \f
 ;; The dired command

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

* bug#22892: 25.1.50; dired-get-marked-files distinguish marks
  2016-03-03  9:36 bug#22892: 25.1.50; dired-get-marked-files distinguish marks Tino Calancha
@ 2016-03-04 12:34 ` Lars Ingebrigtsen
  2016-03-05 13:13   ` Tino Calancha
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2016-03-04 12:34 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 22892

Tino Calancha <f92capac@gmail.com> writes:

> * lisp/dired.el(dired-get-marked-files):
>
> Added optional argument `marker-char'. If non-nil,
> the files retrieved are those marked with MARKER-CHAR.
> Otherwise the returned files are those marked with
> `dired-marker-char'.
>
> Callers are not affected: the arg is optional and
> added at the end of the parameter list.

Is this a subset of the subsequent bug report in 22893?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#22892: 25.1.50; dired-get-marked-files distinguish marks
  2016-03-04 12:34 ` Lars Ingebrigtsen
@ 2016-03-05 13:13   ` Tino Calancha
  0 siblings, 0 replies; 3+ messages in thread
From: Tino Calancha @ 2016-03-05 13:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Tino Calancha, 22892



> Is this a subset of the subsequent bug report in 22893?
Exactly. Its a conservative proposal which just modified one function.
I though maybe the maintainers would hesitate to add  #22893 which
introduce more changes.
We can close this thread.





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

end of thread, other threads:[~2016-03-05 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03  9:36 bug#22892: 25.1.50; dired-get-marked-files distinguish marks Tino Calancha
2016-03-04 12:34 ` Lars Ingebrigtsen
2016-03-05 13:13   ` Tino Calancha

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.