From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 01 11:00:09 2014 Received: (at submit) by debbugs.gnu.org; 1 Sep 2014 15:00:10 +0000 Received: from localhost ([127.0.0.1]:55808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOT5R-0002kz-58 for submit@debbugs.gnu.org; Mon, 01 Sep 2014 11:00:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50928) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOT5K-0002jt-4D for submit@debbugs.gnu.org; Mon, 01 Sep 2014 11:00:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOT56-0005GK-KE for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:59:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOT56-0005GE-IF for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:59:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOT4z-00029e-D4 for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOT4s-0005Bo-Ak for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:59:37 -0400 Received: from mout.gmx.net ([212.227.17.22]:59864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOT4s-0005B4-0S for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:59:30 -0400 Received: from rosalinde.fritz.box ([89.245.117.99]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lo2EO-1Y48UJ0e88-00g1P7 for ; Mon, 01 Sep 2014 16:59:27 +0200 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.3.93; Diary can wrongly be displayed in Calendar's window Date: Mon, 01 Sep 2014 16:59:26 +0200 Message-ID: <87k35nqtdd.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:Rhzk9CTsvcfj23tqwZY/0TeUGsfaRZPAi+dlg77isEbh2SQnbwX DgXdWCtjzzA1mhtLlyghZ0QHVc3vyoERQ00MQD0cFQtmoQyvdURknK677B6fFP14jflTbUW G6UodXGYTMOFJF/ihEkF57Mh/+e19lJzcp9ESJeS+ajcxeM4BpeH0O00+aBz/U/Vr/0A4k2 MdMAJmp2UB5UxkuEDlDMw== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) 0. emacs -Q 1. Type `M-x calendar' and then `i d' to create a diary file with an entry for today. 2. M-x customize-option RET calendar-view-diary-initially-flag RET, toggle the value to `On' and save for current session. 3. M-x diary => The diary entry made in step 1 is displayed (in the Fancy Diary) in the lower window (which is not the selected window). 4. M-x calendar => The lower window resizes to fit the Calendar, which is fleetingly displayed in it but then replaced by the Fancy Diary display (in the same resized window). The same problem happens if the simple diary display is used (e.g. by customizing diary-display-function). A real (i.e. my) use case which exposes this problem is to add `(appt-activate 1)' to your init-file (cf. the commentary in appt.el) so you see e.g. today's diary entries as in step 3 on starting Emacs, and then you open the Calendar as in step 4. The patch below fixes the problem for me, for both types of diary display, though I haven't yet checked whether the change to calendar-in-read-only-buffer adversely affects the other users of this macro, since those are functions I don't use. This problem does not happen in 24.3 (at least not in the one packaged with openSUSE 13.1, for which I don't have the Lisp sources at hand), so the fix should be committed to emacs-24. In GNU Emacs 24.3.93.7 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4) of 2014-08-31 on rosalinde Repository revision: 117464 rgm@gnu.org-20140828191824-o5hn2x503w527yhn Windowing system distributor `The X.Org Foundation', version 11.0.11403901 System Description: openSUSE 13.1 (Bottle) (x86_64) Configured using: `configure --without-toolkit-scroll-bars 'CFLAGS=-g3 -O0'' === modified file 'lisp/calendar/calendar.el' *** lisp/calendar/calendar.el 2014-03-17 16:04:32 +0000 --- lisp/calendar/calendar.el 2014-09-01 13:02:00 +0000 *************** *** 1208,1214 **** (goto-char (point-min)) (set-buffer-modified-p nil) (setq buffer-read-only t) ! (display-buffer ,buffer))) ;; The following are in-line for speed; they can be called thousands of times ;; when looking up holidays or processing the diary. Here, for example, are --- 1208,1214 ---- (goto-char (point-min)) (set-buffer-modified-p nil) (setq buffer-read-only t) ! (display-buffer ,buffer t))) ;; The following are in-line for speed; they can be called thousands of times ;; when looking up holidays or processing the diary. Here, for example, are === modified file 'lisp/calendar/diary-lib.el' *** lisp/calendar/diary-lib.el 2014-01-01 07:43:34 +0000 --- lisp/calendar/diary-lib.el 2014-09-01 12:28:23 +0000 *************** *** 1023,1029 **** (calendar-set-mode-line (format "Diary for %s" (cdr empty)))) (unless (car empty) ; no entries (with-current-buffer dbuff ! (let ((window (display-buffer (current-buffer)))) ;; d-s-p is passed from diary-list-entries. (set-window-point window diary-saved-point) (set-window-start window (point-min))))))) --- 1023,1029 ---- (calendar-set-mode-line (format "Diary for %s" (cdr empty)))) (unless (car empty) ; no entries (with-current-buffer dbuff ! (let ((window (display-buffer (current-buffer) t))) ;; d-s-p is passed from diary-list-entries. (set-window-point window diary-saved-point) (set-window-start window (point-min))))))) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 01 13:37:45 2014 Received: (at 18381) by debbugs.gnu.org; 1 Sep 2014 17:37:45 +0000 Received: from localhost ([127.0.0.1]:55856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOVY1-0000js-C3 for submit@debbugs.gnu.org; Mon, 01 Sep 2014 13:37:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40839 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOVXy-0000jj-EX for 18381@debbugs.gnu.org; Mon, 01 Sep 2014 13:37:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XOVXx-0004Px-F5; Mon, 01 Sep 2014 13:37:41 -0400 From: Glenn Morris To: Stephen Berman Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> X-Spook: smuggle M-14 CBNRC PLO Adriatic digicash bank AIEWS X-Ran: {q]|7jD-tGpn;-boG;~W%3h{I1myv?N:rzm)u;Y>Z>NR@!#dpg4Q,i$hW(?LLMhDq8{1Ul X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 01 Sep 2014 13:37:41 -0400 Message-ID: <70wq9ndyxm.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) Stephen Berman wrote: > the fix should be committed to emacs-24. At this stage, that depends how severe the problem is (not very IMO), and how safe any fix is. At first sight, using ACTION = t with display-buffer doesn't seem too safe to me. That code's been the way it is for many years, so a bisection to find the cause might be informative. BTW minimal example is echo "Monday foo" > ~/diary emacs -Q --eval '(setq calendar-view-diary-initially-flag t)' \ --eval '(progn (diary) (calendar))' At some point all this stuff should be rewritten to use modern methods of displaying buffers, but not now, obviously. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 01 14:38:51 2014 Received: (at 18381) by debbugs.gnu.org; 1 Sep 2014 18:38:51 +0000 Received: from localhost ([127.0.0.1]:55866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOWV7-0002KR-Re for submit@debbugs.gnu.org; Mon, 01 Sep 2014 14:38:50 -0400 Received: from mout.gmx.net ([212.227.17.20]:59378) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOWV2-0002K8-0z for 18381@debbugs.gnu.org; Mon, 01 Sep 2014 14:38:45 -0400 Received: from rosalinde.fritz.box ([89.245.117.99]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M5a9E-1YLpFk3RIe-00xam7; Mon, 01 Sep 2014 20:38:36 +0200 From: Stephen Berman To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <70wq9ndyxm.fsf@fencepost.gnu.org> Date: Mon, 01 Sep 2014 20:38:36 +0200 In-Reply-To: <70wq9ndyxm.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 01 Sep 2014 13:37:41 -0400") Message-ID: <87fvgbqj83.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:0gWpzaXFTBJCuWTl6HRUFjRgLQwOQRfaNBZRbJQJskNTK476SQ6 2Em5l5GVWFeQxPgRayPF9pZhe0Ry37Atci7xkV3ryHs+wKG+JBf0L7dEh0u8dvfsZxKYtna NsHGn7894Ro3s5Pp+4AuV+XG+s7ujQzqkR2Y+3d5C4odKcspO21dsyAdgKBEaMxVrMNNdSQ vhECT8eSTARDYmkRg9noA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 18381 Cc: 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Mon, 01 Sep 2014 13:37:41 -0400 Glenn Morris wrote: > Stephen Berman wrote: > >> the fix should be committed to emacs-24. > > At this stage, that depends how severe the problem is (not very IMO), > and how safe any fix is. Ok. Though it is apparently a regression, I agree it isn't severe, though a bit jarring. > At first sight, using ACTION = t with > display-buffer doesn't seem too safe to me. AFAICS the worst that could happen is the diary (or other calendar listing generated by using calendar-in-read-only-buffer) being displayed in two different windows of the same frame, which doesn't seem as bad as the diary stomping on the calendar. Or is there another bad effect you're worried about? > That code's been the way it > is for many years, so a bisection to find the cause might be > informative. I'm sure it would, but since the only build I have that doesn't show the issue is from openSUSE of 2014-01-23 and lacks a bzr revno, I'm afraid this would be quite a time-consuming effort... Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 20:34:45 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 00:34:45 +0000 Received: from localhost ([127.0.0.1]:58237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPL0e-0003mV-NA for submit@debbugs.gnu.org; Wed, 03 Sep 2014 20:34:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:47608 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPL0d-0003mO-5N for 18381@debbugs.gnu.org; Wed, 03 Sep 2014 20:34:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPL0c-0005qq-Do; Wed, 03 Sep 2014 20:34:42 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <70wq9ndyxm.fsf@fencepost.gnu.org> <87fvgbqj83.fsf@rosalinde.fritz.box> X-Spook: CIA M-14 PGP Attorney General investigation arrangements X-Ran: D@l^tk7tnSG`t%sfkJuTET@8?XrMP5[]$"2dv3bG8g:sg/&jt#A]"P (Stephen Berman's message of "Mon, 01 Sep 2014 20:38:36 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) Bisected to: revno: 115301 committer: martin rudalics branch nick: trunk timestamp: Sat 2013-11-30 10:25:31 +0100 message: Support resizing frames and windows pixelwise. At first glance, there seems no reason why that would cause this, so perhaps it was some unintended side-effect. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 08:28:08 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 12:28:08 +0000 Received: from localhost ([127.0.0.1]:58474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPW91-0006iC-Eg for submit@debbugs.gnu.org; Thu, 04 Sep 2014 08:28:07 -0400 Received: from mout.gmx.net ([212.227.17.21]:53139) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPW8y-0006hh-KJ for 18381@debbugs.gnu.org; Thu, 04 Sep 2014 08:28:05 -0400 Received: from [188.22.104.238] ([188.22.104.238]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MLB89-1XPnG039f7-000M1p; Thu, 04 Sep 2014 14:27:57 +0200 Message-ID: <54085AC5.5050304@gmx.at> Date: Thu, 04 Sep 2014 14:27:49 +0200 From: martin rudalics MIME-Version: 1.0 To: Stephen Berman , 18381@debbugs.gnu.org Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> In-Reply-To: <87k35nqtdd.fsf@rosalinde.fritz.box> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:gNudKyU6rbVH/KKkNKaPupQBE0HG+sz314yShPhWcKymzMtfXyQ HBa/JA9GGKYe9RErneZyY7QL8QnU4DCeM4i0oH2eKXOUZ/fQB6bZ6aoMQHzaS8X8zR1c48z ORnGlipoYsEGbhH66K3WmATOttivsKAVboPKbop33C2oOtJgxnBuTm0THbkb/gAkQqm1B3d w3/SjpGft6Lv9vIOwkYlA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 0. emacs -Q > 1. Type `M-x calendar' and then `i d' to create a diary file with an > entry for today. > 2. M-x customize-option RET calendar-view-diary-initially-flag RET, > toggle the value to `On' and save for current session. > 3. M-x diary => The diary entry made in step 1 is displayed (in the > Fancy Diary) in the lower window (which is not the selected window). The window you're using to display `diary' here ... > 4. M-x calendar => The lower window resizes to fit the Calendar, which > is fleetingly displayed in it but then replaced by the Fancy Diary > display (in the same resized window). ... is the same window where you first show the calendar here. As a consequence, `display-buffer-in-previous-window' will find a window where you have shown `diary' already and reuse that window. I'm not sure what's the best thing to do here - maybe we should remove `display-buffer-in-previous-window' from `display-buffer-fallback-action' in `calendar-in-read-only-buffer'. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 14:04:12 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 18:04:12 +0000 Received: from localhost ([127.0.0.1]:58996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPbOF-0007yo-RK for submit@debbugs.gnu.org; Thu, 04 Sep 2014 14:04:12 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:38283 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPbOC-0007yd-Sv for 18381@debbugs.gnu.org; Thu, 04 Sep 2014 14:04:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPbOB-0000uY-FY; Thu, 04 Sep 2014 14:04:07 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> X-Spook: White House Semtex CIDA sniper government mailbomb George X-Ran: :RCQ-h.hoCVl}n3J$=3QsGB{0$@7[Ax:iDF=0 (martin rudalics's message of "Thu, 04 Sep 2014 14:27:49 +0200") Message-ID: <7lr3zrjm94.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) martin rudalics wrote: > ... is the same window where you first show the calendar here. As a > consequence, `display-buffer-in-previous-window' will find a window > where you have shown `diary' already and reuse that window. I'm not > sure what's the best thing to do here - maybe we should remove > `display-buffer-in-previous-window' from > `display-buffer-fallback-action' in `calendar-in-read-only-buffer'. The most conservative fix would seem to be to only change calendar-basic-setup, where it calls diary-view-entries. I guess what we really want to say is "don't display the diary in the window that you just displayed the calendar in" (is that possible?), but failing that, simply removing display-buffer-in-previous-window seems to work. What's the cleanest way to do that? Binding display-buffer-overriding-action or display-buffer-fallback-action to an explicit list? display-buffer-fallback-action does not have the friendliest format to make "remove element X" straightforward, and is marked as a constant. *** lisp/calendar/calendar.el 2014-03-17 16:04:32 +0000 --- lisp/calendar/calendar.el 2014-09-04 17:57:25 +0000 *************** *** 1432,1438 **** (calendar-generate-window month year) (if (and calendar-view-diary-initially-flag (calendar-date-is-visible-p date)) ! (diary-view-entries)))) (if calendar-view-holidays-initially-flag (let* ((diary-buffer (get-file-buffer diary-file)) (diary-window (if diary-buffer (get-buffer-window diary-buffer))) --- 1432,1444 ---- (calendar-generate-window month year) (if (and calendar-view-diary-initially-flag (calendar-date-is-visible-p date)) ! (let ((display-buffer-fallback-action ! '((display-buffer--maybe-same-window ! display-buffer-reuse-window ! display-buffer--maybe-pop-up-frame-or-window ! display-buffer-use-some-window ! display-buffer-pop-up-frame)))) ! (diary-view-entries))))) (if calendar-view-holidays-initially-flag (let* ((diary-buffer (get-file-buffer diary-file)) (diary-window (if diary-buffer (get-buffer-window diary-buffer))) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 15:48:21 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 19:48:21 +0000 Received: from localhost ([127.0.0.1]:59032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPd13-0002B8-1B for submit@debbugs.gnu.org; Thu, 04 Sep 2014 15:48:21 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40427 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPd10-0002Az-F7 for 18381@debbugs.gnu.org; Thu, 04 Sep 2014 15:48:19 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPd0z-0000MH-K4; Thu, 04 Sep 2014 15:48:17 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> X-Spook: AIMSX counter intelligence espionage Security Council X-Ran: *]<[@3Kp|bwpj,O#W5Q{mzT~OzNl@v5HY`O{kVcr:[Z#@jrAqW^^LklDNnH%j=$,`69k+u X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 04 Sep 2014 15:48:17 -0400 In-Reply-To: <7lr3zrjm94.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 04 Sep 2014 14:04:07 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) Glenn Morris wrote: > I guess what we really want to say is "don't display the diary in the > window that you just displayed the calendar in" (is that possible?), Maybe "don't display the diary in the selected window" would suffice. Sounds like adding '(inhibit-same-window . t) to display-buffer's alist might do, but I cannot figure out how to do that. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 18:39:07 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 22:39:07 +0000 Received: from localhost ([127.0.0.1]:59119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPfgI-0006MC-Rb for submit@debbugs.gnu.org; Thu, 04 Sep 2014 18:39:07 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:43860 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPfgF-0006M3-Rk for 18381@debbugs.gnu.org; Thu, 04 Sep 2014 18:39:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPfgE-000899-Uo; Thu, 04 Sep 2014 18:39:03 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> X-Spook: Aladdin Comirex War on Terrorism Janet Reno quiche DES X-Ran: &$I1o$~0`,*S{1IpGv`cClA:uJjphXW`>n_O:E;\&1&X$#ZZ;v||dr#0VwBLb"26'HU;h9 X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 04 Sep 2014 18:39:02 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 04 Sep 2014 15:48:17 -0400") Message-ID: <64a96fko3d.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) Glenn Morris wrote: > Maybe "don't display the diary in the selected window" would suffice. > Sounds like adding '(inhibit-same-window . t) to display-buffer's alist > might do, but I cannot figure out how to do that. Following works, but having to use `ignore' seems odd? *** lisp/calendar/calendar.el 2014-03-17 16:04:32 +0000 --- lisp/calendar/calendar.el 2014-09-04 22:36:56 +0000 *************** *** 1432,1438 **** (calendar-generate-window month year) (if (and calendar-view-diary-initially-flag (calendar-date-is-visible-p date)) ! (diary-view-entries)))) (if calendar-view-holidays-initially-flag (let* ((diary-buffer (get-file-buffer diary-file)) (diary-window (if diary-buffer (get-buffer-window diary-buffer))) --- 1432,1440 ---- (calendar-generate-window month year) (if (and calendar-view-diary-initially-flag (calendar-date-is-visible-p date)) ! (let ((display-buffer-overriding-action ! '(ignore . ((inhibit-same-window . t))))) ! (diary-view-entries))))) (if calendar-view-holidays-initially-flag (let* ((diary-buffer (get-file-buffer diary-file)) (diary-window (if diary-buffer (get-buffer-window diary-buffer))) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 19:40:51 2014 Received: (at 18381) by debbugs.gnu.org; 4 Sep 2014 23:40:51 +0000 Received: from localhost ([127.0.0.1]:59148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPge2-0007ro-U8 for submit@debbugs.gnu.org; Thu, 04 Sep 2014 19:40:51 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:44950 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPge0-0007rg-HH for 18381@debbugs.gnu.org; Thu, 04 Sep 2014 19:40:49 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPgdz-0006gh-F8; Thu, 04 Sep 2014 19:40:47 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> X-Spook: SP4 STARLAN Area 51 Armani Ft. Meade Crowell Agfa X-Ran: F{aTuv+,3~ERdZ=R{MPXqg@%%zIyXg\Yj8(a?v>4!l\V=,ZRj`ZllZ`N|*#o!9`!V@%,q} X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 04 Sep 2014 19:40:47 -0400 In-Reply-To: <64a96fko3d.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 04 Sep 2014 18:39:02 -0400") Message-ID: <5zoauvymww.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) Glenn Morris wrote: > Following works, but having to use `ignore' seems odd? Oh, apparently `nil' works too. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 06:46:27 2014 Received: (at 18381) by debbugs.gnu.org; 5 Sep 2014 10:46:28 +0000 Received: from localhost ([127.0.0.1]:59299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPr2A-0007w0-NI for submit@debbugs.gnu.org; Fri, 05 Sep 2014 06:46:27 -0400 Received: from mout.gmx.net ([212.227.15.18]:60104) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPr26-0007vh-OS for 18381@debbugs.gnu.org; Fri, 05 Sep 2014 06:46:23 -0400 Received: from [88.117.58.197] ([88.117.58.197]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M92ZJ-1XXJo50SFR-00CTP8; Fri, 05 Sep 2014 12:46:16 +0200 Message-ID: <5409946E.4040907@gmx.at> Date: Fri, 05 Sep 2014 12:46:06 +0200 From: martin rudalics MIME-Version: 1.0 To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> In-Reply-To: <7lr3zrjm94.fsf@fencepost.gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:L4HWvN8e2/0dA/wYygkFuwnHGe46Njmo9p5zvc3G5ZaPdbJyt1w 2E7tfWNhy27/2L40nmHRTLqBJNyJLvqmYrXuTK7DylgZzl8lZDJP840DJhmPyt2t3v+nmlh FbY5ngLwk9QXUXkTxtw8s+Czzb9k0ZLWM/ZI7t/HbN1VfZEaD8VM0ebfTfnD5kt8W86thba Bsx7ZO8Rw6P9qk99pZJHg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > The most conservative fix would seem to be to only change > calendar-basic-setup, where it calls diary-view-entries. Is that sufficient? I thought the problematic call is that of `display-buffer' in `calendar-in-read-only-buffer'. I must admit that I have a hard time debugging calendar code. > I guess what we really want to say is "don't display the diary in the > window that you just displayed the calendar in" (is that possible?), We can make that window softly dedicated to the calendar. But that's not very clean. > but > failing that, simply removing display-buffer-in-previous-window seems to > work. What's the cleanest way to do that? Binding > display-buffer-overriding-action or display-buffer-fallback-action > to an explicit list? display-buffer-fallback-action does not have the > friendliest format to make "remove element X" straightforward, > and is marked as a constant. If we can identify the specific `display-buffer' or `pop-to-buffer' calls in the calendar or diary code, we should pass it via the ACTION argument. That is, pass the value of `display-buffer-fallback-action' with `display-buffer-in-previous-window' removed. `display-buffer-overriding-action' is too drastic here and `display-buffer-fallback-action' should not be used indeed. Eventually, the code should be revised anyway. For example, when a window can be split, apparently the following sequence of actions is performed: (1) The calendar is displayed and its window is fit to the buffer. (2) The diary is displayed in a window split off from the calendar window annihilating the effort of `fit-window-to-buffer' and leaving me with some two lines of the calendar. martin From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 06:46:59 2014 Received: (at 18381) by debbugs.gnu.org; 5 Sep 2014 10:46:59 +0000 Received: from localhost ([127.0.0.1]:59302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPr2g-0007ws-UL for submit@debbugs.gnu.org; Fri, 05 Sep 2014 06:46:59 -0400 Received: from mout.gmx.net ([212.227.15.18]:60454) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPr2e-0007wd-J6 for 18381@debbugs.gnu.org; Fri, 05 Sep 2014 06:46:57 -0400 Received: from [88.117.58.197] ([88.117.58.197]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MYx2x-1Xv17B35Qh-00VeWf; Fri, 05 Sep 2014 12:46:50 +0200 Message-ID: <54099491.4040607@gmx.at> Date: Fri, 05 Sep 2014 12:46:41 +0200 From: martin rudalics MIME-Version: 1.0 To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> In-Reply-To: <64a96fko3d.fsf@fencepost.gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:54IJUtk5Rj1YFL8tZDsitvwhVZkLB6fhmRAanyqvCdDwYYUibOW gomMkU99xKmN31beYdo4xSXp1iH/0/dDdC4a39hZgAoqeIiTwe0ZK2YYvj5egCkGqna0pV7 mvZLM24V20Sq81MLk3Dxu9apcdEuBRfbea2qzl4WclY6xad8JNBCYj9cfzBXTfI7rU+KZ+Y j5B5u2goa0rMdeRXAvv1g== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> Maybe "don't display the diary in the selected window" would suffice. >> Sounds like adding '(inhibit-same-window . t) to display-buffer's alist >> might do, but I cannot figure out how to do that. > > Following works, but having to use `ignore' seems odd? > ! (let ((display-buffer-overriding-action > ! '(ignore . ((inhibit-same-window . t))))) > ! (diary-view-entries))))) Stephen's original proposal would be cleaner provided we are sure that the calendar window is always selected when `display-buffer' is called. Is `calendar-in-read-only-buffer' presumably only executed in a state where the calendar window is shown and selected? martin From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 12:14:17 2014 Received: (at 18381) by debbugs.gnu.org; 5 Sep 2014 16:14:17 +0000 Received: from localhost ([127.0.0.1]:59994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPw9R-0001Ym-AA for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:14:17 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:43657 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPw9P-0001Yc-IJ for 18381@debbugs.gnu.org; Fri, 05 Sep 2014 12:14:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XPw9M-00041k-GB; Fri, 05 Sep 2014 12:14:12 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> X-Spook: beanpole tempest Adriatic Ruby Ridge counter terrorism X-Ran: @Dbc2|(p<}(9s7U{OJd=9|wwERss[$n'AP]{)7g6'YSbY?ffu-&K#/qv,r~l="R+~|@3,- X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 05 Sep 2014 12:14:12 -0400 In-Reply-To: <54099491.4040607@gmx.at> (martin rudalics's message of "Fri, 05 Sep 2014 12:46:41 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) martin rudalics wrote: >> ! (let ((display-buffer-overriding-action >> ! '(ignore . ((inhibit-same-window . t))))) >> ! (diary-view-entries))))) > > Stephen's original proposal would be cleaner provided we are sure that > the calendar window is always selected when `display-buffer' is called. I disagree, the above seems cleaner to me. I don't like changing a general-purpose function to fix a specific problem. Why do you say "`display-buffer-overriding-action' is too drastic"? It seems fine to me. Since coming up with that form, I've noticed that isearch.el and lisp.el use something similar (or identical). I'm inclined to commit this solution... > Is `calendar-in-read-only-buffer' presumably only executed in a state > where the calendar window is shown and selected? I don't think so, no. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 04:52:51 2014 Received: (at 18381) by debbugs.gnu.org; 6 Sep 2014 08:52:51 +0000 Received: from localhost ([127.0.0.1]:60316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQBjm-0002x1-Fj for submit@debbugs.gnu.org; Sat, 06 Sep 2014 04:52:50 -0400 Received: from mout.gmx.net ([212.227.15.15]:55232) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQBjj-0002we-8I for 18381@debbugs.gnu.org; Sat, 06 Sep 2014 04:52:48 -0400 Received: from [194.118.137.128] ([194.118.137.128]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LyVpm-1YUa8G39ew-015mzn; Sat, 06 Sep 2014 10:52:38 +0200 Message-ID: <540ACB49.8010405@gmx.at> Date: Sat, 06 Sep 2014 10:52:25 +0200 From: martin rudalics MIME-Version: 1.0 To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ASFMllUO6C2UvViT3bppBfzFzWPfIenlDGv1uiRYDTHIdX+j4bh 363wHLFa+ZsvuIeGe89pg756UFAyQT5LXArxU/DeCmQ0DWDs6bW2j1H3hkIlDDitJa66xS4 VIVXm+7VZHNZjHwZBPNqd9V2pOwhARWyjvbltOU5IEcp49fiSOcVsQLC+vfSSdqZjRfinCZ SPkDvgF1ZfxyVqEsz7ChQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > I disagree, the above seems cleaner to me. I don't like changing a > general-purpose function to fix a specific problem. Then I probably misinterpreted his patch. What is the "general-purpose function" you intend here? In general, if an application uses `display-buffer' or `pop-to-buffer' directly, the application should enclose the preferred way to display the buffer (or where not to display it) in the ACTION argument. `display-buffer-overriding-action' should be only used as a last resort: For example, when the targeted `display-buffer' call is nested in some macro, in which case, however, the binding will probably affect any other `display-buffer' call within that macro. Or, when the application deliberately wants to preclude any form of users' customization. > Why do you say "`display-buffer-overriding-action' is too drastic"? > It seems fine to me. Since coming up with that form, I've noticed that > isearch.el and lisp.el use something similar (or identical). > > I'm inclined to commit this solution... Saying "don't use the selected window" should never harm here (a user would never want to override that, I presume) so you should be on the safe side side with your solution. Still I wonder why you can't change `display-buffer' calls directly here. >> Is `calendar-in-read-only-buffer' presumably only executed in a state >> where the calendar window is shown and selected? > > I don't think so, no. But wouldn't then using `display-buffer-overriding-action' preclude the use of another window which is at that time shown and selected? martin From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 02:04:48 2014 Received: (at 18381) by debbugs.gnu.org; 8 Sep 2014 06:04:48 +0000 Received: from localhost ([127.0.0.1]:33164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQs4F-0007EY-L4 for submit@debbugs.gnu.org; Mon, 08 Sep 2014 02:04:47 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60328 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQs4D-0007EQ-0D for 18381@debbugs.gnu.org; Mon, 08 Sep 2014 02:04:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XQs4B-0001Qu-8Q; Mon, 08 Sep 2014 02:04:43 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> X-Spook: benelux Telex Freeh Hugo Chavez ANZUS Comirex Project X-Ran: %Q,ucWdKiRJ5dtOyMCtnR0'!r#5|O2#TX)0'>xp6M#P[q~yEJ!F<>*0sW@v)i][7Q`@[3l X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 08 Sep 2014 02:04:43 -0400 Message-ID: <9l38c2bqbo.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) martin rudalics wrote: > Then I probably misinterpreted his patch. What is the "general-purpose > function" you intend here? The reported issue is to do with calendar-view-diary-initially-flag non-nil, so (in emacs-24) I prefer to fix that specific case and nothing more, rather than changing the general function calendar-in-read-only-buffer and the "can get called every time you view the diary" diary-simple-display. I'm sure the general way in which calendar displays things can be modernized (e.g. cal-x is probably unnecessary these days) to use display-buffer's newer features, but it's not on my agenda right now. So I committed my thing to emacs-24 and we'll see how it goes. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 02:04:59 2014 Received: (at control) by debbugs.gnu.org; 8 Sep 2014 06:04:59 +0000 Received: from localhost ([127.0.0.1]:33167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQs4R-0007Ez-6T for submit@debbugs.gnu.org; Mon, 08 Sep 2014 02:04:59 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:60329 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQs4P-0007Er-92 for control@debbugs.gnu.org; Mon, 08 Sep 2014 02:04:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XQs4O-0001SU-WA for control@debbugs.gnu.org; Mon, 08 Sep 2014 02:04:57 -0400 Date: Mon, 08 Sep 2014 02:04:56 -0400 Message-Id: Subject: control message for bug 18381 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.7 (------) close 18381 24.3.94 From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 16:32:41 2014 Received: (at 18381) by debbugs.gnu.org; 8 Sep 2014 20:32:41 +0000 Received: from localhost ([127.0.0.1]:34095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XR5c8-0007na-V3 for submit@debbugs.gnu.org; Mon, 08 Sep 2014 16:32:41 -0400 Received: from mout.gmx.net ([212.227.17.22]:53784) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XR5c6-0007nK-DM for 18381@debbugs.gnu.org; Mon, 08 Sep 2014 16:32:39 -0400 Received: from rosalinde.fritz.box ([89.245.96.116]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MfAog-1XkObl0tEQ-00OlVM; Mon, 08 Sep 2014 22:32:31 +0200 From: Stephen Berman To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> Date: Mon, 08 Sep 2014 22:32:28 +0200 In-Reply-To: <9l38c2bqbo.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 08 Sep 2014 02:04:43 -0400") Message-ID: <87bnqpj1k3.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:/U44bNFaw4BD0JaXUhkuwZlmvFJED4BihcYb6DUf6deX3d547lx hOk23PtEleuuR8IbWburMvh42WOQh5e9Mimrx0xYFNdiA/7m+AfwyO2SQkDIis/20Pkg76w HmZ5VuT3PWIoFLV9V7Rdr6FeJCq86OXt+e9NomRJp757kKj1TViySJkzvfsHFUarAutrI6H qOCQaZs5JdT4fSBqoyouQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 18381 Cc: martin rudalics , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) On Mon, 08 Sep 2014 02:04:43 -0400 Glenn Morris wrote: > martin rudalics wrote: > >> Then I probably misinterpreted his patch. What is the "general-purpose >> function" you intend here? > > The reported issue is to do with calendar-view-diary-initially-flag non-nil, > so (in emacs-24) I prefer to fix that specific case and nothing more, > rather than changing the general function calendar-in-read-only-buffer > and the "can get called every time you view the diary" diary-simple-display. > > I'm sure the general way in which calendar displays things can be > modernized (e.g. cal-x is probably unnecessary these days) to use > display-buffer's newer features, but it's not on my agenda right now. > > So I committed my thing to emacs-24 and we'll see how it goes. Thanks. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 08 21:26:08 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 01:26:08 +0000 Received: from localhost ([127.0.0.1]:34257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRAC8-0007nm-E2 for submit@debbugs.gnu.org; Mon, 08 Sep 2014 21:26:08 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:50832 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRAC5-0007ne-Hq for 18381@debbugs.gnu.org; Mon, 08 Sep 2014 21:26:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XRAC4-0007Mf-Ju; Mon, 08 Sep 2014 21:26:04 -0400 From: Glenn Morris To: Stephen Berman Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> X-Spook: target Ceridian Fortezza Al-Qaeda clones RSA AVN ICE X-Ran: Or3fzUi(dghXxii=;3;{6/v2;|B)8?y3_bgj":I|TD/A9SK%p{d?tp,'gQ\h\M#49 X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 08 Sep 2014 21:26:04 -0400 In-Reply-To: <87bnqpj1k3.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Mon, 08 Sep 2014 22:32:28 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -7.5 (-------) X-Debbugs-Envelope-To: 18381 Cc: martin rudalics , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.5 (-------) Actually it's still not 100% right... emacs -Q M-x diary M-x calendar M-x diary -> clobbered calendar window; not so in 24.3 I see now that the cause is that the pixelwise change that I bisected to earlier added display-buffer-in-previous-window to display-buffer-fallback-action - it wasn't there before. So I can restore the 24.3 behaviour by using this horrible thing: (let ((display-buffer-fallback-action (list (delq 'display-buffer-in-previous-window (copy-sequence (car display-buffer-fallback-action)))))) ...) This is Not The Right Thing, but ought to restore 24.3-like behaviour. I think what I really want is a way to say to display-buffer: never use a window showing buffer X. Is that doable? From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 02:59:00 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 06:59:00 +0000 Received: from localhost ([127.0.0.1]:34367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRFOF-0007t9-Ne for submit@debbugs.gnu.org; Tue, 09 Sep 2014 02:59:00 -0400 Received: from mout.gmx.net ([212.227.15.19]:51749) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRFOD-0007sv-GG for 18381@debbugs.gnu.org; Tue, 09 Sep 2014 02:58:58 -0400 Received: from [88.117.49.181] ([88.117.49.181]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Mh9yT-1XnbdC1RSb-00MM2z; Tue, 09 Sep 2014 08:58:51 +0200 Message-ID: <540EA527.4050809@gmx.at> Date: Tue, 09 Sep 2014 08:58:47 +0200 From: martin rudalics MIME-Version: 1.0 To: Glenn Morris , Stephen Berman Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:80mIm+QSRSmOZcJIhfc+wpRuRiu4OLu3PV6nZpk7x4iGLZm+9Kb iWG6mCLNCvmr+BH/GLq62ZNtwnlj8E4FALJil3Sus3d5cDJ0kKmpR9pdEnLdzIO0XU4DSsS yOEh3oVjYsvNERSGKBudtrgbMGe/CdX+lpRoxMa7xprjvlT+igwJ1dvllvjx000WOhTBIND 95VFBBv+cCzQbAsM72xbQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 Cc: 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > emacs -Q > M-x diary > M-x calendar > M-x diary -> clobbered calendar window; not so in 24.3 > > I see now that the cause is that the pixelwise change that I bisected = to > earlier added display-buffer-in-previous-window to > display-buffer-fallback-action - it wasn't there before. > > So I can restore the 24.3 behaviour by using this horrible thing: > > (let ((display-buffer-fallback-action > (list (delq 'display-buffer-in-previous-window > (copy-sequence (car display-buffer-fallback-action)))= ))) > ...) > > This is Not The Right Thing, but ought to restore 24.3-like behaviour.= That's what I meant earlier when I said that > > The window you're using to display `diary' here ... > > ... is the same window where you first show the calendar here. As a= > > consequence, `display-buffer-in-previous-window' will find a window > > where you have shown `diary' already and reuse that window. I'm not= > > sure what's the best thing to do here - maybe we should remove > > `display-buffer-in-previous-window' from > > `display-buffer-fallback-action' in `calendar-in-read-only-buffer'. but obviously we should do something like (let ((display-buffer-overriding-action (list (delq 'display-buffer-in-previous-window (copy-sequence (car display-buffer-fallback-action))))))= ...) because (as you remarked earlier) `display-buffer-fallback-action' is a constant and should not be changed by the user or an application. > I think what I really want is a way to say to display-buffer: > never use a window showing buffer X. > > Is that doable? You can mark the calendar window as softly dedicated to its buffer, ideally only as long as `diary' wants to use it. Otherwise, we could invent new alist entries =E0 la `inhibit-same-window': `inhibit-windows' (whose value would be a list of windows that should not be used), and/or `inhibit-windows-on' (whose value would be a list of buffers that should remain displayed), not for Emacs 24.4, in any case. You still didn't tell me who actually is responsible for displaying the calendar and then the diary. Is it `calendar-in-read-only-buffer'? If we are sure that it's there, we can pass the necessary advice in that mancro's `display-buffer' call's ACTION argument. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 03:44:30 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 07:44:30 +0000 Received: from localhost ([127.0.0.1]:34376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRG6H-0000aR-QU for submit@debbugs.gnu.org; Tue, 09 Sep 2014 03:44:30 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56009 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRG6F-0000aI-4U for 18381@debbugs.gnu.org; Tue, 09 Sep 2014 03:44:28 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XRG6D-0004T0-CR; Tue, 09 Sep 2014 03:44:25 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> <540EA527.4050809@gmx.at> X-Spook: Hamas Attorney General mindwar 64 Vauxhall Cross defense X-Ran: Fj*^~?sPi*df)c!v./RRs6YaUgQo#U1H0WE3z"0wO!0[D4]s4OUq,&V!^(q!sjo@+\Q1Av X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 09 Sep 2014 03:44:25 -0400 In-Reply-To: <540EA527.4050809@gmx.at> (martin rudalics's message of "Tue, 09 Sep 2014 08:58:47 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -7.5 (-------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.5 (-------) martin rudalics wrote: >> (let ((display-buffer-fallback-action >> (list (delq 'display-buffer-in-previous-window >> (copy-sequence (car display-buffer-fallback-action)))))) >> ...) [...] > (let ((display-buffer-overriding-action > (list (delq 'display-buffer-in-previous-window > (copy-sequence (car display-buffer-fallback-action)))))) > ...) I can't see that the second form is substantially cleaner than the first, but ok. > You still didn't tell me who actually is responsible for displaying the > calendar and then the diary. Not sure I understand. Like I said: M-x diary M-x calendar M-x diary If you are asking me where the display-buffer call is, then it's diary-display-function as called from diary-list-entries. The two standard values are diary-fancy-display (which uses calendar-in-read-only-buffer, which calls display-buffer), and diary-simple-display, which calls display-buffer directly. Since calendar-in-read-only-buffer is a general function, I'd prefer not to add too much that is specific to this one usage. And even for the diary using the previous window might be right in some cases, just not this specific one where the previous window now contains the calendar. > Is it `calendar-in-read-only-buffer'? If we are sure that it's there, > we can pass the necessary advice in that mancro's `display-buffer' > call's ACTION argument. What would the necessary advice look like? At the moment I think I'm going to settle for just getting 24.3 behaviour back. Perhaps this should all be rewritten using modern display syntax rather than trying to coerce it to behave piecemeal. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 05:18:43 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 09:18:44 +0000 Received: from localhost ([127.0.0.1]:34411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRHZM-0002sk-7a for submit@debbugs.gnu.org; Tue, 09 Sep 2014 05:18:43 -0400 Received: from mout.gmx.net ([212.227.17.20]:52225) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRHZJ-0002sW-EY for 18381@debbugs.gnu.org; Tue, 09 Sep 2014 05:18:34 -0400 Received: from [88.117.56.234] ([88.117.56.234]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Ls7MZ-1YN8W806Bj-013rPp; Tue, 09 Sep 2014 11:18:23 +0200 Message-ID: <540EC5D8.2000302@gmx.at> Date: Tue, 09 Sep 2014 11:18:16 +0200 From: martin rudalics MIME-Version: 1.0 To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> <540EA527.4050809@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:taT09nvhNsaKH9tUmZ6ThD5e+dqp+pnNNwhux/INXJg68HlcXWD Tp5Yb9Wp+ehUHEp3xrU0bWvbbzSs/lUYBaoC1lVFE2ORBisx/DkqkK4HViBo3aMqyeiCmxi S2oDOZ2MURGa/KZr1xUmCrOXD80rDHTGcuu5rAvBoDoZUW093mr2BSF2ULPUAVC6IPYHdaK e8zLNMkL66WduhOb3e3rg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >>> (let ((display-buffer-fallback-action >>> (list (delq 'display-buffer-in-previous-window >>> (copy-sequence (car display-buffer-fallback-action)))))) >>> ...) > [...] >> (let ((display-buffer-overriding-action >> (list (delq 'display-buffer-in-previous-window >> (copy-sequence (car display-buffer-fallback-action)))))) >> ...) > > I can't see that the second form is substantially cleaner than the > first, but ok. `display-buffer-overriding-action' is a variable while `display-buffer-fallback-action' is a constant. But the former is also stronger in the sense that the user cannot override it. >> You still didn't tell me who actually is responsible for displaying the >> calendar and then the diary. > > Not sure I understand. Like I said: > > M-x diary > M-x calendar > M-x diary > > If you are asking me where the display-buffer call is, then it's > diary-display-function as called from diary-list-entries. > > The two standard values are diary-fancy-display (which uses > calendar-in-read-only-buffer, which calls display-buffer), > and diary-simple-display, which calls display-buffer directly. > > Since calendar-in-read-only-buffer is a general function, I'd prefer not > to add too much that is specific to this one usage. I now understand what you earlier meant with "general function". > And even for the diary using the previous window might be right in some > cases, just not this specific one where the previous window now contains > the calendar. > >> Is it `calendar-in-read-only-buffer'? If we are sure that it's there, >> we can pass the necessary advice in that mancro's `display-buffer' >> call's ACTION argument. > > What would the necessary advice look like? Setting inhibit-same-window to t. But the problem is that if `calendar-in-read-only-buffer' is used to display the calendar or to display the diary even when the calendar was not displayed before or is not called with the calendar window selected, then inhibiting the same window might not be TRT. WOW if `calendar-in-read-only-buffer' is as general as you say, we really should not mess with its `display-buffer' arguments. > At the moment I think I'm going to settle for just getting 24.3 > behaviour back. Agreed. I still don't understand _where_ you plan to make the needed change if `calendar-in-read-only-buffer' is too general. For example, where precisely would you bind `display-buffer-fallback-action'? I suppose around the calls of `calendar-in-read-only-buffer' in diary.el. Is that correct? Can a function like `diary-fancy-display' within the `calendar-in-read-only-buffer' macro try to display another buffer but the diary itself? BTW, did you try using the dedicated status of the calendar window? Something like (let* ((window (get-buffer-window "calendar")) (status (and window (window-dedicated-p window)))) ;; Protect calendar window. (and window (set-window-dedicated-p window 'soft)) (calendar-in-read-only-buffer .... ) ;; Unprotect calendar window. (and window (window-live-p window) (set-window-dedicated-p window status))) martin From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 09:00:28 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 13:00:28 +0000 Received: from localhost ([127.0.0.1]:34544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRL23-0001IJ-2M for submit@debbugs.gnu.org; Tue, 09 Sep 2014 09:00:27 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40604) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRL1z-0001IA-W1 for 18381@debbugs.gnu.org; Tue, 09 Sep 2014 09:00:24 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s89D0LAT001313; Tue, 9 Sep 2014 09:00:22 -0400 Received: by pastel.home (Postfix, from userid 20848) id A8EE960787; Tue, 9 Sep 2014 09:00:21 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window Message-ID: References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> <540EA527.4050809@gmx.at> Date: Tue, 09 Sep 2014 09:00:21 -0400 In-Reply-To: (Glenn Morris's message of "Tue, 09 Sep 2014 03:44:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5059=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5059> : inlines <1267> : streams <1285426> : uri <1812031> X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 18381 Cc: martin rudalics , Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) >>> (let ((display-buffer-fallback-action >>> (list (delq 'display-buffer-in-previous-window >>> (copy-sequence (car display-buffer-fallback-action)))))) >>> ...) > [...] >> (let ((display-buffer-overriding-action >> (list (delq 'display-buffer-in-previous-window >> (copy-sequence (car display-buffer-fallback-action)))))) >> ...) > I can't see that the second form is substantially cleaner than the > first, but ok. Indeed, they both have downsides. I think as a "stop-gap" fix, I think the first is preferable. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 09 14:13:06 2014 Received: (at 18381) by debbugs.gnu.org; 9 Sep 2014 18:13:06 +0000 Received: from localhost ([127.0.0.1]:35624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRPub-0002ex-O9 for submit@debbugs.gnu.org; Tue, 09 Sep 2014 14:13:06 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:40223 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRPuZ-0002ep-BF for 18381@debbugs.gnu.org; Tue, 09 Sep 2014 14:13:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XRPuY-0002it-AZ; Tue, 09 Sep 2014 14:13:02 -0400 From: Glenn Morris To: martin rudalics Subject: Re: bug#18381: 24.3.93; Diary can wrongly be displayed in Calendar's window References: <87k35nqtdd.fsf@rosalinde.fritz.box> <54085AC5.5050304@gmx.at> <7lr3zrjm94.fsf@fencepost.gnu.org> <64a96fko3d.fsf@fencepost.gnu.org> <54099491.4040607@gmx.at> <540ACB49.8010405@gmx.at> <9l38c2bqbo.fsf@fencepost.gnu.org> <87bnqpj1k3.fsf@rosalinde.fritz.box> <540EA527.4050809@gmx.at> <540EC5D8.2000302@gmx.at> X-Spook: Vince Foster RSA MD4 Israel mania Defcon Mossad CNCIS X-Ran: tZ'C`Fp`G1QQ(Dj1Ownwn_SnDo'DJSttQ{)p2Wq_F,r[9RrT6dE5(<40M(j]q4W+9,F5.H X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 09 Sep 2014 14:13:02 -0400 In-Reply-To: <540EC5D8.2000302@gmx.at> (martin rudalics's message of "Tue, 09 Sep 2014 11:18:16 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -7.5 (-------) X-Debbugs-Envelope-To: 18381 Cc: Stephen Berman , 18381@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.5 (-------) I went with the following. (I suspect it's going to be like when you press on a bubble in some wallpaper, and another one pops up somewhere else...) @@ -901,12 +900,20 @@ ;;; (diary-include-other-diary-files) ; recurse ;;; (run-hooks 'diary-list-entries-hook)) (unless list-only - (if (and diary-display-function - (listp diary-display-function)) - ;; Backwards compatibility. - (run-hooks 'diary-display-function) - (funcall (or diary-display-function - 'diary-simple-display)))) + ;; Avoid M-x diary; M-x calendar; M-x diary + ;; clobbering the calendar window. + ;; FIXME this is not the right solution. + (let ((display-buffer-fallback-action + (list (delq + 'display-buffer-in-previous-window + (copy-sequence + (car display-buffer-fallback-action)))))) + (if (and diary-display-function + (listp diary-display-function)) + ;; Backwards compatibility. + (run-hooks 'diary-display-function) + (funcall (or diary-display-function + 'diary-simple-display))))) (run-hooks 'diary-hook))))) (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) (or d-incp (message "Preparing diary...done")) From unknown Wed Sep 10 16:41:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Oct 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator