unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: "Philip K." <philip@warpmail.net>
Cc: 41868@debbugs.gnu.org
Subject: bug#41868: [PATCH] Add project-clean-up command
Date: Mon, 15 Jun 2020 12:38:38 +0100	[thread overview]
Message-ID: <87imfspni9.fsf@tcd.ie> (raw)
In-Reply-To: <87wo48r2cr.fsf@warpmail.net> (Philip K.'s message of "Mon, 15 Jun 2020 13:32:36 +0200")

"Philip K." <philip@warpmail.net> writes:

> Thanks for the notes, just a few questions/justifications below:
>
> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>>> +        (when (file-in-directory-p true root)
>>> +          (push buf bufs))))
>>> +    bufs))
>>
>> Maybe the list should be returned in the same order as (buffer-list), by
>> using either nreverse or seq-filter?
>
> Is there any benifit to this, or is this just a matter of not disrupting
> expectations? My thought was that this was more like a set than a proper
> list (despite the function name).

I just thought it might be more natural to process buffers in their
usual order, in case it makes a difference in any kill-buffer-related
hooks.  It probably doesn't matter much.

>>> +    (dolist (buf (project--list-buffers pr))
>>> +      (let ((match (mapcar (lambda (re)
>>> +                             (and (string-match-p re (buffer-name buf)) t))
>>> +                           project-dont-clean-regexps)))
>>> +        (unless (memq t match)
>>> +          (kill-buffer buf))))))
>>
>> Nit: AKA
>>
>>   (unless (seq-some (lambda (re)
>>                       (string-match-p re (buffer-name buf)))
>>                     project-dont-clean-regexps)
>>     ...)
>
> Would this require adding a "(require 'seq)" to the top? I always kind
> of hesistate in adding new dependencies in patches, but if it's already
> loaded, it would look better this way.

A lot of seq.el functions are autoloaded, including seq-some.

Thanks,

-- 
Basil





  reply	other threads:[~2020-06-15 11:38 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 10:00 bug#41868: [PATCH] Add project-clean-up command Philip K.
2020-06-15 11:04 ` Basil L. Contovounesios
2020-06-15 11:32   ` Philip K.
2020-06-15 11:38     ` Basil L. Contovounesios [this message]
2020-06-15 12:28 ` Dmitry Gutov
2020-06-15 18:18   ` Philip K.
2020-06-15 20:50     ` Dmitry Gutov
2020-06-15 21:50       ` Philip K.
2020-06-16 10:19         ` Dmitry Gutov
2020-06-16 10:52         ` Basil L. Contovounesios
2020-06-16 14:31           ` Eli Zaretskii
2020-06-16 17:12             ` Philip K.
2020-06-18  1:05               ` Dmitry Gutov
2020-06-18  6:46                 ` Philip K.
2020-06-18 13:04                   ` Dmitry Gutov
2020-06-18 14:11                     ` Philip K.
2020-06-18 15:36                       ` Dmitry Gutov
2020-06-18 22:06                 ` Juri Linkov
2020-06-18 22:57                   ` Dmitry Gutov
2020-06-18 23:02                     ` Juri Linkov
2020-06-18 23:10                       ` Dmitry Gutov
2020-06-18 23:18                         ` Juri Linkov
2020-06-18 23:29                           ` Dmitry Gutov
2020-06-26  0:49                             ` Dmitry Gutov
2020-06-19  6:28                       ` Philip K.
2020-08-14 17:05                         ` Lars Ingebrigtsen
2020-08-14 20:36                           ` Dmitry Gutov
2020-06-19  6:20                   ` Eli Zaretskii
2020-06-15 22:49       ` Juri Linkov
2020-06-16  0:23         ` Dmitry Gutov
2020-06-16 21:47           ` Juri Linkov

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=87imfspni9.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=41868@debbugs.gnu.org \
    --cc=philip@warpmail.net \
    /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).