From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#35645: Fix icalendar--add-diary-entry/diary-make-entry interaction Date: Mon, 13 May 2019 20:13:21 -0400 Message-ID: <874l5xhp0e.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="127824"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 35645@debbugs.gnu.org To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 14 02:17:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQL8A-000X3P-Pu for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 May 2019 02:17:18 +0200 Original-Received: from localhost ([127.0.0.1]:36733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQL89-0002sy-LI for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 May 2019 20:17:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQL7N-0003MC-MU for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 20:16:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQL54-00078u-9p for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 20:14:34 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQL50-00071I-Ac for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 20:14:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQL4z-0005OY-N0 for bug-gnu-emacs@gnu.org; Mon, 13 May 2019 20:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 May 2019 00:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35645 X-GNU-PR-Package: emacs Original-Received: via spool by 35645-submit@debbugs.gnu.org id=B35645.155779281120696 (code B ref 35645); Tue, 14 May 2019 00:14:01 +0000 Original-Received: (at 35645) by debbugs.gnu.org; 14 May 2019 00:13:31 +0000 Original-Received: from localhost ([127.0.0.1]:46638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQL4U-0005Nk-Rk for submit@debbugs.gnu.org; Mon, 13 May 2019 20:13:31 -0400 Original-Received: from mail-it1-f170.google.com ([209.85.166.170]:52694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQL4S-0005NU-Ja for 35645@debbugs.gnu.org; Mon, 13 May 2019 20:13:30 -0400 Original-Received: by mail-it1-f170.google.com with SMTP id q65so2114884itg.2 for <35645@debbugs.gnu.org>; Mon, 13 May 2019 17:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=drp/HRB2l61z99HaJdmOrdscAGHyBTvVz8RYNJHb2E4=; b=MQljH2ItwmUFYFVqEQy51zVHVXuw9CxcIvUAvzyg3+0izOkMu0eEYQ7nvJ9iDJMPwV 9U+SRBtFyCUWJRKI8rmGKQFIMnqLuMKeUh8JtkmTbcb7sIjSvTDRfk78D/uT36haTRO3 DGW5vkb0a5/bUzo503T+yPnvYJxlJc7AqI5rs8X7XkOpRwvDphCERVYPDhatTvrEaq35 9BOUC74/cu8sL52hd3DWOg3PhGOKm1xaRhGLy5XbOcQ4aWOEWgBJdLU/LIT+5kPXQkNo lwM3Z+mR11+cKn57eJ37AvrIJQQSyNHs33B/WOodW3fxx4HK5K2mhu/S5KZnxXIaB8aL RvBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=drp/HRB2l61z99HaJdmOrdscAGHyBTvVz8RYNJHb2E4=; b=o7seRnZOcV6fu0TVooHM+RnI0RhHzKhvfTpXgt5yLi5QbUg75kDCq2CBXpfc/YWUln bp7O2IIXNOm4GvTkQlDAEKUZ9x5vKUWfAe+acp/ljGNW8znBRpzllA15/aOTGhiqrlad cD8dtw/aDhmmTTiWA3jpdToQ6e48heZn+XEwU43+d8SiJnvKwHAA61ZGpIBDNPTwqi7I zY2Pkm8K/FaDw6X63b5kR8jaGAqkkEehNwil1gHRmWbS7Xg4RCkL5Ku2dPRFwlyXADx0 yipAizUwkCHlDsJ0QEZhgXcJcEn5bUR0JXYPwhsdJDbuAuuh0CHkojrECeNCGkEHz0kX uCUA== X-Gm-Message-State: APjAAAVdgCoc4lTbCL5xLSU0ogj1KaKXtOpCJCZ39UI/fUEgzgqQ9kNK 7Oij4U93PPZPzCxMDgS0ETqovEYY X-Google-Smtp-Source: APXvYqwC33HeJvzYht18W0pQpvF7Aw3+c1X1+QsQ7XhkWqvzWIWUvzJ7hZlBeu3q1GfmbwqfDKYbCw== X-Received: by 2002:a24:d613:: with SMTP id o19mr1474593itg.8.1557792802818; Mon, 13 May 2019 17:13:22 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id h191sm645129ith.5.2019.05.13.17.13.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 17:13:22 -0700 (PDT) In-Reply-To: (Thomas Fitzsimmons's message of "Wed, 08 May 2019 23:40:30 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159230 Archived-At: Thomas Fitzsimmons writes: > To keep the code mostly the same (so that I don't need to factor out > another function), I've changed the original logic by adding a > with-current-buffer wrapper, as shown in simplified form in > diary-make-entry-with-current-buffer.patch. I'm hoping this keeps the > default diary-make-entry logic exactly the same, but I'd like > confirmation from someone more familiar with the subtleties of window > and buffer manipulation. > - (let ((pop-up-frames (or pop-up-frames (window-dedicated-p)))) > - (find-file-other-window (or file diary-file))) > + (with-current-buffer > + (let ((pop-up-frames (or pop-up-frames (window-dedicated-p)))) > + (find-file-other-window (or file diary-file))) If you're asking whether (progn (find-file-other-window (or file diary-file)) BODY) is the same as (with-current-buffer (find-file-other-window (or file diary-file)) BODY) Then yes, I'd say you're fine (assuming BODY doesn't change buffers, which I believe is the case here).