From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.bugs Subject: bug#19413: 24.4; (desktop-save-mode 1) save frame as page and desktop sticky (_NET_WM_STATE_STICKY) when close Emacs shaded, (setq desktop-restore-frames nil) fix issue. Date: Sat, 20 Dec 2014 14:33:48 +0200 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87oaqy5wlv.fsf@gavenkoa.example.com> References: <87h9wrqpmt.fsf@gavenkoa.example.com> <54954B26.2000200@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419078874 14212 80.91.229.3 (20 Dec 2014 12:34:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2014 12:34:34 +0000 (UTC) Cc: 19413@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 20 13:34:28 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y2JEh-0003ur-Gm for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 13:34:19 +0100 Original-Received: from localhost ([::1]:34153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2JEg-0004Hn-Ob for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 07:34:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2JEX-0004G5-4i for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 07:34:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2JER-0005Jg-CO for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 07:34:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2JER-0005Jb-92 for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 07:34:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y2JEQ-0004Nt-RS for bug-gnu-emacs@gnu.org; Sat, 20 Dec 2014 07:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Dec 2014 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19413 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19413-submit@debbugs.gnu.org id=B19413.141907883516832 (code B ref 19413); Sat, 20 Dec 2014 12:34:02 +0000 Original-Received: (at 19413) by debbugs.gnu.org; 20 Dec 2014 12:33:55 +0000 Original-Received: from localhost ([127.0.0.1]:52209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2JEI-0004NP-2Y for submit@debbugs.gnu.org; Sat, 20 Dec 2014 07:33:54 -0500 Original-Received: from mail-lb0-f182.google.com ([209.85.217.182]:58651) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2JEG-0004NG-8w for 19413@debbugs.gnu.org; Sat, 20 Dec 2014 07:33:53 -0500 Original-Received: by mail-lb0-f182.google.com with SMTP id f15so2202433lbj.41 for <19413@debbugs.gnu.org>; Sat, 20 Dec 2014 04:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=kCkZcuNuHI1KNSTUDDM68a4kyjN+Lx+VBIvbngV5xBs=; b=lwvc7ALkHA+rKNFveV0flll1NevBweqzl8UoAMY4wty/Gozr5jBWEoYU0uoteUdpo8 /n4xGJ98O0zK71nYrRuVUJPLbE0N8qotj5DqCe1S/+UMvK2LLCOXUfOri0elolcQlTbi w6kBrgJ+2gBbPwgpEF7m9MhvYlVEPV/YpmZq3isTqW4y3OJP0Vn8NHaZVsnahACpwME7 erCtRb8nSn7bz92gCU2K6A7nVOqqisHOT9Orq8AqOAP35mMEWPG8oz3HCfIL1tkU0/y4 J0qBXwuF8pPO338RqfrNGBG2WOEqOZNylHPzTZZhobt2Hzb3YOR+NotPH/qonkrYZPCg XMvQ== X-Received: by 10.152.19.7 with SMTP id a7mr12528335lae.16.1419078831320; Sat, 20 Dec 2014 04:33:51 -0800 (PST) Original-Received: from desktop.home.int ([46.211.79.104]) by mx.google.com with ESMTPSA id n6sm3533253laj.16.2014.12.20.04.33.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 04:33:50 -0800 (PST) In-Reply-To: <54954B26.2000200@gmx.at> (martin rudalics's message of "Sat, 20 Dec 2014 11:10:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97602 Archived-At: On 2014-12-20, martin rudalics wrote: >> (setq desktop-saved-frameset [frameset 1 (21652 39439 387790 976000) (de= sktop . "206") "user@desktop.home.int" nil nil (((... (sticky) ... )))]) > > `sticky' is nil here. When in the restored frame you evaluate > > (frame-parameter nil 'sticky) > > what do you get? > When frame sticky (Fvwm decorate it especially) I get "t". For non-sticky I get "nil". I check what file used as desktop save file (two last line from output when= I C-x C-c from Emacs): $ strace -f -eopen emacs --no-site-file 2>&1 | grep -v 'ENOENT\|python' ... [pid 9179] open("/home/user/.emacs.desktop", O_WRONLY|O_CREAT|O_TRUNC|O_= CLOEXEC, 0666) =3D 14 [pid 9179] open("/home/user/.emacs.d/auto-save-list/.saves-9179-desktop.= home.int~", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) =3D 14 With only .emacs: (desktop-save-mode 1) and "emacs --no-site-file" and ~/.emacs.desktop: (setq desktop-saved-frameset [frameset 1 (21653 23984 363080 668000) (deskt= op . "206") "user@desktop.home.int" nil nil ((((font-backend xft x) (font .= "-Misc-Fixed-normal-normal-normal-*-14-*-*-*-c-70-iso10646-1") (font-param= eter . "-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso10646-1") (border-wid= th . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divid= er-width . 0) (vertical-scroll-bars . right) (foreground-color . "black") (= background-color . "white") (mouse-color . "black") (border-color . "black"= ) (screen-gamma) (line-spacing) (left-fringe . 10) (right-fringe . 11) (scr= oll-bar-foreground) (scroll-bar-background . "grey75") (menu-bar-lines . 1)= (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-posi= tion . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (= scroll-bar-width . 16) (alpha) (horizontal-scroll-bars . t) (display-type .= color) (background-mode . light) (cursor-color . "black") (environment) (f= rameset--id . "A948-AB72-D73D-287C") (frameset--mini t . t) (modeline . t) = (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0= ") (explicit-name) (height . 35) (width . 80) (left . 1240) (top . 28)) ((m= in-height . 8) (min-width . 10) (min-height-ignore . 4) (min-width-ignore .= 8) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height . 112) (mi= n-pixel-width . 70) (min-pixel-height-ignore . 56) (min-pixel-width-ignore = . 56) (min-pixel-height-safe . 28) (min-pixel-width-safe . 14)) vc (pixel-w= idth . 597) (pixel-height . 476) (total-width . 85) (total-height . 34) (no= rmal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-wi= dth . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (nor= mal-height . 0.5) (normal-width . 1.0) (buffer "mc.ext" (selected) (hscroll= . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vscroll .= 0) (dedicated) (point . 5457) (start . 5293))) (leaf (last . t) (pixel-wid= th . 597) (pixel-height . 238) (total-width . 85) (total-height . 17) (norm= al-height . 0.5) (normal-width . 1.0) (buffer "*Messages*" (selected . t) (= hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (vs= croll . 0) (dedicated) (point . 284) (start . 1)))))]) I always get normally started Emacs unless I shaded Emacs window. When I cl= ose shaded Emacs ~/.emacs.desktop changed to: (setq desktop-saved-frameset [frameset 1 (21653 24375 351017 568000) (deskt= op . "206") "user@desktop.home.int" nil nil ((((font-backend xft x) (font .= "-Misc-Fixed-normal-normal-normal-*-14-*-*-*-c-70-iso10646-1") (font-param= eter . "-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso10646-1") (border-wid= th . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divid= er-width . 0) (vertical-scroll-bars . right) (foreground-color . "black") (= background-color . "white") (mouse-color . "black") (border-color . "black"= ) (screen-gamma) (line-spacing) (left-fringe . 10) (right-fringe . 11) (scr= oll-bar-foreground) (scroll-bar-background . "grey75") (menu-bar-lines . 1)= (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-posi= tion . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (= scroll-bar-width . 16) (alpha) (horizontal-scroll-bars . t) (display-type .= color) (background-mode . light) (cursor-color . "black") (environment) (f= rameset--id . "A948-AB72-D73D-287C") (frameset--mini t . t) (modeline . t) = (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0= ") (explicit-name) (sticky) (height . 35) (width . 80) (left . 1240) (top .= 28)) ((min-height . 8) (min-width . 10) (min-height-ignore . 4) (min-width= -ignore . 8) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height .= 112) (min-pixel-width . 70) (min-pixel-height-ignore . 56) (min-pixel-widt= h-ignore . 56) (min-pixel-height-safe . 28) (min-pixel-width-safe . 14)) vc= (pixel-width . 597) (pixel-height . 476) (total-width . 85) (total-height = . 34) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf = (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height .= 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "mc.ext" (selected)= (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t nil) (= vscroll . 0) (dedicated) (point . 5457) (start . 5293))) (leaf (last . t) (= pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-height . = 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "*Messages*" (select= ed . t) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t= nil) (vscroll . 0) (dedicated) (point . 284) (start . 1)))))]) You can see difference in "(sticky)" above. New "emacs --no-site-file" open= ed as sticky and when I close Emacs ~/.emacs.desktop changed to: (setq desktop-saved-frameset [frameset 1 (21653 24557 165658 111000) (deskt= op . "206") "user@desktop.home.int" nil nil ((((font-backend xft x) (font .= "-Misc-Fixed-normal-normal-normal-*-14-*-*-*-c-70-iso10646-1") (font-param= eter . "-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso10646-1") (border-wid= th . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divid= er-width . 0) (vertical-scroll-bars . right) (foreground-color . "black") (= background-color . "white") (mouse-color . "black") (border-color . "black"= ) (screen-gamma) (line-spacing) (left-fringe . 10) (right-fringe . 11) (scr= oll-bar-foreground) (scroll-bar-background . "grey75") (menu-bar-lines . 1)= (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-posi= tion . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (= scroll-bar-width . 16) (alpha) (horizontal-scroll-bars . t) (display-type .= color) (background-mode . light) (cursor-color . "black") (environment) (f= rameset--id . "A948-AB72-D73D-287C") (frameset--mini t . t) (modeline . t) = (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0= ") (explicit-name) (sticky . t) (height . 35) (width . 80) (left . 1240) (t= op . 28)) ((min-height . 8) (min-width . 10) (min-height-ignore . 4) (min-w= idth-ignore . 8) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-heig= ht . 112) (min-pixel-width . 70) (min-pixel-height-ignore . 56) (min-pixel-= width-ignore . 56) (min-pixel-height-safe . 28) (min-pixel-width-safe . 14)= ) vc (pixel-width . 597) (pixel-height . 476) (total-width . 85) (total-hei= ght . 34) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (l= eaf (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-heig= ht . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "mc.ext" (selec= ted) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16 3 t ni= l) (vscroll . 0) (dedicated) (point . 5457) (start . 5293))) (leaf (last . = t) (pixel-width . 597) (pixel-height . 238) (total-width . 85) (total-heigh= t . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer "*Messages*" (se= lected . t) (hscroll . 0) (fringes 10 11 nil) (margins nil) (scroll-bars 16= 3 t nil) (vscroll . 0) (dedicated) (point . 284) (start . 1)))))]) You can see difference in "(sticky . t)" above. Next rerun leave ~/.emacs.desktop without changes. As shown strace Emacs load ~/.emacs.d/elpa/* so I rename this dir. Evaluation of "(desktop-save-mode 1)" in "emacs -Q" (not from ~/.emacs) pro= mpt me on exit: Current desktop was not loaded from a file. Overwrite this desktop file?= (yes or no) If leave Emacs with shaded window (pressing X button in titlebar) I get GTK file selection dialogs about .emacs.desktop file. After leaving "(sticky)" seen in ~/.emacs.desktop. I check value of: after-init-hook is a variable defined in `startup.el'. Its value is (#[0 "..." [command-line-args desktop-save-mode desktop-restore-frames initial-= window-system inhibit-startup-screen "--no-desktop" delete 0 daemonp deskto= p-read t] 4 "\n\n(fn)"] x-wm-set-size-hint) and if load "emacs -Q" and then evaluate (desktop-read) with "(sticky)" in ~/.emacs.desktop I get sticky Emacs window. So there are two problems: 1) Emacs instead saving shaded window attribute add "(sticky)" to ~/.emacs= .desktop 2) (desktop-read) wrongly apply (sticky), and (sticky . t) and (sticky . n= il) - as always sticky. I check /src/xterm.h: /* Atoms dealing with EWMH (i.e. _NET_...) */ Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen, Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert, Xatom_net_wm_state_sticky, Xatom_net_wm_state_hidden, Xatom_net_frame_extents, Xatom_net_current_desktop, Xatom_net_workarea; There are no _NET_WM_STATE_SHADED that defined in: http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317598= 336 _NET_WM_STATE which say: Possible atoms are: _NET_WM_STATE_MODAL, ATOM _NET_WM_STATE_STICKY, ATOM _NET_WM_STATE_MAXIMIZED_VERT, ATOM _NET_WM_STATE_MAXIMIZED_HORZ, ATOM _NET_WM_STATE_SHADED, ATOM _NET_WM_STATE_SKIP_TASKBAR, ATOM _NET_WM_STATE_SKIP_PAGER, ATOM _NET_WM_STATE_HIDDEN, ATOM _NET_WM_STATE_FULLSCREEN, ATOM _NET_WM_STATE_ABOVE, ATOM _NET_WM_STATE_BELOW, ATOM _NET_WM_STATE_DEMANDS_ATTENTION, ATOM --=20 Best regards!