From unknown Sun Sep 14 00:11:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible Resent-From: Samuel =?UTF-8?Q?L=C3=AA?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2016 02:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23749@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146569690428858 (code B ref -1); Sun, 12 Jun 2016 02:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2016 02:01:44 +0000 Received: from localhost ([127.0.0.1]:37518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBuid-0007VN-QT for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBuib-0007VB-Dx for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBuiV-0003xC-0C for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiU-0003x5-T1 for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiR-000213-FH for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBuiQ-0003wZ-80 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:31 -0400 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:36715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiQ-0003wV-21 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:30 -0400 Received: by mail-oi0-x229.google.com with SMTP id p204so163793878oih.3 for ; Sat, 11 Jun 2016 19:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=5kbln043xLBwuHrB4hapLSda4spx79RblsCIvNhKQc4=; b=bCUMM5q5LNHv/VEnRAPTz8FYqkfkY5xhmPLtcWkERhTFevDLLEXrILEKFAlGeib0Q+ xiFjndYFYikNhbpM66c/xLfhZwoVBsiTHWDZCqb5Xc/qgTyWdifMspqVIXeYjxT0EFSv 98SCTAjKqrbDs74zV86WLZh9fD2H8+Ui307FsX8fzKpFCH9bel/B25kaPNzqqo8aErLY zlMuKGI36NCu7nFmfKo3l+kZuJJEVAxUNo8MawRx/g2FRB+m6kf+GYbStWES4UjPkOZm M68eDAQXkpxLn1qzPOgL8KsKvfQuhPMDzDyxCxfwAjDARKOQKLArwZSJ3ufp0LH6Rm48 4UCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5kbln043xLBwuHrB4hapLSda4spx79RblsCIvNhKQc4=; b=TaNggYwTWANOoi1CNAs7Boq02yxgVjYfAZLXx8h1WyFG24n/dKYKIr/+m0v0XAjE4n qEqqFaP7etI4Y6aLcnOTyk0WVw34VsIz70MOgMBiiHukVz1NJXr2Peof+KYLICEdjfBE DaaCttIxsPdf7vuphiIRZhea9qYHjNE2HjMjY8htsIfMOsJlo85flIfsjd0BX1JpL5Mn M8mnJa4y//XdCGuKIoo5vP0GrnB38FPzgra9H9flMMKhwL82SHxd0ngs7ZJq/Y7bprhK bwBVTHeALyrZq9zCc2UNiyGJ6F1R0QIdQ5+WdTS4lYK7DAOuACPzTaVAf1tdSx0Xwlyg gbqQ== X-Gm-Message-State: ALyK8tKc8vCesmA15+VO7GFZTlMmnGZuvZhFqWxgexZPRgRkQHGrOlD7mkt4IS9Gs3LRh7fOVubHHmflsdN5YA== X-Received: by 10.157.60.42 with SMTP id q39mr4913899otc.189.1465696889097; Sat, 11 Jun 2016 19:01:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.111.197 with HTTP; Sat, 11 Jun 2016 19:01:28 -0700 (PDT) From: Samuel =?UTF-8?Q?L=C3=AA?= Date: Sun, 12 Jun 2016 04:01:28 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (---) - run "emacs -Q" from command line. - split emacs screen (C-x 2) - on one side open an elisp code (say test.el) - on the other side put the *scratch* buffer - in test.el, enter (with-current-buffer "*scratch* (insert "test\n") (goto-char (point-max))) - then press C-x e to evaluate that command - it inserts "test" in *scratch* buffer but doesnt go at the end of the - buffer. It works fine when buffer *scratch* is not visible. Thanks! In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2013-08-17 on debianSam Windowing system distributor `The X.Org Foundation', version 11.0.11604000 System Description: Debian GNU/Linux 8.4 (jessie) Configured using: `configure --prefix=/opt/emacs24' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x b C-x 2 C-x C-f t e s t . t e s t . e l ( w i t h - c u r r e n t - b u f f e r SPC " * s c r a t c h * " SPC ( i n s e r t SPC " t e s t \ n " ) SPC ( g o t o - c h a t SPC ( p o i n t m - m a x ) ) ) C-x C-e C-x k C-k C-x o r C-e C-x C-e M-x r e p o r t M-/ - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. (New file) Entering debugger... Mark set [2 times] 198 Auto-saving... Scanning for dabbrevs...done user-error: No dynamic expansion for `report' found Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dabbrev help-mode easymenu debug time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Sun Sep 14 00:11:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible Resent-From: John Mastro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2016 02:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23749@debbugs.gnu.org Cc: Samuel =?UTF-8?Q?L=C3=AA?= Received: via spool by 23749-submit@debbugs.gnu.org id=B23749.146569827630908 (code B ref 23749); Sun, 12 Jun 2016 02:25:02 +0000 Received: (at 23749) by debbugs.gnu.org; 12 Jun 2016 02:24:36 +0000 Received: from localhost ([127.0.0.1]:37532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBv4m-00082S-2y for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:24:36 -0400 Received: from mail-yw0-f170.google.com ([209.85.161.170]:34012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBv4k-00082C-85 for 23749@debbugs.gnu.org; Sat, 11 Jun 2016 22:24:34 -0400 Received: by mail-yw0-f170.google.com with SMTP id c72so99349448ywb.1 for <23749@debbugs.gnu.org>; Sat, 11 Jun 2016 19:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=D5S4SNqD8KnG0PIVZ5503t9IHOH5mCvTtZZrqlZncys=; b=UZ+t/4QfJN5GP2v2cIDa1lJScIXXJJET0n1DTfUCYIPWwuik8KeecfGICjw2eUpssu aM9XRFmTJcNbBAU5AZWmWWoYlQWQMMNlILmpB7k/ZrymxmYU13QI0J3BV5X/yVom/2p9 ofN/sGn3vj0NPii8t+J5WJMvVv9bwyz0yZFZZEDCYY7ti5Ze1vVUEAdTq0Inurr7PzZE MycOMWaR1H0dh+6tvTlCVeCP3Hyuc1LoTdlZBNiVsZdxRo+lLLDoE7AGPr7+vFozFWdn WR8HDvB9Y+Q6S6sr58uh6waRyFpaLjaDUSWGMEQQg9ufnLYuf/3cUmPohZFabUvwMNn7 E/NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D5S4SNqD8KnG0PIVZ5503t9IHOH5mCvTtZZrqlZncys=; b=ImAwIOz6du3ML8mkWR56tLtIgQqjb+6PFQhyclxPKLxwaqDEFNQEY9HTFE7T2L1m3N 7Zt4+uNpsWqKAz9w7hQvsOyclgLd0DiwGTS8PsI+b3EsUXI1/0D+ZTEUwnR9ftV0Fi3Q vt/QBWvqr4BfScbkJ1bSGNSuZp6T6aHHul69kSvK0KW891HW4u9cNt1RTODc9kfj5BpO zixZHjZXsO7uiribeaDLeR6ElNvqj4bq902nSFg3PWR8tHfEDB1Rmj7ItOWGGftYiGjH NTbihkahusuOi7yEg/9IISObE5xfVoH2FV15ExoacO6aLf7rb3FdBxKT4j2nC55UCz4Y SDBg== X-Gm-Message-State: ALyK8tIXc1Ug9Nbws1sLeujSBfMfoogOgbeUmiTcaF1D0FZxD+8iqFaYG9yJxwP3RY9cGJ/DU3Rk36PTDsw9UA== X-Received: by 10.13.230.87 with SMTP id p84mr4812666ywe.125.1465698268814; Sat, 11 Jun 2016 19:24:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.98.136 with HTTP; Sat, 11 Jun 2016 19:24:09 -0700 (PDT) In-Reply-To: References: From: John Mastro Date: Sat, 11 Jun 2016 19:24:09 -0700 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (/) Samuel L=C3=AA wrote: > - run "emacs -Q" from command line. > - split emacs screen (C-x 2) > - on one side open an elisp code (say test.el) > - on the other side put the *scratch* buffer > - in test.el, enter (with-current-buffer "*scratch* (insert "test\n") > (goto-char (point-max))) > - then press C-x e to evaluate that command > - it inserts "test" in *scratch* buffer but doesnt go at the end of the > - buffer. > > It works fine when buffer *scratch* is not visible. I confirmed that the behavior is the same in Emacs 25.0.94, but I suspect this is not a bug because there's also a concept of "window point" (see `window-point'). Adding `with-selected-window' will cause point to move as you expected: (with-current-buffer "*scratch*" (with-selected-window (get-buffer-window (current-buffer)) (insert "test\n") (goto-char (point-max)))) However, if the buffer isn't shown in a window, `get-buffer-window' will return nil and `with-selected-window' will thus signal an error. So the right fix really depends on the context and ultimate goal. John From unknown Sun Sep 14 00:11:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2016 02:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Samuel =?UTF-8?Q?L=C3=AA?= Cc: 23749@debbugs.gnu.org Received: via spool by 23749-submit@debbugs.gnu.org id=B23749.146569832431006 (code B ref 23749); Sun, 12 Jun 2016 02:26:01 +0000 Received: (at 23749) by debbugs.gnu.org; 12 Jun 2016 02:25:24 +0000 Received: from localhost ([127.0.0.1]:37537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBv5Y-000841-Cp for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:25:24 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:35693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBv5X-00083i-8t for 23749@debbugs.gnu.org; Sat, 11 Jun 2016 22:25:23 -0400 Received: by mail-oi0-f44.google.com with SMTP id w5so85183477oib.2 for <23749@debbugs.gnu.org>; Sat, 11 Jun 2016 19:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=p7LQYBzKzO47qSsCRRd0rdd+7/HCVyqyuezf62+teZo=; b=lqbc8xH2DGhUJe6IyUojjt0uvP+DnfQzslGP0FMiE8djGztm9gcGnOJHM9+Cx9H7c4 Dj24eKKCfFgpMQue7tyCnET77Sk5XNWvm9aRi740aeYEoqSw5b53sV72Ds6QBL6GtCM6 /86rXdwmkfqRCw4Uu5lwvZU+9IxbEa5n1lNHNA1WUCHtD3xJVwR6RaQJ2I/q7NcUkWLd u2iIErzQpRywcj0rCYHxWUu+BwiKmD11BPelQV9bSLQ3tpNe0XuZRtoK6afAJgumrPNC xMuLfIev4OG50ow4dHfbHOYIoPadESej64Sk9+9r/oIbC5Fl2sZSxW8cWpwmR5U/FeLR 6Yzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=p7LQYBzKzO47qSsCRRd0rdd+7/HCVyqyuezf62+teZo=; b=lcX6iTfJeVl4WCr391Ah/2KAy9mW3xVuIDDnYANpmRXZ0V8kiRgXGRnwETy3vNgPpr yIMu5fsyORsP/rA4t0kdOFtxoA85A1n+eQclU4Mss8EpcQ3Q9lK5GIkgipfEJ8g94xi7 LuymKB71twa0/x1CEki5OENLJe85dtgd/pwcfYfYtfC3txg3eSuG2//NC29Vz4iZH5xf BdyJ/vFvRgHkUVsHhjpLGu6yqyvxF3ZCo7czaVjFZhVJsyVD6JYMAOzBbFdQ744YVG2q Z9tlZhg5YibcDYTdoiDUEvoLInjs9HGgrLSs3jCUlR+jZ0RlqDyeImW3Nj4gm43xS+jG /n7A== X-Gm-Message-State: ALyK8tLwNrTG/t04DS2yq56JY9GaQ0mLRtmpREdyoKJhsCEKEokiikeuTkM9K9aj7bVqZxW4sT1kS98jXonX+Q== X-Received: by 10.202.80.195 with SMTP id e186mr3795551oib.35.1465698317634; Sat, 11 Jun 2016 19:25:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.5.168 with HTTP; Sat, 11 Jun 2016 19:25:17 -0700 (PDT) In-Reply-To: References: From: Noam Postavsky Date: Sat, 11 Jun 2016 22:25:17 -0400 X-Google-Sender-Auth: C-FCYgkTg07KX0yRxCtZSC747Cg Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) tag 23749 + notabug quit On Sat, Jun 11, 2016 at 10:01 PM, Samuel L=C3=AA wrot= e: > - run "emacs -Q" from command line. > - split emacs screen (C-x 2) > - on one side open an elisp code (say test.el) > - on the other side put the *scratch* buffer > - in test.el, enter (with-current-buffer "*scratch* (insert "test\n") > (goto-char (point-max))) > - then press C-x e to evaluate that command > - it inserts "test" in *scratch* buffer but doesnt go at the end of the > - buffer. > > It works fine when buffer *scratch* is not visible. > > Thanks! > > In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) I see the same with 25.0.95. I think it's not a bug, it's simply that the window point is stored separately. You can use (with-current-buffer "*scratch*" (insert "test\n") (set-window-point (get-buffer-window) (point-max))) to set it. Or if there are multiple windows and you want to set the point in all of them: (with-current-buffer "*scratch*" (insert "test\n") (dolist (w (get-buffer-window-list)) (set-window-point w (point-max)))) From unknown Sun Sep 14 00:11:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible Resent-From: Samuel =?UTF-8?Q?L=C3=AA?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2016 15:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Noam Postavsky Cc: 23749@debbugs.gnu.org Received: via spool by 23749-submit@debbugs.gnu.org id=B23749.146574627619459 (code B ref 23749); Sun, 12 Jun 2016 15:45:01 +0000 Received: (at 23749) by debbugs.gnu.org; 12 Jun 2016 15:44:36 +0000 Received: from localhost ([127.0.0.1]:38088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC7Yx-00053n-OL for submit@debbugs.gnu.org; Sun, 12 Jun 2016 11:44:35 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:36603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC7Yv-00053Z-CA for 23749@debbugs.gnu.org; Sun, 12 Jun 2016 11:44:33 -0400 Received: by mail-oi0-f44.google.com with SMTP id p204so176598559oih.3 for <23749@debbugs.gnu.org>; Sun, 12 Jun 2016 08:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UqzA2v2fwB9kCPC3F15+cDQiaNn9qEsPFvIyK49IkSs=; b=fnLgIPYqHTlUu9EKMxN5ZN/+zfIAiQNU7JrH8mWgeX74B/3ds8hSLtU79P0E9l7pPj 0AvnklXjOt2mSAc3KXi2pc+xCdETc6R58SuPgWFyaHsGsnBR4hhS6hQz8GOXBiS5BNik aaURuvMsULbXOkEhsS5xYeJQVtlQk9q4yRLxe+BoSotMcrwmKWT6oCuKcK7QMg9C4ns9 gnxz7bJv9Aus2hnVLK6kimAtqfyY8gKKKgZDiqw3Js9flyTBoifOp8l0+G4WsrB9UKs7 qptrxAMWHdZPhdVpncGGx2huJGjuubeBxw4gBB0J/lLVHe8ev9Ql5rbnKTm3MgHcg1zJ RRHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UqzA2v2fwB9kCPC3F15+cDQiaNn9qEsPFvIyK49IkSs=; b=BXRfYTk0V9qDXeIZkXc48taQyM5ajl/7q4UZD+Qi8Omd9YBYppuNs22yMr7oM4Gryd EKibPwk9jxi9hydlKVgIAUwy0x3+h0iQdkY5z6pNNjiIg+1XKws42YULAX54u8lveudY 3BB9G5HALQx+gJ6BVtRMcG5YCntGfZragNCTYjl5ZsAysXrKaRQYvJhB4Tez9wxbD9lh Yb0HKP9kGOygi5qgDiLAVqghnV2Vx5fTGdmi/sKud2yeDSVckk3gQ4siKqmVFWOMUqZg I9byfhvCCI5SNKRWqIsA1dpBSLp3b/Poinl0ePDm1oxxSPXe3cGut8M6kVNBa8DZ3FmL XTpw== X-Gm-Message-State: ALyK8tJVQYsEGU9PKpSKxr5Up96Tswdv1I77uYd61wks5f7fM37lyUOFcmoecnHfWejuAuvz9KFAZNfs9mU3Vg== X-Received: by 10.157.27.100 with SMTP id l91mr5646103otl.73.1465746267473; Sun, 12 Jun 2016 08:44:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.111.197 with HTTP; Sun, 12 Jun 2016 08:44:26 -0700 (PDT) In-Reply-To: References: From: Samuel =?UTF-8?Q?L=C3=AA?= Date: Sun, 12 Jun 2016 17:44:26 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.7 (/) I managed to do what I wanted with: (defun insert-into-buffer (buffer text) (let ((buffer-window (get-buffer-window buffer))) (if (not buffer-window) (with-current-buffer buffer (beginning-of-line) (insert text) (goto-char (point-max))) (with-current-buffer buffer (beginning-of-line) (insert text) (set-window-point (get-buffer-window) (point-max)))))) Thanks! On 6/12/16, Noam Postavsky wrote: > tag 23749 + notabug > quit > > On Sat, Jun 11, 2016 at 10:01 PM, Samuel L=C3=AA wr= ote: >> - run "emacs -Q" from command line. >> - split emacs screen (C-x 2) >> - on one side open an elisp code (say test.el) >> - on the other side put the *scratch* buffer >> - in test.el, enter (with-current-buffer "*scratch* (insert "test\n") >> (goto-char (point-max))) >> - then press C-x e to evaluate that command >> - it inserts "test" in *scratch* buffer but doesnt go at the end of the >> - buffer. >> >> It works fine when buffer *scratch* is not visible. >> >> Thanks! >> >> In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) > > I see the same with 25.0.95. I think it's not a bug, it's simply that > the window point is stored separately. You can use > > (with-current-buffer "*scratch*" > (insert "test\n") > (set-window-point (get-buffer-window) (point-max))) > > to set it. Or if there are multiple windows and you want to set the > point in all of them: > > (with-current-buffer "*scratch*" > (insert "test\n") > (dolist (w (get-buffer-window-list)) > (set-window-point w (point-max)))) > From unknown Sun Sep 14 00:11:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Samuel =?UTF-8?Q?L=C3=AA?= Subject: bug#23749: closed (Re: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible) Message-ID: References: X-Gnu-PR-Message: they-closed 23749 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 23749@debbugs.gnu.org Date: Sun, 12 Jun 2016 15:52:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1465746722-20100-1" This is a multi-part message in MIME format... ------------=_1465746722-20100-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #23749: 24.3.50; can't make the cursor to the end of a buffer when that buf= fer is visible which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 23749@debbugs.gnu.org. --=20 23749: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23749 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1465746722-20100-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 23749-done) by debbugs.gnu.org; 12 Jun 2016 15:51:38 +0000 Received: from localhost ([127.0.0.1]:38092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC7fm-0005De-IU for submit@debbugs.gnu.org; Sun, 12 Jun 2016 11:51:38 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC7fl-0005DR-EV for 23749-done@debbugs.gnu.org; Sun, 12 Jun 2016 11:51:37 -0400 Received: by mail-oi0-f67.google.com with SMTP id u201so6228171oie.2 for <23749-done@debbugs.gnu.org>; Sun, 12 Jun 2016 08:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=to3vvjH5nbuW3jd+w0S/MQCihQg8aoOlElJfgZz0OH8=; b=DWoLxmlVJgTps9taOxpMtNiKIOHpq53rSiXBEoyY5UrVXB9zFpTTVUrJZ6OJ2F8hZR abGCVXJIV7a//wsM4vSglEffixCjREAxcAFpNVL81Zafiu1qQfV5Utn8fNhDHmCbyttL yEKwVFSuM15PNgmgLeuyVrxsVib8JWIbAcwZpgo0kF3AhRBfUUPsdzMU0+I+WbPKocEu /fW3a2YcX870ZzEUYsDMLQFVCYaQQicA62lVSxsYRV36Hc/x0L2bzc8J7AdAiVzUxtQo iuBxrZ2nqSPq9RQgkrA5HrHf8R9wCFZyE2APqtflxZ5W2V2FiWYALuFiXvsM3S2TD04h 8mNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=to3vvjH5nbuW3jd+w0S/MQCihQg8aoOlElJfgZz0OH8=; b=juAxN+bNsI5n/cIIp8xQVcdMJNe6rZZm8DPtLBgMHAgUtruvp18CbaFpPzWrMVPkBu K7JPYtiJSgJRrlQGDvTSA9CsMqzVdtLLcyZAWirxDxn4XaQ0AZ6FzEP7b9BJCjoSg6wA qEYZWhBECsvPv5AmEotqVbGctMYWaA1rSHm9KUiTw4tz+2eX804bqBxBKqOE0OUEbokW ek+xaUNQN+T7xnc2Tjei6kzQsMR5ZkzlzDWtGS9Cgr0RFWZZtjyDy7LqlSNZeb+9WzvN C0Ip7/v9CKHs9NP8RbNIev7Um+PUtFXixaFtsOLOhZ85ARxmQmUrflbmGdT2EWX7bcre MeeA== X-Gm-Message-State: ALyK8tIjKqkS9S1I1IxFAMRS7YdVtM7klCwtriX2vfdDT0PB6lDyVIme18lnLKOo8apJ2uyHUtRifxH6mezZfw== X-Received: by 10.202.168.131 with SMTP id r125mr5592532oie.40.1465746691969; Sun, 12 Jun 2016 08:51:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.5.168 with HTTP; Sun, 12 Jun 2016 08:51:31 -0700 (PDT) In-Reply-To: References: From: Noam Postavsky Date: Sun, 12 Jun 2016 11:51:31 -0400 X-Google-Sender-Auth: boVGS4TY6W9rpQjupAZq8wqyxuk Message-ID: Subject: Re: bug#23749: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible To: =?UTF-8?Q?Samuel_L=C3=AA?= Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23749-done Cc: 23749-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.5 (/) Cool, could be compacted a little: (defun insert-into-buffer (buffer text) (with-current-buffer buffer (beginning-of-line) (insert text) (let ((buffer-window (get-buffer-window))) (if buffer-window (set-window-point buffer-window (point-max)) (goto-char (point-max)))))) ------------=_1465746722-20100-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Jun 2016 02:01:44 +0000 Received: from localhost ([127.0.0.1]:37518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBuid-0007VN-QT for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBuib-0007VB-Dx for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBuiV-0003xC-0C for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiU-0003x5-T1 for submit@debbugs.gnu.org; Sat, 11 Jun 2016 22:01:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiR-000213-FH for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBuiQ-0003wZ-80 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:31 -0400 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:36715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBuiQ-0003wV-21 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2016 22:01:30 -0400 Received: by mail-oi0-x229.google.com with SMTP id p204so163793878oih.3 for ; Sat, 11 Jun 2016 19:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=5kbln043xLBwuHrB4hapLSda4spx79RblsCIvNhKQc4=; b=bCUMM5q5LNHv/VEnRAPTz8FYqkfkY5xhmPLtcWkERhTFevDLLEXrILEKFAlGeib0Q+ xiFjndYFYikNhbpM66c/xLfhZwoVBsiTHWDZCqb5Xc/qgTyWdifMspqVIXeYjxT0EFSv 98SCTAjKqrbDs74zV86WLZh9fD2H8+Ui307FsX8fzKpFCH9bel/B25kaPNzqqo8aErLY zlMuKGI36NCu7nFmfKo3l+kZuJJEVAxUNo8MawRx/g2FRB+m6kf+GYbStWES4UjPkOZm M68eDAQXkpxLn1qzPOgL8KsKvfQuhPMDzDyxCxfwAjDARKOQKLArwZSJ3ufp0LH6Rm48 4UCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5kbln043xLBwuHrB4hapLSda4spx79RblsCIvNhKQc4=; b=TaNggYwTWANOoi1CNAs7Boq02yxgVjYfAZLXx8h1WyFG24n/dKYKIr/+m0v0XAjE4n qEqqFaP7etI4Y6aLcnOTyk0WVw34VsIz70MOgMBiiHukVz1NJXr2Peof+KYLICEdjfBE DaaCttIxsPdf7vuphiIRZhea9qYHjNE2HjMjY8htsIfMOsJlo85flIfsjd0BX1JpL5Mn M8mnJa4y//XdCGuKIoo5vP0GrnB38FPzgra9H9flMMKhwL82SHxd0ngs7ZJq/Y7bprhK bwBVTHeALyrZq9zCc2UNiyGJ6F1R0QIdQ5+WdTS4lYK7DAOuACPzTaVAf1tdSx0Xwlyg gbqQ== X-Gm-Message-State: ALyK8tKc8vCesmA15+VO7GFZTlMmnGZuvZhFqWxgexZPRgRkQHGrOlD7mkt4IS9Gs3LRh7fOVubHHmflsdN5YA== X-Received: by 10.157.60.42 with SMTP id q39mr4913899otc.189.1465696889097; Sat, 11 Jun 2016 19:01:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.111.197 with HTTP; Sat, 11 Jun 2016 19:01:28 -0700 (PDT) From: =?UTF-8?Q?Samuel_L=C3=AA?= Date: Sun, 12 Jun 2016 04:01:28 +0200 Message-ID: Subject: 24.3.50; can't make the cursor to the end of a buffer when that buffer is visible To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (---) - run "emacs -Q" from command line. - split emacs screen (C-x 2) - on one side open an elisp code (say test.el) - on the other side put the *scratch* buffer - in test.el, enter (with-current-buffer "*scratch* (insert "test\n") (goto-char (point-max))) - then press C-x e to evaluate that command - it inserts "test" in *scratch* buffer but doesnt go at the end of the - buffer. It works fine when buffer *scratch* is not visible. Thanks! In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2013-08-17 on debianSam Windowing system distributor `The X.Org Foundation', version 11.0.11604000 System Description: Debian GNU/Linux 8.4 (jessie) Configured using: `configure --prefix=/opt/emacs24' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x b C-x 2 C-x C-f t e s t . t e s t . e l ( w i t h - c u r r e n t - b u f f e r SPC " * s c r a t c h * " SPC ( i n s e r t SPC " t e s t \ n " ) SPC ( g o t o - c h a t SPC ( p o i n t m - m a x ) ) ) C-x C-e C-x k C-k C-x o r C-e C-x C-e M-x r e p o r t M-/ - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. (New file) Entering debugger... Mark set [2 times] 198 Auto-saving... Scanning for dabbrevs...done user-error: No dynamic expansion for `report' found Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dabbrev help-mode easymenu debug time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) ------------=_1465746722-20100-1--