From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 18:37:59 2023 Received: (at submit) by debbugs.gnu.org; 26 Nov 2023 23:37:59 +0000 Received: from localhost ([127.0.0.1]:42894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7OhL-0007T4-4U for submit@debbugs.gnu.org; Sun, 26 Nov 2023 18:37:59 -0500 Received: from lists.gnu.org ([2001:470:142::17]:57634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7OhH-0007Sk-1D for submit@debbugs.gnu.org; Sun, 26 Nov 2023 18:37:58 -0500 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 1r7Oh5-0004fH-5v for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2023 18:37:43 -0500 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7Oh2-0001cM-Vq for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2023 18:37:42 -0500 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-67a3e0fb11aso3396886d6.2 for ; Sun, 26 Nov 2023 15:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701041859; x=1701646659; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wjCP/GivyUM8QIVLzpkDbomzd4jZDqpd40PYz7SMSq8=; b=TxO0ds46AxFeYEJFcwqeI56oOsp5J2BvqMqeW0+GhE+or8uJ18SGBys/UesTGMpTPa FH4SGvwDr2kT5Ue77FdAx6eYJHzpV/89COGg0av4GsdUQ6k8eTAydBSLt4bf7ls5HkFO hcb2IdmsHS2ORwla2mI5erQCZdDgNByHuxLKkJoU/n6G3XStOG3/Y3dlj2C6C1vY8lzh 1ARaWozEKI/6SqwF1AhBfP1RfxttUQS5bT1OdNmz4bTBWwy1aK5AxgrHBCvNYB2lU9OM QEQ4qh6kUXsInilgNOB0oTBd7fitJqN0OOGARpXzBfn495OGQpIIEkRQFF/W+/bIW/mE HSMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701041859; x=1701646659; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wjCP/GivyUM8QIVLzpkDbomzd4jZDqpd40PYz7SMSq8=; b=rv4rxf0VJLDe4+VAkSAJ81TbT7BULoUzSJmKtLwHyVvOx8a/sjBj+M8G9DnCJDHNyk n46zZ8XcqFLQtB+qVujrQ6y5NV3p7VhGR3qb7fpMaNnojmZZiVUXHCvVprDQGFNn8tVa hDT584jW//isuw935nJbWEHEkfcXU/b/HtfN/Q2EOKy5zT0Ed1YPHbOHAqfNTb+1uGxM w4bLjSJUYlpRRRyx+c1Du+wbzrh2d/tjPG2tfH5H30w0tefKdm0s4Pemly483m08wOx4 1Xycfz/gt7wTuAHzJxj6r57Abt7N9g2+i71E+If6HGfw7dVDdiryuHPk8zoa+Okk89ye VMNg== X-Gm-Message-State: AOJu0YxMPKHeSwj9h1eDQuF8WiD83MgGRifN4D1uZvF4auY4UlSg6MnO icOLcOLahrqYoAq8ahd1ACI4AUFcHn5ZZA== X-Google-Smtp-Source: AGHT+IGILWbacUZ2KuNOs4F5tTQqP3qHytgOknmgsIaUPCIFnkW9Sw4oInjcfCy3Hw1s4NmH3p5wgA== X-Received: by 2002:a05:6214:19cb:b0:66d:28b3:798 with SMTP id j11-20020a05621419cb00b0066d28b30798mr14655145qvc.10.1701041859053; Sun, 26 Nov 2023 15:37:39 -0800 (PST) Received: from localhost ([2600:4041:7974:ce01:7656:3cff:fe6a:6b1b]) by smtp.gmail.com with ESMTPSA id h17-20020a0cedb1000000b0067a3ad49979sm884172qvr.96.2023.11.26.15.37.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 15:37:38 -0800 (PST) From: matthewktromp@gmail.com To: bug-gnu-emacs@gnu.org Subject: 29.1; move-end-of-line behaves badly with eglot type annotations Date: Sun, 26 Nov 2023 23:37:04 +0000 Message-ID: <8534wsxf1b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f30; envelope-from=matthewktromp@gmail.com; helo=mail-qv1-xf30.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.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: -0.0 (/) 1. Go to a buffer with some code 2. Start eglot 3. Eglot adds type annotations 4. Go to some line that ends with a type annotation 5. Press C-e to go to the end of the line 6. Navigate around with C-n and C-p 7. Note that point will jump to the column of the position of the end of the type annotation, rather than the end of the code. For instance, if you have some code and some annotations (represented with a) like so, with point at |: some|code aaaaaaaaaa here are some more lines which do not have annotations Pressing C-e will move point to the end of the line some cod| aaaaaaaaaa here are some more lines which do not have annotations Then when you press C-n, instead of point moving to the same column in the next line, like so: some code aaaaaaaaaa here are|some more lines which do not have annotations It will instead jump to the column of the end of the annotation, like so: some code aaaaaaaaaa here are some more |ines which do not have annotations In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) Windowing system distributor 'Microsoft Corporation', version 11.0.12010000 System Description: Arch Linux Configured using: 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Rust Minor modes in effect: shell-dirtrack-mode: t delete-selection-mode: t repeat-mode: t eglot-inlay-hints-mode: t eglot--managed-mode: t flymake-mode: t windmove-mode: t global-corfu-mode: t corfu-mode: t pixel-scroll-precision-mode: t desktop-save-mode: t server-mode: t save-place-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader nroff-mode ffap find-dired grep cus-start display-line-numbers etags fileloop generator pcmpl-unix sh-script executable shell pcomplete dabbrev face-remap files-x pulse misearch multi-isearch mule-util cl-extra rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-enc xmltok yank-media mhtml-mode css-mode smie eww xdg url-queue shr pixel-fill kinsoku url-file svg xml puny mm-url gnus nnheader gnus-util range color js c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode facemenu dom conf-mode dired-aux dired dired-loaddefs agda2-mode derived agda2-queue agda2-abbrevs skeleton agda2-highlight agda-input quail annotation eri time-date vc-git diff-mode easy-mmode vc-dispatcher delsel rect rust-utils rust-mode rx rust-rustfmt rust-playpen rust-compile rust-cargo repeat eglot external-completion array filenotify jsonrpc ert ewoc debug backtrace help-mode find-func xref flymake-proc flymake thingatpt warnings compile text-property-search comint ansi-osc ansi-color project imenu windmove sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils corfu compat pixel-scroll cua-base ring desktop frameset agda2 cus-edit pp cus-load icons wid-edit server saveplace savehist modus-vivendi-theme modus-themes pcase avy-autoloads corfu-autoloads compat-autoloads debbugs-autoloads exwm-autoloads geiser-autoloads racket-mode-autoloads rust-mode-autoloads info sicp-info-autoloads finder-inf vundo-autoloads which-key-autoloads xelb-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 563494 56735) (symbols 48 25859 2) (strings 32 93540 3924) (string-bytes 1 2840663) (vectors 16 49716) (vector-slots 8 696206 66122) (floats 8 315 539) (intervals 56 29777 496) (buffers 984 133)) From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 07:35:39 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 12:35:39 +0000 Received: from localhost ([127.0.0.1]:43442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7apv-0006TY-B1 for submit@debbugs.gnu.org; Mon, 27 Nov 2023 07:35:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7apt-0006TK-JY for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 07:35:38 -0500 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 1r7aph-000146-SK; Mon, 27 Nov 2023 07:35:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DW8tK13NUzUC5obxmUYf88dObbipHhAFtwQQSisGL50=; b=GjVX7WvpyszqyDkYXWaX cVnYpmBAfGEgjAkgymF31WaJBy8Tyje0NnrGYMMqE2eSYCMQFQI9r/Eu7YTc3PZytxIXWkmx1nmYK SIQbBCdtXUYd6JwiTm7XRx4WARWf+hEwjhm9IxPJoaRhPuuc+ZRzd040TzaqNeCD42BSMaJYiW4Nd 1CtUGQ0/nr5jj7vRYvaAXJ8+UAhaoCy4G2tWTRKze5iFfnvtNcJUKRu5SappE2qnDeqUALYd54D3v dMc6ZHpvGwA8DCDrc4ObEkoIZSuQ30abd7Kawtm19y4AiYFMSK0N88YFarvQw0DNI9gQogSXk0MMy x9lEWtyVIJALfg==; Date: Mon, 27 Nov 2023 14:34:53 +0200 Message-Id: <837cm39xxu.fsf@gnu.org> From: Eli Zaretskii To: matthewktromp@gmail.com, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <8534wsxf1b.fsf@gmail.com> (matthewktromp@gmail.com) Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations References: <8534wsxf1b.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67470 Cc: 67470@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: -3.3 (---) > From: matthewktromp@gmail.com > Date: Sun, 26 Nov 2023 23:37:04 +0000 > > > 1. Go to a buffer with some code > 2. Start eglot > 3. Eglot adds type annotations > 4. Go to some line that ends with a type annotation > 5. Press C-e to go to the end of the line > 6. Navigate around with C-n and C-p > 7. Note that point will jump to the column of the position of the end of > the type annotation, rather than the end of the code. > > For instance, if you have some code and some annotations (represented > with a) like so, with point at |: > > some|code aaaaaaaaaa > here are some more lines which do not have annotations > > Pressing C-e will move point to the end of the line > > some cod| aaaaaaaaaa > here are some more lines which do not have annotations > > Then when you press C-n, instead of point moving to the same column in > the next line, like so: > > some code aaaaaaaaaa > here are|some more lines which do not have annotations > > It will instead jump to the column of the end of the annotation, like > so: > > some code aaaaaaaaaa > here are some more |ines which do not have annotations João, how are those annotations shown? I cannot run Eglot on my system to try this recipe, but if I just put an overlay with a before- or after-string at the end of a line, C-e moves to after the overlay string, not before it. Does Eglot do anything to change that? In any case, I'm guessing that what the OP sees is a general-purpose cursor movement in the presence of overlay strings, and can only be changed if Eglot had its own commands for C-n/C-p, which set goal-column or something before moving. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 08:03:04 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 13:03:04 +0000 Received: from localhost ([127.0.0.1]:43483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bGR-0007JN-KI for submit@debbugs.gnu.org; Mon, 27 Nov 2023 08:03:04 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:47476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bGO-0007Iq-Hy for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 08:03:01 -0500 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50abb83866bso5613184e87.3 for <67470@debbugs.gnu.org>; Mon, 27 Nov 2023 05:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701090168; x=1701694968; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=690MwmlQCWhwI2S4S64f6IiVOZ/vNJuqXeQEzgIwqDA=; b=E3rzcL03V2nA9UtqgegeYQxiT2QU2Z+X08hGaSgaPmeenu+eKT1jO56eqogU+IPhZ3 irJxkcIJHMrxGNEQ4WbKouuG+CuI7vx9CilcSIi7YpbSqnl3ybBL4LTwA/piphz1fhek xKYAkX5rF3hL16lzNihv4VZKfKKZuGzL4DEuXR2whJNVBPUkv7N0EFnm6Xtmh3LgKvQj bXG+DsMZqX5lKkwocwDk6e3o9iJsi2SE1XN/c0+1mgZyXgCc6MgoG3NqC50ReZDh3y3U 3CneFyecN/GhkSgN5ojeRhiZa9qlIkZXvg3OYwzJM269a3ieVtj8U5zErxJqvOfYbAK6 38aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701090168; x=1701694968; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=690MwmlQCWhwI2S4S64f6IiVOZ/vNJuqXeQEzgIwqDA=; b=ZO5BiVvAAAHklvkNQjvfyaesSetY03wmaZSrx2RyTzffgexqpeRiFRQe/Xcg0+YPVb X6sG9UsXwVdrYxmobn6+rfMDs7dwDNZzQ8qSumA8aX0BojKMf8k9lWYylq9SooLC11/A 7eqrebTFCshxUCLdZRx75Uz8KS2Mt4Z+lwKhGnWHbqZhbyMD9/dWpN/Ej52A1NHO1EH0 8IChyJyw6PERtK8dyDaMU49cySScPOia+tsWQ13LtlQYM8TswMBbvcR8FLd1Ip1lXxbF 9QeciVlc2KMtETnJJHZwgxL2SobtRSFoF1AZKK8pZEZx1em1i8eIHiHm6xonxaJizLou SP5w== X-Gm-Message-State: AOJu0Yx0UFobrvvsTgejZCsCFjCi5hJlHblsUkhD90WEwEO6q4E+68Ni vdAhPSK7SUWkYGP4Sm3icjsth+MupmYSYVGXbnc= X-Google-Smtp-Source: AGHT+IFWkcdRRvWPsX+Khxfypoe9ITCGazik7InlKGerOiXKGFyUvgbWH20yJge5W2xkC5SRiKvMdeBpYPsxWKiJQuc= X-Received: by 2002:a05:6512:4022:b0:50a:77e9:d07a with SMTP id br34-20020a056512402200b0050a77e9d07amr10425398lfb.44.1701090167475; Mon, 27 Nov 2023 05:02:47 -0800 (PST) MIME-Version: 1.0 References: <8534wsxf1b.fsf@gmail.com> <837cm39xxu.fsf@gnu.org> In-Reply-To: <837cm39xxu.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 27 Nov 2023 13:02:36 +0000 Message-ID: Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 67470 Cc: matthewktromp@gmail.com, 67470@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: -1.0 (-) On Mon, Nov 27, 2023 at 12:35=E2=80=AFPM Eli Zaretskii wrote= : > > > From: matthewktromp@gmail.com > > Date: Sun, 26 Nov 2023 23:37:04 +0000 > > > > > > 1. Go to a buffer with some code > > 2. Start eglot > > 3. Eglot adds type annotations > > 4. Go to some line that ends with a type annotation > > 5. Press C-e to go to the end of the line > > 6. Navigate around with C-n and C-p > > 7. Note that point will jump to the column of the position of the end o= f > > the type annotation, rather than the end of the code. > > > > For instance, if you have some code and some annotations (represented > > with a) like so, with point at |: > > > > some|code aaaaaaaaaa > > here are some more lines which do not have annotations > > > > Pressing C-e will move point to the end of the line > > > > some cod| aaaaaaaaaa > > here are some more lines which do not have annotations > > > > Then when you press C-n, instead of point moving to the same column in > > the next line, like so: > > > > some code aaaaaaaaaa > > here are|some more lines which do not have annotations > > > > It will instead jump to the column of the end of the annotation, like > > so: > > > > some code aaaaaaaaaa > > here are some more |ines which do not have annotations some code aaaaaaaaaa > > here are|some more lines which do not have annotations Hi Eli, I have reproduced this. I can even add the following curious example some code aaaaaaaaaa here are|some more lines which do not have annotations Press C-p, get some cod| aaaaaaaaaa here are some more lines which do not have annotations Which looks like just what you would get if you had pressed C-e in the first line. Now type C-n. some code aaaaaaaaaa here are|some more lines which do not have annotations Which is exactly what you expect. So, the manner in which one arrives at the end of the line matters. > Jo=C3=A3o, how are those annotations shown? With 'before-string' and 'after-string' properties, as you guessed. For example, here's a snippet of awkward but valid C++ code, where I include the annotation: auto bla: int =3D 42; heyheyheyheyhey The ": int" 5-character string is the value of the before-string property of the 1-char-long overlay that spans the newline character separating the two lines. > I cannot run Eglot on my > system to try this recipe, but if I just put an overlay with a before- > or after-string at the end of a line, C-e moves to after the overlay > string, not before it. Does Eglot do anything to change that? Yes, it sets the property "cursor" to 1 in the first character of the 5-character string. This is intentionally done so that, among other reasons= , if you C-e to the end, you can edit the the 'bla' identifier without the awkwardness of typing characters after the annotation and seeing them pop into place after some time. > cursor movement in the presence of overlay strings, and can only be > changed if Eglot had its own commands for C-n/C-p, which set > goal-column or something before moving. Eglot does not change these commands. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 08:18:13 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 13:18:14 +0000 Received: from localhost ([127.0.0.1]:43510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bV7-0007hy-Kb for submit@debbugs.gnu.org; Mon, 27 Nov 2023 08:18:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bV5-0007hk-9p for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 08:18:11 -0500 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 1r7bUt-0000eI-BD; Mon, 27 Nov 2023 08:17:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/LvP6s7oWWBupx9eu/LAfZdanPipM0YI800Znsuu5wo=; b=oCKPpxJ5Qf2yDpz+zHoT ncqd2L/Fy5/smcWfPB/BC63DmD6hwJVqq7pG50PLZcofZjxvTYffLisyyQnOBs0fPw4mOV0m1NQa6 xhxA20T8DdhXm1TmvKdTmvF/mIByvGRbhU3yZCby5j+1Gosz+bu66UxEVfBh13i24MnrLLnqnF0mR UPadb5/XKVsPuHKzNTufZxqCyIOx9dftfdrHUo2UoeeXhI2CJOK5t4aVn6PcyBs89zOmPDgQVOubV jG/tnjN+n3IfN2h9w7Nxh1Dvr/9RbRsDYscrhSbJCoq1WO8hcsmp2RtjQLHRzIAerPs5udtcJMNNG rOUMGr06Ge3npw==; Date: Mon, 27 Nov 2023 15:17:43 +0200 Message-Id: <83v89n8he0.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Mon, 27 Nov 2023 13:02:36 +0000) Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations References: <8534wsxf1b.fsf@gmail.com> <837cm39xxu.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67470 Cc: matthewktromp@gmail.com, 67470@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: -3.3 (---) > From: João Távora > Date: Mon, 27 Nov 2023 13:02:36 +0000 > Cc: matthewktromp@gmail.com, 67470@debbugs.gnu.org > > I have reproduced this. I can even add the following curious example > > some code aaaaaaaaaa > here are|some more lines which do not have annotations > > Press C-p, get > > > some cod| aaaaaaaaaa > here are some more lines which do not have annotations > > Which looks like just what you would get if you had pressed C-e > in the first line. Now type C-n. > > some code aaaaaaaaaa > here are|some more lines which do not have annotations > > Which is exactly what you expect. So, the manner in which > one arrives at the end of the line matters. > > > João, how are those annotations shown? > > With 'before-string' and 'after-string' properties, as you > guessed. I'd appreciate an example I could play with that doesn't need Eglot. I'm not sure we can fix this, but I'd like to understand better what gets in the way before I decide. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 08:39:25 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 13:39:25 +0000 Received: from localhost ([127.0.0.1]:43536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bpc-0008GF-PQ for submit@debbugs.gnu.org; Mon, 27 Nov 2023 08:39:25 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:58804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bpa-0008G1-60 for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 08:39:22 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507be298d2aso5723588e87.1 for <67470@debbugs.gnu.org>; Mon, 27 Nov 2023 05:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701092349; x=1701697149; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7DbbJOlpjJZDVwIT/291oDXhnsfsjgRJdU+bDsYe7WI=; b=E7T07IIsayM951NBwNfGb3KMXsI1Cb152g9rb0QB8IKX9t2h2wfrYIbL+1KdEk+XFF sSzcPhSdGIcpFh7W/nWTGf769ZuyzH7OhEthuom9wtMq30B1XR6ibmbR7ChBwQJ6cAb9 oNrBfSpVNT2ijaMSz9rjoZ5ChB80Kw9wbrna/tFd4GPW6HwdsND/txre9iuBwmYc2hw9 Rip7x1vzPlHFYas1j7z2iUGK4k6jD/thBQIxYUfMZ35RY4uAjdExCHUc8HKR7znBcf7T tckAR7RL7QBg+ehAwgOR/c1AaNZrbraprLPkLx3cvG1gxKt4wEv0Z91MLdVFT/7UA98d Ulpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701092349; x=1701697149; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7DbbJOlpjJZDVwIT/291oDXhnsfsjgRJdU+bDsYe7WI=; b=YB97h+NZsiqR08qJiYZ3a3BeCXDYrju23OiRyH2edrxY4a697kNLic3Qi6wGHA3ds6 57JYYSshVu8uWT+N+nOF9ogTyhGF3p0KsafShU7x+tF0SvOH/1GhrhMt4X7tC0QfFT2j iQ2rrYolT3rBRUwH1TAvXG6WXcR8LuBH+XOxzrvFrinEEiYSrWAaUe6h2h+42OaEhRyz 7xHsb8DEeoaJxhgVNxy3GKZS/A7QVJwllK7lCIM6/1y6BQYh/ILJLU7R2ccy8Hbcr8Lj XAUwCVIYp3ZjIh6Yqifqyi04EhdywKM005nKWSSjA6esbjrXCtTV30zhJOakPCvTM7Dy fO3Q== X-Gm-Message-State: AOJu0Yw6MJ2QGysFSmTaAMBMzp1g8OmiHyiTZhn1Y/FS4qvJzD+s1lPW GLebcQHehJCt6FvBfvPfqREJYjvmCCAJpi3K/ww= X-Google-Smtp-Source: AGHT+IFKVDP0kragKkpQqWPVITq3pmpUSPKP8SBa40zdh+kmquFkJmdahRvrxqFGV/GRDL05+MeC3Q2w9MhjeanR1gg= X-Received: by 2002:a05:6512:2210:b0:500:7cab:efc3 with SMTP id h16-20020a056512221000b005007cabefc3mr9331944lfu.11.1701092349306; Mon, 27 Nov 2023 05:39:09 -0800 (PST) MIME-Version: 1.0 References: <8534wsxf1b.fsf@gmail.com> <837cm39xxu.fsf@gnu.org> <83v89n8he0.fsf@gnu.org> In-Reply-To: <83v89n8he0.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 27 Nov 2023 13:38:56 +0000 Message-ID: Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 67470 Cc: matthewktromp@gmail.com, 67470@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: -1.0 (-) On Mon, Nov 27, 2023 at 1:18=E2=80=AFPM Eli Zaretskii wrote: > > > From: Jo=C3=A3o T=C3=A1vora > > Date: Mon, 27 Nov 2023 13:02:36 +0000 > > Cc: matthewktromp@gmail.com, 67470@debbugs.gnu.org > > > > I have reproduced this. I can even add the following curious example > > > > some code aaaaaaaaaa > > here are|some more lines which do not have annotations > > > > Press C-p, get > > > > > > some cod| aaaaaaaaaa > > here are some more lines which do not have annotations > > > > Which looks like just what you would get if you had pressed C-e > > in the first line. Now type C-n. > > > > some code aaaaaaaaaa > > here are|some more lines which do not have annotations > > > > Which is exactly what you expect. So, the manner in which > > one arrives at the end of the line matters. > > > > > Jo=C3=A3o, how are those annotations shown? > > > > With 'before-string' and 'after-string' properties, as you > > guessed. > > I'd appreciate an example I could play with that doesn't need Eglot. > I'm not sure we can fix this, but I'd like to understand better what > gets in the way before I decide. > > Thanks. You can try in the scratch buffer with your own overlay at the end of the line with a before-string property that has the 'cursor' property set to 1 at the first character. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 08:42:57 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 13:42:57 +0000 Received: from localhost ([127.0.0.1]:43542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bt3-0008LV-F2 for submit@debbugs.gnu.org; Mon, 27 Nov 2023 08:42:57 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:61752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7bt1-0008LI-PT for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 08:42:56 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507c5249d55so6413558e87.3 for <67470@debbugs.gnu.org>; Mon, 27 Nov 2023 05:42:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701092563; x=1701697363; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=o6qZjGsZjt1VTmM/lmJCZz8xhk4XPcP939VPdj9G1Is=; b=jwM2lr+MY4mtp9USkwovJwcAiZPoZfcKuVajdeL6W7dZz6yoODupo3i15SbTlbTYke M9731ClNTdk/ipLOqPH6OwCiJp8VAUPahEvPIEeMvHyHFftFZn7bytPjBvBpzHiNMS2B U6PYip9TP06twvng5+8sJUrVbbemxc8GSxQ+/L6IjKcrrmP/OP2pyZW/isxprJKj5wrD QAz8NvywswRJFMkdaTkVKgFqWevLylQrN2zusJEClPb7ZZfMR5puBdzXWizNeg1NHZon jHMndndOg+EWjVY+ifriND1j7kHahytGzwRqoVOgnfHi4RKXseR+7YDsXC/rS62o2hNT JYbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701092563; x=1701697363; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o6qZjGsZjt1VTmM/lmJCZz8xhk4XPcP939VPdj9G1Is=; b=VcIcVITgQ3o2ky9ve34QDSTiC90TMm+9Vke3RuQ5nqWr768SJgJmyioadvVY4wUVje ttxIKLau/AU7F+h3dw0jSBHcXXOwjeKU3TwLFSu81gxQm06iAcPqWhdmnU9R1QTpMvqK CVCQuPTt6+XWjbJnEHyv3mR+b2GEhm25u7juV/pC/OX30Q4ikuEdkvYSQTTeZpWkTzX6 y5EEl277cxGhoxhNTHqTC8bH0JcfTPaBawszxxrfugILiDVwGa22+YpGS9CYO4Flyx49 pyzKsuAaRNPeMtBOtlUTVnt7KehvjofCUOzBdeViovKP0M9fZH6aUUjtLXVjY0HXxnjs Ac8A== X-Gm-Message-State: AOJu0Yxr3rOs4gTU3ZDBOocdaHeytJoyoR7RocBrtpz7uJ5mVs8MPehB GsFxd2IlqOYuPvxfXu1cAKzr9t7cArJgndTH4cQ= X-Google-Smtp-Source: AGHT+IHmIT0CtRFvNt/s5HKQvDmV4Pht1qxnqZdw/lqJvn5i6ASbS/6x/WjpCUjAEMhMDlDO8qOu6YOciypAoy9G5xs= X-Received: by 2002:a05:6512:1314:b0:507:ae8b:a573 with SMTP id x20-20020a056512131400b00507ae8ba573mr5683719lfu.51.1701092563400; Mon, 27 Nov 2023 05:42:43 -0800 (PST) MIME-Version: 1.0 References: <8534wsxf1b.fsf@gmail.com> <837cm39xxu.fsf@gnu.org> <83v89n8he0.fsf@gnu.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 27 Nov 2023 13:42:32 +0000 Message-ID: Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67470 Cc: matthewktromp@gmail.com, 67470@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: -1.0 (-) On Mon, Nov 27, 2023 at 1:38=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > You can try in the scratch buffer with your own overlay at the > end of the line with a before-string property that has the 'cursor' > property set to 1 at the first character. If you need some Elisp code, this seems to do it in the usual starting scratch buffer contents: (let ((o (make-overlay (line-end-position) (1+ (line-end-position))))) (overlay-put o 'before-string (propertize "HEYHO" 'cursor 1))) From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 27 09:04:27 2023 Received: (at 67470) by debbugs.gnu.org; 27 Nov 2023 14:04:27 +0000 Received: from localhost ([127.0.0.1]:43569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7cDr-0000Wt-6g for submit@debbugs.gnu.org; Mon, 27 Nov 2023 09:04:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7cDp-0000Wf-7m for 67470@debbugs.gnu.org; Mon, 27 Nov 2023 09:04:25 -0500 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 1r7cDd-0002BJ-II; Mon, 27 Nov 2023 09:04:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=oaT090l1FF6iF7SXLPNlUX0HJVoy+Zi8I3beMtWrepo=; b=M2Evyt8mn9GmEdzITTDP 9kOVTpRpoCd9gMJl0NcLkqUIifTuLKKCIazSvkMTmQK/SBxwnzv2cmeNgHSfASVUWJiCIqaSltffw irnvqoS+1vOGR0Neov0skS+3TZ876lwvX+bKdwjp7trHRabdxJDZxsg8DtCaIRQfPT+Tiqyjf2O65 6AH0idPwZVwMy9EmHgWK+5pK2+tGQbomimZH6H057cdkBFRcCnphYnxhD/FqAL0zAAlGbfDbcAEw6 LNzKX6s6k/rOZUCacmLEMPvdQpxiFWjOhxkkd6AMBGsMK/HvYw0sUy/4RvFDhkiOLOEZdrS/nLsYT xdWnKYb+T0HyBQ==; Date: Mon, 27 Nov 2023 16:03:57 +0200 Message-Id: <83sf4r8f8y.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Mon, 27 Nov 2023 13:42:32 +0000) Subject: Re: bug#67470: 29.1; move-end-of-line behaves badly with eglot type annotations References: <8534wsxf1b.fsf@gmail.com> <837cm39xxu.fsf@gnu.org> <83v89n8he0.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67470 Cc: matthewktromp@gmail.com, 67470@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: -3.3 (---) > From: João Távora > Date: Mon, 27 Nov 2023 13:42:32 +0000 > Cc: matthewktromp@gmail.com, 67470@debbugs.gnu.org > > On Mon, Nov 27, 2023 at 1:38 PM João Távora wrote: > > > You can try in the scratch buffer with your own overlay at the > > end of the line with a before-string property that has the 'cursor' > > property set to 1 at the first character. > > If you need some Elisp code, this seems to do it in the usual > starting scratch buffer contents: > > (let ((o (make-overlay (line-end-position) (1+ (line-end-position))))) > (overlay-put o 'before-string (propertize "HEYHO" 'cursor 1))) Thanks, I think I see the problem. Hmm...