all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zhanghj <netjunegg@gmail.com>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: netjune@qq.com, Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: kill-matching-buffers without confirmation
Date: Wed, 24 May 2017 09:50:40 +0800	[thread overview]
Message-ID: <87poezkopb.fsf@gmail.com> (raw)
In-Reply-To: <CAFyQvY1ecAoJ2wPvTwCTzHTn6ChOCXJ6baXhj+J+2crJ0RSpwA@mail.gmail.com> (Kaushal Modi's message of "Tue, 23 May 2017 13:18:45 +0000")

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Tue, May 23, 2017 at 9:03 AM Stefan Monnier <monnier@iro.umontreal.ca>
> wrote:
>
>> >> The suggestions to wrap `kill-matching-buffers' with `cl-letf' or `flet'
>> >> are overkill - misguided, IMHO.
>> > Using cl-letf is one of the valid ways.  I wouldn't call it an
>> > overkill.  It instead precisely does what the OP needed without have
>> > to rewrite the whole function in the user's config.
>>
>> No, not "precisely".  It does more than you want.  E.g. it will also
>> affect other threads which could be running at the same time, or any
>> other piece of code that might run during this dynamic scope (e.g. while
>> debugging this code).
>>
>
> TIL. Thanks.
>
>
>> It's good we can use such a workaround when there's no other solution,
>> but let's not design things in a way that requires the use of such hacks.
>
>
> I agree.
>
> The OP hasn't weighed in yet. But if it needs to be fixed, OP should file a
> bug report requesting that.
>
> Else, he can simply redefine the function in the config as Drew suggested.

What about a command like this:

(defun kill-matching-buffers (donot-ask)
(interactive "P")
(...))



      reply	other threads:[~2017-05-24  1:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <537757403.6158992.1495470490914.ref@mail.yahoo.com>
2017-05-22 16:28 ` kill-matching-buffers without confirmation R. Diez
2017-05-22 18:21   ` Kaushal Modi
2017-05-22 18:34     ` Clément Pit-Claudel
2017-05-22 18:42       ` Kaushal Modi
2017-05-22 18:45         ` Clément Pit-Claudel
2017-05-22 19:00           ` Kaushal Modi
2017-05-22 19:13             ` Clément Pit-Claudel
2017-05-22 19:20               ` Kaushal Modi
2017-05-22 19:34               ` Stefan Monnier
2017-05-22 22:21   ` Drew Adams
2017-05-23  5:28     ` Yuri Khan
2017-05-23  6:28     ` R. Diez
2017-05-23 20:34       ` Drew Adams
2017-05-23 12:51     ` Kaushal Modi
2017-05-23 13:03       ` Stefan Monnier
2017-05-23 13:18         ` Kaushal Modi
2017-05-24  1:50           ` zhanghj [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poezkopb.fsf@gmail.com \
    --to=netjunegg@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=netjune@qq.com \
    /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 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.