unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Austin Clements <amdragon@mit.edu>, Tomi Ollila <tomi.ollila@iki.fi>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] make (kill-emacs) from emacsclient work with emacs 23.(1|2)
Date: Thu, 12 Jan 2012 10:51:42 +0200	[thread overview]
Message-ID: <yf6boq9482p.fsf@taco2.nixu.fi> (raw)
In-Reply-To: <20120112041344.GZ20796@mit.edu>

On Wed, 11 Jan 2012 23:13:44 -0500, Austin Clements <amdragon@mit.edu> wrote:
> This is important to fix, but this solution seems needlessly
> roundabout.  What about using an after-advice and simply delq'ing
> whatever the offending hook is?  That wouldn't even need a version
> check.

delq could work -- thanks for the idea -- but removing the hook was
wrong shot from my part (the hook removes the cleanup I mentioned in
one of my previous mails).

To minimise behaviour changes (to zero in emacs 23.3+) to minimal
in 23.(1|2) my next suggestion goes along lines:

;; Work around a bug in emacs 23.1 and emacs 23.2 which prevents
;; noninteractive (kill-emacs) from emacsclient.
(when (and (= emacs-major-version 23) (< emacs-minor-version 3))
  (defadvice kill-emacs (before disable-yes-or-no-p)
    "Disable yes-or-no-p before executing kill-emacs"
    (defun yes-or-no-p (prompt) t))
  (ad-activate 'kill-emacs))

Now just (accidental) additions which use yes-or-no-p 
into kill-emacs-hook are not noticed in emacs 23.1 & 23.2.


Tomi

  reply	other threads:[~2012-01-12  8:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-01 10:05 Possible bug in tests with emacs 23.2.1 (debian stable) Mark Walters
2012-01-02 14:55 ` Tomi Ollila
2012-01-03 13:07   ` Tomi Ollila
2012-01-03 20:19     ` Mark Walters
2012-01-11 14:49       ` [PATCH] make (kill-emacs) from emacsclient work with emacs 23.(1|2) Tomi Ollila
2012-01-12  4:13         ` Austin Clements
2012-01-12  8:51           ` Tomi Ollila [this message]
2012-01-12 17:02             ` Austin Clements
2012-01-13  8:17               ` [PATCH] test: " Tomi Ollila
2012-01-13 19:18                 ` Austin Clements
2012-01-22 13:20                 ` David Bremner

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=yf6boq9482p.fsf@taco2.nixu.fi \
    --to=tomi.ollila@iki.fi \
    --cc=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    /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://yhetil.org/notmuch.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).