From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#25380: 25.1; save-window-excursion problem in batch mode Date: Sun, 08 Jan 2017 23:38:33 +0000 Message-ID: References: <7qwpe5xusr.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c03096e69c9ec05459dc0b9 X-Trace: blaine.gmane.org 1483918774 23157 195.159.176.226 (8 Jan 2017 23:39:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2017 23:39:34 +0000 (UTC) Cc: 25380@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 00:39:25 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQN3N-0003G7-TF for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2017 00:39:10 +0100 Original-Received: from localhost ([::1]:36165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQN3R-0008VY-WC for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jan 2017 18:39:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQN3J-0008VH-UN for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 18:39:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQN3G-0004rZ-PX for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 18:39:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQN3G-0004rU-Lz for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 18:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cQN3G-0001bz-FK for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2017 18:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2017 23:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25380 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25380-submit@debbugs.gnu.org id=B25380.14839187316179 (code B ref 25380); Sun, 08 Jan 2017 23:39:02 +0000 Original-Received: (at 25380) by debbugs.gnu.org; 8 Jan 2017 23:38:51 +0000 Original-Received: from localhost ([127.0.0.1]:47245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQN35-0001ba-CV for submit@debbugs.gnu.org; Sun, 08 Jan 2017 18:38:51 -0500 Original-Received: from mail-oi0-f43.google.com ([209.85.218.43]:33230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQN33-0001bN-LG for 25380@debbugs.gnu.org; Sun, 08 Jan 2017 18:38:50 -0500 Original-Received: by mail-oi0-f43.google.com with SMTP id 128so478969615oig.0 for <25380@debbugs.gnu.org>; Sun, 08 Jan 2017 15:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AjjZeSTCUo9eY8l7M9LIBt4JKkZ81BxyuNIGQtv90ho=; b=J8yibxg0kQrhgFkQieXzb7CKUisrAO33d+w9Y8m9TttYXdlzrCvzX+AS3urDhmrOK9 zW2dCzMIPt0kX64SIWlUIn++Hcwp0BOZ2UB4W/kJ0HcrvhrT0se60Oa0lqaRtZO6lS/l pajypOwqGEka6+hHVCikqba88XyRWPr8T8maAFccDigwqzRKqHEAPnUW/qFM9nv1LnEE PMZKOxU1nJH7niyUO2Zvf/XaW7cELTmdTLVsh4V/0a4GIQ+N00RL4Ged9JTzxX4aP82S LpXd+5J6oili7slgqY45/8yfvJYiPYn8zsrr/p2SNkwK9R0TY5viF+keJf9GZoubjQAS B+0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AjjZeSTCUo9eY8l7M9LIBt4JKkZ81BxyuNIGQtv90ho=; b=KGDOhiaMJkW/osLm2PMhbwp+FqmHAfco06vYJGIToeXYo2m5ONQLjHdS3PpGiD1LWy gUp1gxsMZ3DgqgchCo304ktu75vOm24l/MbENPnOXHc6PiLf2yHYrKTqtNkCqZhpmoDX jy4SBrthVARed4hVd3bDcymVvQWl51WXatjMkOdy7qjN3dyViVO+HjpJJ+bBw0ESbZiu N1rQ84Rb1vy5oO1Az9c6M0xfe/Ub9krnwOIejb5hH2xXQfM9AteOox09pHhKyHDlCevQ 55HiZ0y8E/oXHdsoDsl+PXYJHm74yCzjCD72edBT+rzWnU7+mAOsFE7mxGFyqpmMZiEg I30w== X-Gm-Message-State: AIkVDXJaNnTjfzXz3uAmIBHaxoJPm254VoO7+AYxtjelChzw1PlHvxr1B7uKqj+CyESYonzmUxLZftfzcvFkCg== X-Received: by 10.157.3.44 with SMTP id 41mr6352647otv.81.1483918723892; Sun, 08 Jan 2017 15:38:43 -0800 (PST) In-Reply-To: <7qwpe5xusr.fsf@fencepost.gnu.org> 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: 208.118.235.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:127920 Archived-At: --94eb2c03096e69c9ec05459dc0b9 Content-Type: text/plain; charset=UTF-8 Glenn Morris schrieb am So., 8. Jan. 2017 um 19:37 Uhr: > Philipp Stephani wrote: > > > Apparently, restoring a window configuration doesn't result in the same > > window configuration in batch mode: > > > > $ emacs -Q -batch -eval '(print (equal (save-window-excursion > (current-window-configuration)) (current-window-configuration)))' > > > > nil > > It works in 24.5 and earlier. Something to do with window-edges? > > emacs -Q -batch --eval '(progn (setq c (current-window-configuration)) > (print (window-edges)) > (set-window-configuration c) > (print (window-edges)))' > > 24.5: > (0 1 10 9) > (0 1 10 9) > > 25.1: > (0 0 10 9) > (0 1 10 10) > According to 'git bisect' one of the following commits is the culprit: 768b24eb0e On GNU/Linux, use timerfd for asynchronous timers. * configure.ac (toplevel): Check whether GNU/Linux-specific timerfd functions and macros are available. * m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well. * src/atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h. (toplevel): Rename alarm_timer_ok to special_timer_available. [HAVE_TIMERFD]: Declare timerfd. [HAVE_CLOCK_GETRES]: Declare resolution. (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to system timer resolution. (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime. (timerfd_callback) [HAVE_TIMERFD]: New function. (atimer_result, debug_timer_callback, Fdebug_timer_check) [ENABLE_CHECKING]: New function for the sake of automated tests. (init_atimer) [HAVE_TIMERFD]: Setup timerfd. [HAVE_CLOCK_GETRES]: Likewise for system timer resolution. [ENABLE_CHECKING]: Defsubr test function. * src/atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype. * src/lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. * src/process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. * test/automated/timer-tests.el (timer-tests-debug-timer-check): New test. 7daa4ff121 Parse completion input in a iPython friendly way. a7947cd874 Fix the GDB xsubchartable command. 34c6b847fb Fix --without-x build and pacify --enable-gcc-warnings. Problems reported in Bug#18122 and Bug#18124. * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM. (frame_windows_min_size): Now static. * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: Define as no-op. (adjust_frame_size): Always declare prototype. 4256626a7a Prevent Python process shell buffer to pop twice. * lisp/progmodes/python.el (python-shell-switch-to-shell): Do not call pop-to-buffer. 414e1537ab Open doc text also if it's not saved to a file. ca43b53625 * lisp/progmodes/python.el (python-shell-with-shell-buffer): New macro. (python-shell-font-lock-get-or-create-buffer) (python-shell-font-lock-kill-buffer) (python-shell-font-lock-with-font-lock-buffer) (python-shell-font-lock-cleanup-buffer) (python-shell-font-lock-toggle): Use it. (python-shell-font-lock-turn-on) (python-shell-font-lock-turn-off): Use it. Make command. da41ffdd08 Merge from emacs-24; up to 2014-06-26T06:55:15Z!rgm@gnu.org f5bed1021b Grab all Python process output before inferior-python-mode hooks. 168f8e732d * frame.c (x_set_frame_parameters): Don't use uninitialized locals. 2daa203c3e Fix Gnus-related issues reported by David Kastrup in . * atimer.c (timerfd_callback): Always read expiration data. Add comment. (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer. * process.c (add_timer_wait_descriptor): Add timer descriptor to input_wait_mask and non_process_wait_mask as well. 5dc4b8ca3d Fix some issues with setting the frame height. 72c64ae95a More robust shell startup and code setup. 0f6bbc3da3 Support horizontal scrolling of bidirectional text. 81abec91ee * net/tramp-sh.el (tramp-get-remote-python): Also search for executables named "python2" or "python3". (tramp-get-remote-uid-with-python): Use parentheses around arguments to `print' to make it compatible with Python 3. (tramp-get-remote-gid-with-python): Ditto. 8862cff49c Fix Changelog typo, introduced by last commit. 96fa02baec Reinstate removed code. 3477e27021 Complete pixelwise frame/window resizing, add horizontal scrollbar support. 6628be853e * lisp/progmodes/python.el (inferior-python-mode): Make input prompts read-only. 8e3b4f58f1 In adjust_frame_size use FRAME_WINDOW_P instead of FRAME_X_WINDOW (Bug#18138). Unfortunately compilation fails with these commits (on macOS), so I can't narrow it down any further. --94eb2c03096e69c9ec05459dc0b9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Glenn = Morris <rgm@gnu.org> schrieb am So= ., 8. Jan. 2017 um 19:37=C2=A0Uhr:
= Philipp Stephani wrote:

> Apparently, restoring a window configuration doesn't result in the= same
> window configuration in batch mode:
>
> $ emacs -Q -batch -eval '(print (equal (save-window-excursion (cur= rent-window-configuration)) (current-window-configuration)))'
>
> nil

It works in 24.5 and earlier. Something to do with window-edges?

emacs -Q -batch --eval '(progn (setq c (current-window-configuration))<= br class=3D"gmail_msg"> (print (window-edges))
(set-window-configuration c)
(print (window-edges)))'

24.5:
(0 1 10 9)
(0 1 10 9)

25.1:
(0 0 10 9)
(0 1 10 10)

Accordi= ng to 'git bisect' one of the following commits is the culprit:

768b24eb0e On GNU/Linux, use timerfd for asynch= ronous timers. * configure.ac (toplevel= ): Check whether GNU/Linux-specific timerfd functions and macros are availa= ble. * m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well. * = src/atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h. (toplevel): = Rename alarm_timer_ok to special_timer_available. [HAVE_TIMERFD]: Declare t= imerfd. [HAVE_CLOCK_GETRES]: Declare resolution. (start_atimer) [HAVE_CLOCK= _GETRES]: Round up timestamp to system timer resolution. (set_alarm) [HAVE_= TIMERFD]: Use timerfd_settime. (timerfd_callback) [HAVE_TIMERFD]: New funct= ion. (atimer_result, debug_timer_callback, Fdebug_timer_check) [ENABLE_CHEC= KING]: New function for the sake of automated tests. (init_atimer) [HAVE_TI= MERFD]: Setup timerfd. [HAVE_CLOCK_GETRES]: Likewise for system timer resol= ution. [ENABLE_CHECKING]: Defsubr test function. * src/atimer.h (timerfd_ca= llback) [HAVE_TIMERFD]: Add prototype. * src/lisp.h (add_timer_wait_descrip= tor) [HAVE_TIMERFD]: Likewise. * src/process.c (add_timer_wait_descriptor) = [HAVE_TIMERFD]: New function. * test/automated/timer-tests.el (timer-tests-= debug-timer-check): New test.

7daa4ff121 Par= se completion input in a iPython friendly way.

a7947cd874 Fix the GDB xsubchartable command.

34c6b847fb Fix --without-x build and pacify --enable-gcc-warnings. Pro= blems reported in Bug#18122 and Bug#18124. * frame.c (get_frame_param): Def= ine even if !HAVE_WINDOW_SYSTEM. (frame_windows_min_size): Now static. * fr= ame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: Define as n= o-op. (adjust_frame_size): Always declare prototype.

4256626a7a Prevent Python process shell buffer to pop twice. * lis= p/progmodes/python.el (python-shell-switch-to-shell): Do not call pop-to-bu= ffer.

414e1537ab Open doc text also if it= 9;s not saved to a file.

ca43b53625 * lisp/p= rogmodes/python.el (python-shell-with-shell-buffer): New macro. (python-she= ll-font-lock-get-or-create-buffer) (python-shell-font-lock-kill-buffer) (py= thon-shell-font-lock-with-font-lock-buffer) (python-shell-font-lock-cleanup= -buffer) (python-shell-font-lock-toggle): Use it. (python-shell-font-lock-t= urn-on) (python-shell-font-lock-turn-off): Use it.=C2=A0 Make command.

<= p class=3D"inbox-inbox-p1">da41ffdd08 Merge from emacs-24; up to 2014-06-26= T06:55:15Z!rgm@gnu.org

f5bed1021b Grab all Python process output before inferior-pyt= hon-mode hooks.

168f8e732d * frame.c (x_set_= frame_parameters): Don't use uninitialized locals.

2daa203c3e Fix Gnus-related issues reported by David Kastrup <= ;dak@gnu.org> in <http://list= s.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>. * atimer.= c (timerfd_callback): Always read expiration data. Add comment. (turn_on_at= imers) [HAVE_TIMERFD]: Disarm timerfd timer. * process.c (add_timer_wait_de= scriptor): Add timer descriptor to input_wait_mask and non_process_wait_mas= k as well.

5dc4b8ca3d Fix some issues with s= etting the frame height.

72c64ae95a More rob= ust shell startup and code setup.

0f6bbc3da3= Support horizontal scrolling of bidirectional text.

81abec91ee * net/tramp-sh.el (tramp-get-remote-python): Also searc= h for executables named "python2" or "python3". (tramp-= get-remote-uid-with-python): Use parentheses around arguments to `print'= ; to make it compatible with Python 3. (tramp-get-remote-gid-with-python): = Ditto.

8862cff49c Fix Changelog typo, introd= uced by last commit.

96fa02baec Reinstate re= moved code.

3477e27021 Complete pixelwise fr= ame/window resizing, add horizontal scrollbar support.

6628be853e * lisp/progmodes/python.el (inferior-python-mode): Ma= ke input prompts read-only.

8e3b4f58f1 In ad= just_frame_size use FRAME_WINDOW_P instead of FRAME_X_WINDOW (Bug#18138).



Unfortunately compilation fails with t= hese commits (on macOS), so I can't narrow it down any further.
--94eb2c03096e69c9ec05459dc0b9--