From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56457: 29.0.50; set-frame-width and frame-width are not exactly complimentary Date: Sat, 09 Jul 2022 12:56:44 +0800 Message-ID: <87ilo63mur.fsf@yahoo.com> References: <87bktzvua9.fsf@codeisgreat.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1552"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 56457@debbugs.gnu.org To: Pankaj Jangid Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 09 06:59:07 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oA2Yc-00008U-0r for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 06:59:06 +0200 Original-Received: from localhost ([::1]:33610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oA2YZ-0002yn-Lr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 00:59:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oA2Xa-0002Xh-Oa for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 00:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oA2Xa-0003qP-Ei for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 00:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oA2Xa-0000Sj-Ea for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 00:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2022 04:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56457 X-GNU-PR-Package: emacs Original-Received: via spool by 56457-submit@debbugs.gnu.org id=B56457.16573426231699 (code B ref 56457); Sat, 09 Jul 2022 04:58:02 +0000 Original-Received: (at 56457) by debbugs.gnu.org; 9 Jul 2022 04:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oA2Wd-0000RL-MF for submit@debbugs.gnu.org; Sat, 09 Jul 2022 00:57:03 -0400 Original-Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]:37683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oA2Wb-0000Qo-O8 for 56457@debbugs.gnu.org; Sat, 09 Jul 2022 00:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657342615; bh=e5WKaZ7wSQ7mFTDV7PsiTba/m9hEtZPbtcon/bo+VCE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=fX+CHntaonPOKx1I/plinSnifWOLbgGFrUa1gvDZoqTRQ5kNgJlcyHSigX8VzZ7AeFVSJy8njzH1EG4omgBCw33uQrjMGPyWUqcnsj7cbVYEjRV//FsQq1CH5+/og5IQ3RSy3y3wHVuxO+NURpAgvxGJCFvKvVOH6CB9oKEWpFoE0xWh+0EFlXXA6OV0/y43yNkcgLKQWU+v9U1Yp081ziCQvDOPhVLPQVraTmTqsKW+TRhopUSpyffcnM31+M1dGjv+fYZjIlYAa06o99/M29l6KqgrCytLTiJidTaVbnuvSTh+VyCcFnTdRMxyGO6RsfYpqRmrCmp54pSdTNG4/A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657342615; bh=yH2l+JFAtEyzX3ZcjjL0AdwRV79yp4ccNsGmvMZcfKt=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=soAvKBTBTuKyMLHaTrXZu5x7f22p4S1xLebexqWQq1r+WvOxVC0JQ24GUZI/8vgocVhjK6vMNJUamjWe1+6+g9ADCNaNTBbF92kPPkTmS/zOrxyaUWsr9vKgAzmG95CnVFcXwhy4kS1stzUCgQeibXKF6uxulHWU8KIM/r9IWL7iJo1o5EcO/vLxFdEyWvw+fKqQTy6Xs0zNhXLyS1K5laqJPhIMLxqSqLfPi0A39G+ATKitsurf/oYfQwGKc98jwAkmbG9jj5hBiP4JTPF7NEtuAsIx3ME9MvfgDd+vcnG5DWWcON+xyGXniXoEhoDhD8LPI1gt9bT0v6MK5DZycA== X-YMail-OSG: qRMdOxQVM1mr2qhiIRrR38k6k9.bhx3344f4tpplE2gPEZkVXLwaTlX0wIU9mjH ubhNIxSUEBKxBMm1A4jrGscNvi1474hB09YafUzNGsSfjcIG3lMgqPYXR3ErR1MoGL25_0dKXVf_ 36.onx8kaOmDsLsoevygAuIhVjcZiF7FtshGA6dQKKBYQaA8wTK_mnVfz7RWfXuibpQcLfbvZbu8 oibiZwsVYVIhEpWbdfFDpma2tXUrwPT2ssKQ9QZnNiQRZUedJaWFHeiFglUZAImNFuen7_NqKrko Wkgz8XHSz3mPn212rtr1PpqxcqHnqpcI2O5eW5.bmw39IDDSKdYrjB5Ps2HnkjUJq_o4xYmbr_J7 QhjyNKUzccsQUFXSlaIlPXawskOWF2Fmf2j1NlY3Q_pBCq6xWYVEYgLUid5K4ilHU10d9u6alFFi W8zJ85su3RESCOEoowRahYZix4RSo19pFVXjUf4c487b4NkcXhiJNjkoSC9jq85DcSAqeHwTkAfw V7IdoZBsQSdcnW9s30AZ03BVOfX6hFjgzekzWTSyo_1faDpoZZchz2OUp21gNUpH9uPcKSBSolNs 4UihYSsVJ2ZOXmjw0FWoU1H.9oULk9gpiqYpmqWirvzyQCrN3I94UAYO6yV0ckAhI9xLlavV5uzL 7GKmUXmk6cvG03zL7plPBnI41lba7ERuYDhmw0fT65yDBazVEm_mqgGE5bGakO4HZKUPLF.uYvQX txCtsTQXVx_ZVKMISsntLI.z0bwrStY2fyWu_ur0xB45lz7uuhfeZcyv0k7IfqBp5nCS7kBBq5LY CAPq6CmwlMKgjOZmxJEaF3Ty8Jq_dT4_MaTtNAdBKu X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sat, 9 Jul 2022 04:56:55 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-wpvcf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 37ae91619574ad33f148ca3b810b5046; Sat, 09 Jul 2022 04:56:49 +0000 (UTC) In-Reply-To: <87bktzvua9.fsf@codeisgreat.org> (Pankaj Jangid's message of "Sat, 09 Jul 2022 08:58:46 +0530") X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236474 Archived-At: Pankaj Jangid writes: > I have written a small lisp function to toggle width of frame to twice > and half. This is not behaving as desired. Here is my lisp. > > (defun my/toggle-frame-width () > "Toggle \"frame-width\"." > (interactive) > > (let ((width (frame-width))) > (if (and (> width 75) (< width 85)) > (set-frame-width nil (* width 2)) > (set-frame-width nil (/ width 2)) > (message "Frame size: %sx%s" (frame-width) (frame-height))))) > (global-set-key (kbd "") 'my/toggle-frame-width) > > Steps: > 1. emacs -Q > 2. Evaluate above lisp. (WARN) This binds also. > 3. Pres a couple of times > > Result: > After a couple of iterations. The frame-width is getting smaller and > smaller. > > Desired behaviour: > It should only toggle the width to double and half alternately. What happens if you set `frame-resize-pixelwise' to nil, and create a new frame?