From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: excalamus--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Comments within Org src block move point unexpectedly Date: Sat, 10 Apr 2021 22:31:07 +0200 (CEST) Message-ID: References: Reply-To: excalamus@tutanota.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2228"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 10 22:31:36 2021 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 1lVKGW-0000UV-FE for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 10 Apr 2021 22:31:36 +0200 Original-Received: from localhost ([::1]:36474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVKGV-0003Mj-D6 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 10 Apr 2021 16:31:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVKG8-0003MM-Qr for help-gnu-emacs@gnu.org; Sat, 10 Apr 2021 16:31:12 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:40016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVKG6-0005Xa-VO for help-gnu-emacs@gnu.org; Sat, 10 Apr 2021 16:31:12 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 36C7AFBF541; Sat, 10 Apr 2021 20:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1618086667; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=nd3Hf4a1fRAMuaeoXcX4TTZKCsxd7gZgahiU1OPTQas=; b=0kME9YoV7ySgbnD/V3AuiHuI8+5/GAFJAWHBp/BNR83kV1Np1bi0lLsXPkY/5kQC 6r9b/9BhhwVAka18rAnwb1yed58YP1hTUgN1EQYpGST0ShFYwqqEVTOPq+YoSgj2cwc 4RW10EGU/BnUvhvoUjngsoety1dzTKRgpNEme6qyd//ML9XDeAmiFeBQZHlVOYkv1KP j1mkLnJ8SVHmQ5VhAWqHX1bLHcVvEzGT0DlsmjteTj/5DOY+SN8V3U+U7ucdbccLY2j CSvo+RyJ9fWgy/EjAtxqZf25/bLptzMimag3Ejg1n4P4+knsW/W3wAtOYKcvCm3QKIb Dyt3bON3QA== In-Reply-To: Received-SPF: pass client-ip=81.3.6.162; envelope-from=excalamus@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:128933 Archived-At: Jean, > (defun my-comment-line () > (interactive) > (let ((point (point))) > (comment-region (point-at-bol) (point-at-eol)))) > Thank you for your reply.=C2=A0 My apologies about the formatting.=C2=A0 I = noticed that the code appeared scrambled and quickly sent a follow-up to co= rrect that.=C2=A0 I'm sorry you didn't see that and had to correct it manua= lly! Unfortunately, your suggestion produces the same jumping behavior.=C2=A0 I = believe this is because it relies on comment-region which is also called by= comment-line (comment-line does basically the exact same thing you suggest= ).=C2=A0 It looks like the behavior occurs somewhere within comment-region-= default-1 .=C2=A0=20 I'm surprised to hear that comment-line, and that the my-comment-line, func= tion do not produce the jumping behavior.=C2=A0 When I asked on emacs.stack= exchange, it was verified by another.=C2=A0 I have reproduced the behavior = with emacs --no-init on both Windows (GNU Emacs 27.1 (build (1, x86_64-ming= w32) of 2020-08-21 ) and GNU Guix (GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version = 3.24.24, cairo version 1.16.0). Are you executing it with org-mode enabled?=C2=A0 (I failed to mention tha= t in my original email and specified it in my follow up.=C2=A0 Please excus= e me!) What version of Emacs are you using?