From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: save-excursion not working for python-shell-send-buffer Date: Wed, 15 Feb 2023 15:24:15 +0200 Message-ID: <83wn4jawow.fsf@gnu.org> References: <875yc3zd2t.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14390"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 14:25:06 2023 Return-path: Envelope-to: geh-help-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 1pSHmT-0003WX-JL for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 14:25:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSHm0-0000Kn-JF; Wed, 15 Feb 2023 08:24:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSHly-0000Aa-IL for help-gnu-emacs@gnu.org; Wed, 15 Feb 2023 08:24:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSHly-0005hR-8h for help-gnu-emacs@gnu.org; Wed, 15 Feb 2023 08:24:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=H7dGzjeZVK5SIjaxCTvrY+gfDFX7GeuITe+2FsOLErE=; b=pkf5r+Wbf3jv TNyWNtoWYKDYseF0p7bvII36ywS9uwvui99gct4bSZT3NNxE4zM/rbJ/6oty0ynJUsFVfv6Nlk6to xavX7ot8frie7mqmRE1RGY5H3JgTLqEf+AOXqR0CNdlpxqpt82HtJW6JlyBP0BWY2RhoDSW233KbZ ABrRH/Fu3a3CYVlkqrZ/2ddMVy766J+xhjqyCTTdh1UgCZGxVv8WnSPJoZ8Jl78DdXHzj549QBVZC jX046E2y2T6k9imr2uSJsq8/qLgEsRSZOjeh5ri9qqb81mgjq6DzoiJS27+4qo0WGMdQ9GVNcsQnC j5Qd2XCmV63yauY7+c6Aww==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSHlx-0003Sc-NH for help-gnu-emacs@gnu.org; Wed, 15 Feb 2023 08:24:34 -0500 In-Reply-To: <875yc3zd2t.fsf@gmail.com> (message from Chen Zhaoyang on Tue, 14 Feb 2023 23:56:26 -0600) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142756 Archived-At: > From: Chen Zhaoyang > Date: Tue, 14 Feb 2023 23:56:26 -0600 > > After executing (python-shell-send-buffer) my point does not return to > the mark but the beginning of the buffer. I am able to reproduce this > behavior on "emacs -Q" (my emacs is "GNU Emacs 30.0.50 (build 11, > x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of > 2023-02-14"). I wrote a wrapper function like this > > (defun site/python-shell-send-buffer () > (interactive) > (save-excursion > (python-shell-send-buffer nil))) > > which works as desired (??). Please see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61463 it could be the same issue. If it is, you will find a patch there.