[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files'
From: |
Nicolas Petton |
Subject: |
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files' |
Date: |
Fri, 02 Mar 2018 21:58:43 +0100 |
Nicolas Petton <nicolas@petton.fr> writes:
> If we accept that `seq-elt', and other positional functions of seq.el
> should not work on streams, then I could rewrite stream.el to make it a
> positioned stream where previous elements are discarded after each
> element generation. However the list of supported functions from seq.el
> API would be significantly reduced.
I had something like the following in mind:
(cl-defstruct nstream current next-function)
(cl-defmethod nstream-next ((stream nstream))
(setf (nstream-current stream) (funcall (nstream-next-function stream)
(nstream-current stream))))
(defun nstream-range (&optional start end step)
(unless start (setq start 0))
(unless step (setq step 1))
(make-nstream :current start
:next-function (lambda (cur)
(if (equal cur end)
nil
(+ cur step)))))
Cheers,
Nico
signature.asc
Description: PGP signature
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Michael Heerdegen, 2018/03/01
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Michael Heerdegen, 2018/03/03
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Nicolas Petton, 2018/03/03
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', John Mastro, 2018/03/02
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Noam Postavsky, 2018/03/03
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Noam Postavsky, 2018/03/04
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Eli Zaretskii, 2018/03/04
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Noam Postavsky, 2018/03/11
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Eli Zaretskii, 2018/03/11
bug#30626: 26.0.91; Crash when traversing a `stream-of-directory-files', Noam Postavsky, 2018/03/11