From unknown Sun Sep 21 00:09:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72184 <72184@debbugs.gnu.org> To: bug#72184 <72184@debbugs.gnu.org> Subject: Status: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent Reply-To: bug#72184 <72184@debbugs.gnu.org> Date: Sun, 21 Sep 2025 07:09:23 +0000 retitle 72184 31.0.50; typescript-ts-mode does not bind RET to newline-and-= indent reassign 72184 emacs submitter 72184 Jostein Kj=C3=B8nigsen severity 72184 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 18 17:06:13 2024 Received: (at submit) by debbugs.gnu.org; 18 Jul 2024 21:06:13 +0000 Received: from localhost ([127.0.0.1]:38175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUYKK-0006Hk-2y for submit@debbugs.gnu.org; Thu, 18 Jul 2024 17:06:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:47512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUYKE-0006HY-UG for submit@debbugs.gnu.org; Thu, 18 Jul 2024 17:06:10 -0400 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 1sUYKA-0002gy-M9 for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2024 17:06:02 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUYK7-0006fd-D8 for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2024 17:06:02 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 531E91380110 for ; Thu, 18 Jul 2024 17:05:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 18 Jul 2024 17:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1721336755; x=1721423155; bh=HskxUNmmYg 7KLosbyrAkJDPzGndfERYl8SpXS2etLAA=; b=mSEF5uWieqAuKSuYaCXnxu7F6S KYDS+d031GMD4vjBQRcSqoAdxfGE2Kw3a7Ip/axAALNWnDiWV9XVAtpvXMQkWwTy SuY8+D2s1GFAPS/hTDanFg56oZleUaHHin35UgpnrYU3jMsUr+MlfWzl4lHTXJYe w+d7duZRM3+5ihzR13yi7smozbigwJ7pRGY9uUYTIBF//EryyMp0y8S4uHKcM9Tj cKVHdpxU1izCFUTrnRI5UDT8rZWBWxwFvt/RwQ7NJ1Zjf19lUAW75gcfRE95ervB NseoUFvNUFMFj24PVmfTVJYLJ/By+MAdpSef/g7tztsgPAyyXKAovRhOHzkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1721336755; x=1721423155; bh=HskxUNmmYg7KLosbyrAkJDPzGndfERYl8Sp XS2etLAA=; b=O9l5ySR3SXBUIu0I+lBNKfn0gW47MM2eHML2s/d2sWcd0crjBqU AW69C8O5CCozRztWb1NJmV1JUQyaAP9Q45rerR2JyBepCHxuTAIiE16j/rUGoBK6 fx8W6iNN/3a6tryhcDaRDtNNEt5X6uIozWX6tQNFq8l+xlA76xC5pUto8GoT7gSQ auUZSWdM7kPYgReHI1zb5F5gPwZmWaKJFuWTBfGjkc9Z47+5h2IV4Q4+kXaJFnOw U4JeSjqvTQ8healg1cdw7xz2qyTNss/B5/3h1q2uqYEU0Bi87GiqPwfHA1uNfkkm zPVtHky7NQQXweQMZODaE1tbOPhBuwBm9NQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrgeelgdduheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtggguffkfffvofesrgdtmherhh dtjeenucfhrhhomheplfhoshhtvghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhn sehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnhepff dtieegteeggffhkefgtdelffdufffgffefvdefffegheduvdejvdfhvdffveeinecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoshhtvghinh esshgvtghurhgvrdhkjhhonhhighhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 18 Jul 2024 17:05:53 -0400 (EDT) From: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= Content-Type: multipart/alternative; boundary="Apple-Mail=_02863119-B3FC-4F87-8F5A-098965057028" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent Message-Id: Date: Thu, 18 Jul 2024 23:05:41 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3774.500.171.1.1) Received-SPF: pass client-ip=103.168.172.146; envelope-from=jostein@secure.kjonigsen.net; helo=fout3-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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: -2.6 (--) --Apple-Mail=_02863119-B3FC-4F87-8F5A-098965057028 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When using typescript-ts-mode in a bare config without any custom hooks = defined, RET ends up being bound (by default) to `newline`. This is suboptimal, given that users typically want newlines to be = indented. RET should instead be bound to `newline-and-indent`. In GNU Emacs 31.0.50 (build 4, aarch64-apple-darwin23.4.0, NS appkit-2487.50 Version 14.4.1 (Build 23E224)) of 2024-07-18 built on SOK67R3KWV97 Repository revision: 14bfa9edeb2ba47d0fb930cc708c5e4033100a54 Repository branch: master Windowing system distributor 'Apple', version 10.3.2487 System Description: macOS 14.4.1 Configured using: 'configure --with-json --with-tree-sitter --with-native-compilation PKG_CONFIG_PATH=3D:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig' Configured features: ACL GLIB GNUTLS LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: bug-reference-prog-mode: t elisp-slime-nav-mode: t highlight-symbol-mode: t flycheck-mode: t company-mode: t which-function-mode: t copilot-mode: t editorconfig-mode: t helm-mode: t helm-minibuffer-history-mode: t async-bytecomp-package-mode: t delete-selection-mode: t global-auto-revert-mode: t paredit-mode: t yas-global-mode: t yas-minor-mode: t global-nlinum-mode: t nlinum-mode: t ido-yes-or-no-mode: t override-global-mode: t server-mode: t global-hl-line-mode: t pixel-scroll-precision-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t hs-minor-mode: t Load-path shadows: /Users/josteink/.emacs.d/elpa/transient-20240421.1327/transient hides = /Users/josteink/build/emacs/lisp/transient /Users/josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig = hides /Users/josteink/build/emacs/lisp/editorconfig = /Users/josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-conf= -mode hides /Users/josteink/build/emacs/lisp/editorconfig-conf-mode = /Users/josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-core= hides /Users/josteink/build/emacs/lisp/editorconfig-core = /Users/josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-core= -handle hides /Users/josteink/build/emacs/lisp/editorconfig-core-handle = /Users/josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-fnma= tch hides /Users/josteink/build/emacs/lisp/editorconfig-fnmatch Features: (shadow sort mail-extr emacsbug em-unix em-term term ehelp em-script em-prompt em-pred em-ls em-hist em-glob em-extpipe em-cmpl em-dirs em-basic em-banner em-alias esh-mode esh-var eshell esh-cmd esh-ext esh-proc esh-opt esh-io esh-arg esh-module esh-module-loaddefs esh-util helm-command helm-elisp helm-eval edebug helm-info dired-aux image-file image-converter helm-external helm-net ffap bug-reference two-column misearch multi-isearch help-fns radix-tree markdown-mode color add-log combobulate combobulate-yaml combobulate-css combobulate-js-ts combobulate-python combobulate-html combobulate-ui transient combobulate-display let-alist combobulate-contrib multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-pop mc-edit-lines mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu mc-cycle-cursors multiple-cursors-core rect combobulate-manipulation python combobulate-navigation combobulate-misc combobulate-interface combobulate-rules combobulate-settings tempo elec-pair typescript-ts-mode js c-ts-common cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-git vc-dispatcher winner tramp-archive tramp-gvfs ido-completing-read+ memoize cus-edit cus-start cus-load minibuf-eldef org-duration diary-lib diary-loaddefs cal-iso disp-table oc-basic ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win ol-docview doc-view jka-compr ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi face-remap org-agenda org-element org-persist org-id org-element-ast inline avl-tree org-refile elisp-slime-nav highlight-symbol flycheck company-oddmuse company-keywords company-etags etags fileloop generator company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company eglot external-completion flymake compat diff diff-mode track-changes ert pp ewoc debug backtrace which-func hideshow copilot copilot-balancer editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch f dash s jsonrpc eww url-queue shr pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader gnus-util mail-utils range wid-edit mm-util mail-prsvr helm-imenu helm-mode helm-misc helm-files image-dired image-dired-tags image-dired-external image-dired-util image-mode dired dired-loaddefs exif tramp trampver tramp-integration files-x tramp-message tramp-compat xdg shell parse-time iso8601 tramp-loaddefs helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-global-bindings helm-easymenu helm-core async-bytecomp helm-source helm-multi-match helm-lib async imenu ob-plantuml delsel autorevert filenotify org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs thingatpt find-func cal-menu calendar cal-loaddefs org-compat org-macs format-spec yasnippet paredit dockerfile-mode sh-script smie treesit executable nlinum linum ido-yes-or-no advice ido edmacro kmacro use-package-bind-key bind-key easy-mmode xref project server hl-line pixel-scroll cua-base compile-eslint all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons dracula-theme use-package-ensure use-package-core finder-inf all-the-icons-autoloads bmx-mode-autoloads cargo-autoloads cmake-mode-autoloads company-autoloads crontab-mode-autoloads dap-mode-autoloads bui-autoloads dockerfile-mode-autoloads doom-modeline-autoloads dracula-theme-autoloads editorconfig-autoloads elisp-slime-nav-autoloads expand-region-autoloads flycheck-autoloads helm-autoloads helm-core-autoloads async-autoloads highlight-symbol-autoloads ido-yes-or-no-autoloads ido-completing-read+-autoloads compile text-property-search comint ansi-osc ansi-color ring time-date comp comp-cstr cl-extra help-mode warnings comp-run comp-common rx lsp-docker-autoloads lsp-treemacs-autoloads lsp-mode-autoloads magit-autoloads pcase git-commit-autoloads magit-section-autoloads markdown-mode-autoloads memoize-autoloads multiple-cursors-autoloads nerd-icons-autoloads nlinum-autoloads paredit-autoloads pkg-info-autoloads epl-autoloads popup-autoloads powershell-autoloads shrink-path-autoloads f-autoloads spinner-autoloads swift-mode-autoloads transient-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads s-autoloads dash-autoloads undo-tree-autoloads queue-autoloads wfnames-autoloads info with-editor-autoloads yaml-autoloads yaml-mode-autoloads yasnippet-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 icons 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/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1458191 193746) (symbols 48 66974 1) (strings 32 418444 16703) (string-bytes 1 11887433) (vectors 16 160853) (vector-slots 8 2461125 186875) (floats 8 2169 354) (intervals 56 27943 2331) (buffers 992 53)) =E2=80=94 Kind Regards Jostein Kj=C3=B8nigsen --Apple-Mail=_02863119-B3FC-4F87-8F5A-098965057028 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

When using typescript-ts-mode in = a bare config without any custom hooks defined,
RET ends up = being bound (by default) to `newline`.

This is = suboptimal, given that users typically want newlines to be = indented.

RET should instead be bound to = `newline-and-indent`.



In GNU Emacs 31.0.50 (build 4, aarch64-apple-darwin23.4.0, = NS
 appkit-2487.50 Version 14.4.1 (Build 23E224)) of = 2024-07-18 built on
 SOK67R3KWV97
Repository = revision: 14bfa9edeb2ba47d0fb930cc708c5e4033100a54
Repository = branch: master
Windowing system distributor 'Apple', version = 10.3.2487
System Description:  macOS = 14.4.1

Configured = using:
 'configure --with-json --with-tree-sitter = --with-native-compilation
 PKG_CONFIG_PATH=3D:/usr/local/li= b/pkgconfig:/opt/local/lib/pkgconfig'

Configured = features:
ACL GLIB GNUTLS LCMS2 LIBXML2 MODULES NATIVE_COMP = NOTIFY KQUEUE NS
PDUMPER PNG RSVG SQLITE3 THREADS = TOOLKIT_SCROLL_BARS TREE_SITTER WEBP
XIM = ZLIB

Important settings:
  value = of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: = UTF-8
  value of $LANG: en_US.UTF-8
  = locale-coding-system: utf-8-unix

Major mode: = ELisp/l

Minor modes in effect:
  = bug-reference-prog-mode: t
  elisp-slime-nav-mode: = t
  highlight-symbol-mode: t
  = flycheck-mode: t
  company-mode: t
  = which-function-mode: t
  copilot-mode: t
  = editorconfig-mode: t
  helm-mode: t
  = helm-minibuffer-history-mode: t
  = async-bytecomp-package-mode: t
  delete-selection-mode: = t
  global-auto-revert-mode: t
  = paredit-mode: t
  yas-global-mode: t
  = yas-minor-mode: t
  global-nlinum-mode: = t
  nlinum-mode: t
  ido-yes-or-no-mode: = t
  override-global-mode: t
  server-mode: = t
  global-hl-line-mode: t
  = pixel-scroll-precision-mode: t
  tooltip-mode: = t
  global-eldoc-mode: t
  eldoc-mode: = t
  show-paren-mode: t
  = electric-indent-mode: t
  mouse-wheel-mode: = t
  menu-bar-mode: t
  = file-name-shadow-mode: t
  global-font-lock-mode: = t
  font-lock-mode: t
  blink-cursor-mode: = t
  minibuffer-regexp-mode: t
  = column-number-mode: t
  line-number-mode: = t
  transient-mark-mode: t
  = auto-composition-mode: t
  auto-encryption-mode: = t
  auto-compression-mode: t
  = hs-minor-mode: t

Load-path = shadows:
/Users/josteink/.emacs.d/elpa/transient-20240421.1327/t= ransient hides = /Users/josteink/build/emacs/lisp/transient
/Users/josteink/.emac= s.d/elpa/editorconfig-20240318.2049/editorconfig hides = /Users/josteink/build/emacs/lisp/editorconfig
/Users/josteink/.e= macs.d/elpa/editorconfig-20240318.2049/editorconfig-conf-mode hides = /Users/josteink/build/emacs/lisp/editorconfig-conf-mode
/Users/j= osteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-core hides = /Users/josteink/build/emacs/lisp/editorconfig-core
/Users/jostei= nk/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-core-handle = hides = /Users/josteink/build/emacs/lisp/editorconfig-core-handle
/Users= /josteink/.emacs.d/elpa/editorconfig-20240318.2049/editorconfig-fnmatch = hides = /Users/josteink/build/emacs/lisp/editorconfig-fnmatch

=
Features:
(shadow sort mail-extr emacsbug em-unix em-term = term ehelp em-script
em-prompt em-pred em-ls em-hist em-glob = em-extpipe em-cmpl em-dirs
em-basic em-banner em-alias = esh-mode esh-var eshell esh-cmd esh-ext
esh-proc esh-opt = esh-io esh-arg esh-module esh-module-loaddefs = esh-util
helm-command helm-elisp helm-eval edebug helm-info = dired-aux image-file
image-converter helm-external helm-net = ffap bug-reference two-column
misearch multi-isearch help-fns = radix-tree markdown-mode color add-log
combobulate = combobulate-yaml combobulate-css = combobulate-js-ts
combobulate-python combobulate-html = combobulate-ui transient
combobulate-display let-alist = combobulate-contrib multiple-cursors
mc-separate-operations = rectangular-region-mode mc-mark-pop = mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more = sgml-mode facemenu
mc-cycle-cursors multiple-cursors-core rect = combobulate-manipulation
python combobulate-navigation = combobulate-misc combobulate-interface
combobulate-rules = combobulate-settings tempo elec-pair
typescript-ts-mode js = c-ts-common cc-mode cc-fonts cc-guess cc-menus
cc-cmds = cc-styles cc-align cc-engine cc-vars cc-defs = vc-git
vc-dispatcher winner tramp-archive tramp-gvfs = ido-completing-read+
memoize cus-edit cus-start cus-load = minibuf-eldef org-duration diary-lib
diary-loaddefs cal-iso = disp-table oc-basic ol-eww ol-rmail ol-mhe ol-irc
ol-info = ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime = smime
gnutls dig gnus-sum gnus-group gnus-undo gnus-start = gnus-dbus dbus
gnus-cloud nnimap nnmail mail-source utf7 nnoo = gnus-spec gnus-int
gnus-range message sendmail yank-media = rfc822 mml mml-sec epa derived
epg rfc6068 epg-config = mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 = rfc2045 ietf-drums mailabbrev gmm-utils mailheader = gnus-win
ol-docview doc-view jka-compr ol-bibtex bibtex = ol-bbdb ol-w3m ol-doi
org-link-doi face-remap org-agenda = org-element org-persist org-id
org-element-ast inline avl-tree = org-refile elisp-slime-nav
highlight-symbol flycheck = company-oddmuse company-keywords company-etags
etags fileloop = generator company-gtags company-dabbrev-code
company-dabbrev = company-files company-clang company-capf = company-cmake
company-semantic company-template company-bbdb = company eglot
external-completion flymake compat diff = diff-mode track-changes ert pp
ewoc debug backtrace which-func = hideshow copilot copilot-balancer
editorconfig = editorconfig-core = editorconfig-core-handle
editorconfig-fnmatch f dash s jsonrpc = eww url-queue shr pixel-fill
kinsoku url-file svg xml dom puny = mm-url gnus nnheader gnus-util
mail-utils range wid-edit = mm-util mail-prsvr helm-imenu helm-mode
helm-misc helm-files = image-dired image-dired-tags = image-dired-external
image-dired-util image-mode dired = dired-loaddefs exif tramp trampver
tramp-integration files-x = tramp-message tramp-compat xdg shell
parse-time iso8601 = tramp-loaddefs helm-buffers helm-occur helm-tags
helm-locate = helm-grep helm-regexp helm-utils helm-help helm-types = helm
helm-global-bindings helm-easymenu helm-core = async-bytecomp helm-source
helm-multi-match helm-lib async = imenu ob-plantuml delsel autorevert
filenotify org ob = ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src = ob-comint org-pcomplete pcomplete org-list = org-footnote
org-faces org-entities noutline outline = org-version ob-emacs-lisp
ob-core ob-eval org-cycle org-table = ol org-fold org-fold-core org-keys
oc org-loaddefs thingatpt = find-func cal-menu calendar cal-loaddefs
org-compat org-macs = format-spec yasnippet paredit dockerfile-mode
sh-script smie = treesit executable nlinum linum ido-yes-or-no advice = ido
edmacro kmacro use-package-bind-key bind-key easy-mmode = xref project
server hl-line pixel-scroll cua-base = compile-eslint all-the-icons
all-the-icons-faces data-material = data-weathericons data-octicons
data-fileicons data-faicons = data-alltheicons dracula-theme
use-package-ensure = use-package-core finder-inf = all-the-icons-autoloads
bmx-mode-autoloads cargo-autoloads = cmake-mode-autoloads
company-autoloads crontab-mode-autoloads = dap-mode-autoloads
bui-autoloads dockerfile-mode-autoloads = doom-modeline-autoloads
dracula-theme-autoloads = editorconfig-autoloads = elisp-slime-nav-autoloads
expand-region-autoloads = flycheck-autoloads helm-autoloads
helm-core-autoloads = async-autoloads = highlight-symbol-autoloads
ido-yes-or-no-autoloads = ido-completing-read+-autoloads compile
text-property-search = comint ansi-osc ansi-color ring time-date comp
comp-cstr = cl-extra help-mode warnings comp-run comp-common = rx
lsp-docker-autoloads lsp-treemacs-autoloads = lsp-mode-autoloads
magit-autoloads pcase git-commit-autoloads = magit-section-autoloads
markdown-mode-autoloads = memoize-autoloads = multiple-cursors-autoloads
nerd-icons-autoloads = nlinum-autoloads paredit-autoloads
pkg-info-autoloads = epl-autoloads popup-autoloads = powershell-autoloads
shrink-path-autoloads f-autoloads = spinner-autoloads swift-mode-autoloads
transient-autoloads = treemacs-autoloads cfrs-autoloads = posframe-autoloads
ht-autoloads hydra-autoloads lv-autoloads = pfuture-autoloads
ace-window-autoloads avy-autoloads = s-autoloads dash-autoloads
undo-tree-autoloads queue-autoloads = wfnames-autoloads info
with-editor-autoloads yaml-autoloads = yaml-mode-autoloads
yasnippet-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 icons 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/ns-win ns-win ucs-normalize
mule-util term/common-win = 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 kqueue cocoa ns lcms2 multi-tty = make-network-process
native-compile = emacs)

Memory information:
((conses = 16 1458191 193746) (symbols 48 66974 1)
 (strings 32 = 418444 16703) (string-bytes 1 11887433)
 (vectors 16 = 160853) (vector-slots 8 2461125 186875)
 (floats 8 2169 = 354) (intervals 56 27943 2331) (buffers 992 = 53))

=E2=80=94
Kind Regards
Jostein = Kj=C3=B8nigsen

= --Apple-Mail=_02863119-B3FC-4F87-8F5A-098965057028-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 18 17:30:46 2024 Received: (at 72184) by debbugs.gnu.org; 18 Jul 2024 21:30:47 +0000 Received: from localhost ([127.0.0.1]:38225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUYi6-0000VN-6e for submit@debbugs.gnu.org; Thu, 18 Jul 2024 17:30:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUYi4-0000FE-F4 for 72184@debbugs.gnu.org; Thu, 18 Jul 2024 17:30:45 -0400 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 1sUYht-0004ec-CF; Thu, 18 Jul 2024 17:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Dmr9Ax+GhzcxuHzdRQ43hrpzmN1R6qLmv7HG7ksiZ8c=; b=iJ5NYssSjcEY+GoX1v47 mwDy5wm3jZ9HONQRQU5rL3P17sd4ZpKqXflmpJLbrLpHUIHtk+oGetBy8+CGytT8oJ1OYdjYW55AY Jwb/sInA+vLvnefyb23bOb6l6vADrCYnsXzpIwYwETCThiHketVsiAEiUEkFcJMipyX29XqWtzx/J 0Ome4iAz1RWzQd91CTV+PCQJUIiiE4zeB/TiQtUoHOx8OrhnPV/sTq7HPNv6YxfQ6inasZnxlqXSO 773EnkwoUo5nyPDHhuLvaWH/RjHcnVrnBlkwF9vLqCtGvJfO/XcCYLCtAQ91kOBRZcTdZUNAhb7Vl Qn8FlrQdFvDWqg==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sUYhs-0002Yr-7M; Thu, 18 Jul 2024 17:30:32 -0400 From: Andrea Corallo To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent In-Reply-To: ("Jostein =?utf-8?Q?Kj=C3=B8nigsen=22's?= message of "Thu, 18 Jul 2024 23:05:41 +0200") References: Date: Thu, 18 Jul 2024 17:30:32 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72184 Cc: 72184@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 (---) Jostein Kj=C3=B8nigsen writes: > When using typescript-ts-mode in a bare config without any custom hooks d= efined, > RET ends up being bound (by default) to `newline`. > > This is suboptimal, given that users typically want newlines to be indent= ed. > > RET should instead be bound to `newline-and-indent`. Hi, AFAIK this is what we tipically do, like: c-mode, c-ts-mode, lisp-mode, emacs-lisp-mode etc. Why 'typescript-ts-mode' should be different? Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 19 20:23:02 2024 Received: (at 72184) by debbugs.gnu.org; 20 Jul 2024 00:23:02 +0000 Received: from localhost ([127.0.0.1]:51409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUxsL-0001Tj-Uk for submit@debbugs.gnu.org; Fri, 19 Jul 2024 20:23:02 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:55047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUxsJ-0001TK-GM for 72184@debbugs.gnu.org; Fri, 19 Jul 2024 20:23:01 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 590BE138013C; Fri, 19 Jul 2024 20:22:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 19 Jul 2024 20:22:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1721434974; x=1721521374; bh=btnzUFYTezUvrjss0BJlNDU+0BqEsuBvcwQmX27gB+0=; b= LP7Qy0dcWvAoOaNinPdCi0jJboDHARXi3ab6+2WY/CQPucUwgzWDn8se3ooozFjz ilVLspXLIH8wyAkGSV8h9Jk3YySUaLszEi23zmOCKgjaTePKgnAc1MSUgCjka2Ea K8fXi3Bb35Mi++l5H8IkPukCQxj0SlzQoOpc5zOAr/Ng+tktwzxgc7L0RFNQ7wrk FUAq87XZLmHXnzGfRVwOjou9x2jMqZE1USG991lhra1DarAmof2USXFnG35Gn2lD PXiwjgcp2Hf335+/1lYxJDJKmBDIX5XV2A6RWIpENkp1kv3yBMPJixWvuOloO+jt SUe1NeJGbOYFEPXMMe/Y5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1721434974; x= 1721521374; bh=btnzUFYTezUvrjss0BJlNDU+0BqEsuBvcwQmX27gB+0=; b=S T2fWRZlCkiqA4EaeMZjWTS7bXo6n/5gla7AM2ij4WSEPYsq+f0s1n9YR6uUsESNw 9EAE5hGJTUNzzm84Z2ENMcn3AMPwrotZT9YtZquBiU+ayS+HbYxMKk85EU2kn+nP 5KC8Bh3YVZYJD+oPCebdM+F1JIwqrSPREHmuwxITWf/ZOTufXSmh+0HrGKRhnxyS yl6e9+TlvsBtKv9girbZ3wscTjInBxAjzRFAHyD9LGPqNgwIkFncfPrJm8VzJ2zP eW8r2Y9ki8bXNgKrrTLzV+hFUgQHGUoXk4/lBraM+3mJd2Pp+ebH9WqdBqMM+dyU Y7wRzXr0omLHOtQW5fWcA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrhedvgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheffueek keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Jul 2024 20:22:52 -0400 (EDT) Message-ID: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> Date: Sat, 20 Jul 2024 03:22:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent To: Andrea Corallo , =?UTF-8?Q?Jostein_Kj=C3=B8nigsen?= References: Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72184 Cc: 72184@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.7 (-) On 19/07/2024 00:30, Andrea Corallo wrote: > Jostein Kjønigsen writes: > >> When using typescript-ts-mode in a bare config without any custom hooks defined, >> RET ends up being bound (by default) to `newline`. >> >> This is suboptimal, given that users typically want newlines to be indented. >> >> RET should instead be bound to `newline-and-indent`. > Hi, > > AFAIK this is what we tipically do, like: c-mode, c-ts-mode, lisp-mode, > emacs-lisp-mode etc. Why 'typescript-ts-mode' should be different? Right, we normally handle automatic indentation using electric-indent-mode (which is on by default). If RET behaves incorrectly in typescript-ts-mode somehow, more details should be provided. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 03:21:33 2024 Received: (at 72184) by debbugs.gnu.org; 27 Jul 2024 07:21:33 +0000 Received: from localhost ([127.0.0.1]:40466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXbkC-0003DM-W8 for submit@debbugs.gnu.org; Sat, 27 Jul 2024 03:21:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXbkA-0003Cd-Jm for 72184@debbugs.gnu.org; Sat, 27 Jul 2024 03:21:31 -0400 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 1sXbju-0002BR-Pt; Sat, 27 Jul 2024 03:21:14 -0400 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=FHxOHI/a/0AaRmGlLviiut8Z6OR7rikD2VZE+UsZJdA=; b=rBDHEt/XeWI3eMkqkAvJ wqEGHM/AvoAc0Kp4hy6yGPJg9uvrb4yrbtHLkvlspNs4hNO4Z7o04jlHb91w8ZoLfSj6bwHgb0MlU 2L3QrC0IZGoES3KuCs3Mb+siO/cvflzUQ0qz/3ihBIgEjqA9a1YqkfDpqXO4uRVSUFHcWqlSH5dFf 7PxRnXUWvGQNzJKEw/Aj1G/LFkwDMR8JD2Ji8r4wMtL6xFPL+FtoII7gSqOOJ4qcmX9LVS2xQshAQ HWfCstbUVSrZPtzrs4L86Ayix3bD8AETUYntr9Qn2Bt3v9Tg1jQJMGNW1ULv8CwflmzzQwW7NpAUS dwSXoUoLkDvTog==; Date: Sat, 27 Jul 2024 10:21:09 +0300 Message-Id: <8634nv2tcq.fsf@gnu.org> From: Eli Zaretskii To: jostein@secure.kjonigsen.net, Dmitry Gutov In-Reply-To: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> (message from Dmitry Gutov on Sat, 20 Jul 2024 03:22:47 +0300) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent References: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72184 Cc: acorallo@gnu.org, 72184@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 (---) > Cc: 72184@debbugs.gnu.org > Date: Sat, 20 Jul 2024 03:22:47 +0300 > From: Dmitry Gutov > > On 19/07/2024 00:30, Andrea Corallo wrote: > > Jostein Kjønigsen writes: > > > >> When using typescript-ts-mode in a bare config without any custom hooks defined, > >> RET ends up being bound (by default) to `newline`. > >> > >> This is suboptimal, given that users typically want newlines to be indented. > >> > >> RET should instead be bound to `newline-and-indent`. > > Hi, > > > > AFAIK this is what we tipically do, like: c-mode, c-ts-mode, lisp-mode, > > emacs-lisp-mode etc. Why 'typescript-ts-mode' should be different? > > Right, we normally handle automatic indentation using > electric-indent-mode (which is on by default). > > If RET behaves incorrectly in typescript-ts-mode somehow, more details > should be provided. Jostein, could you please respond, so that we could make progress here? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 07:50:50 2024 Received: (at 72184) by debbugs.gnu.org; 27 Jul 2024 11:50:50 +0000 Received: from localhost ([127.0.0.1]:40776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXfwn-0008Um-Vb for submit@debbugs.gnu.org; Sat, 27 Jul 2024 07:50:50 -0400 Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]:49801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXfwl-0008Tz-II for 72184@debbugs.gnu.org; Sat, 27 Jul 2024 07:50:48 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 356D41140218; Sat, 27 Jul 2024 07:50:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 27 Jul 2024 07:50:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1722081032; x=1722167432; bh=2qTH2z8AMQ 1XBRkPTa7oeo/SaWuTYW/sOzAQ7l1H8ys=; b=KC4p3dl8sfwetG93mgfVt/YObI F4BWWILuuYJEhNkqMXvgUQUjZO+SgbXuxcOycf2TOccum/e47EfZRncw78hJAm+D 8egEboyhGNOZ0Qot6UQLQbx9eAa7QwviOplt+qaoByY6gxgAgO+nyiM7edkluMyc r4NxzqlYFZ6XTy/M9U+XlLf9Sh4BXWXnoXuRm8i5qmtucpeXTz93MlthanWAxxv2 xq9MVFVO5BdYI74nP1yEjyqb/uUli449cwnaUjD5XaosqMgmciSmCZf404X6oYGm E+rNUlywFpksos2yHwcYNeUILx6tz0uow+i1vA6O62P051PuifgmdY0eP7vQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722081032; x= 1722167432; bh=2qTH2z8AMQ1XBRkPTa7oeo/SaWuTYW/sOzAQ7l1H8ys=; b=l B1+Wvv2am6+yKGZsnJlSDpQRs/mQlHl0ni2QFRlmwScIt9b+uvRX0ibh/b3jrM+Z MzKmS0BhS7vsko4CgrBehPYTgISxBD2ykzWVCG1lXBz7GgA3taD2+kYGQ8AjtE+a Vhwq2OZ20lNzwtIs+Rh5b6uJCh2R0XH86DOADVlEr3vwfxzzTFufPTNGwNBSOqnn V5ZlKNlWyOlHV8Hznj+x3hW27dkF7+7PX8M15Am9g6RWFbqf7QLIsTRzqYD7WXdB q7I3R2sVqiuN14mqbfDUmcF/wXBFGjE425klOBlHqqcsYmvhhzAzZdKeS+j4T4ax yC23F/5LpwwgH+gxu3w4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrieejgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtgffhggfufffkfhevjgfvofesthhqmhdthhdtjeenucfhrhhomheplfhoshht vghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnhepjeegudevffeifeegveduieetfedt gfetgfffgeeffeeghffgfefhffeggeduvddunecuffhomhgrihhnpehkjhhnihhgshgvnh drnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvthdpnhgspghrtg hpthhtoheptd X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 27 Jul 2024 07:50:31 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= Mime-Version: 1.0 (1.0) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent Date: Sat, 27 Jul 2024 13:50:19 +0200 Message-Id: <3F67A773-DD30-466F-B93B-598608546D6E@secure.kjonigsen.net> References: <8634nv2tcq.fsf@gnu.org> In-Reply-To: <8634nv2tcq.fsf@gnu.org> To: Eli Zaretskii X-Mailer: iPhone Mail (21F90) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72184 Cc: Dmitry Gutov , acorallo@gnu.org, 72184@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.7 (-) I=E2=80=99m on a vacation with the family, and without a laptop. I won=E2=80= =99t be able to provide more thorough feedback until I=E2=80=99m back and ca= n re-test various configurations. I might be able to look into this in a week or so. Is that good? -- Jostein Kj=C3=B8nigsen https://jostein.kj=C3=B8nigsen.net > On 27 Jul 2024, at 09:21, Eli Zaretskii wrote: >=20 > =EF=BB=BF >>=20 >> Cc: 72184@debbugs.gnu.org >> Date: Sat, 20 Jul 2024 03:22:47 +0300 >> From: Dmitry Gutov >>=20 >>> On 19/07/2024 00:30, Andrea Corallo wrote: >>> Jostein Kj=C3=B8nigsen writes: >>>=20 >>>> When using typescript-ts-mode in a bare config without any custom hooks= defined, >>>> RET ends up being bound (by default) to `newline`. >>>>=20 >>>> This is suboptimal, given that users typically want newlines to be inde= nted. >>>>=20 >>>> RET should instead be bound to `newline-and-indent`. >>> Hi, >>>=20 >>> AFAIK this is what we tipically do, like: c-mode, c-ts-mode, lisp-mode, >>> emacs-lisp-mode etc. Why 'typescript-ts-mode' should be different? >>=20 >> Right, we normally handle automatic indentation using >> electric-indent-mode (which is on by default). >>=20 >> If RET behaves incorrectly in typescript-ts-mode somehow, more details >> should be provided. >=20 > Jostein, could you please respond, so that we could make progress > here? >=20 > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 08:21:01 2024 Received: (at 72184) by debbugs.gnu.org; 27 Jul 2024 12:21:01 +0000 Received: from localhost ([127.0.0.1]:40793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXgQ0-00013r-Nu for submit@debbugs.gnu.org; Sat, 27 Jul 2024 08:21:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXgPy-000135-Cw for 72184@debbugs.gnu.org; Sat, 27 Jul 2024 08:20:59 -0400 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 1sXgPh-0001SK-WD; Sat, 27 Jul 2024 08:20:42 -0400 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=FkwDhA5HO2nVcimNXq9LHEyEluDjBSQf7+qT4J4+xx4=; b=aA2YydlYbmdPLme+OiIF TF/HSR/DBhmFHc2LgLZKfFhuMnAS7bf2TJaVrKed6QDt7OpZSFs66RKQLLfyOrd/q/5lf3mAGoH0R Rvz5pGtpGfPWDlDF1uD6DXLLBhiPIT1Us5N8spO1xz5AYde1NDOKHxPD6P9eukRz87rhLiQfIq0wt gQh4woG1FOp9z2iuiNsIR3EDTphitGi9ZuJYl/HKAgSIRIJq/AdHQ1Jy69nyjChPYv7hzlgJnsxiz aZQsmtfzvWkyv44NGfpjdqlCAfIDo6oE3/4VhXJD4+ngO692M7uVdyA/foQCm70DDU4MlBeJFIy0g ysKpFSo/vQzdeQ==; Date: Sat, 27 Jul 2024 15:20:22 +0300 Message-Id: <86r0bf10xl.fsf@gnu.org> From: Eli Zaretskii To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= In-Reply-To: <3F67A773-DD30-466F-B93B-598608546D6E@secure.kjonigsen.net> (message from Jostein =?utf-8?Q?Kj=C3=B8nigsen?= on Sat, 27 Jul 2024 13:50:19 +0200) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent References: <8634nv2tcq.fsf@gnu.org> <3F67A773-DD30-466F-B93B-598608546D6E@secure.kjonigsen.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72184 Cc: dmitry@gutov.dev, acorallo@gnu.org, 72184@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: Jostein Kjønigsen > Date: Sat, 27 Jul 2024 13:50:19 +0200 > Cc: Dmitry Gutov , acorallo@gnu.org, 72184@debbugs.gnu.org > > I’m on a vacation with the family, and without a laptop. I won’t be able to provide more thorough feedback until I’m back and can re-test various configurations. > > I might be able to look into this in a week or so. Is that good? Sure, there's no rush. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 04:55:50 2024 Received: (at 72184) by debbugs.gnu.org; 31 Jul 2024 08:55:50 +0000 Received: from localhost ([127.0.0.1]:49087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ57d-0001X1-BT for submit@debbugs.gnu.org; Wed, 31 Jul 2024 04:55:49 -0400 Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]:55197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ57Z-0001Wi-FC for 72184@debbugs.gnu.org; Wed, 31 Jul 2024 04:55:47 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 07CF41146E7B; Wed, 31 Jul 2024 04:55:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 31 Jul 2024 04:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1722416125; x=1722502525; bh=nVKEAQNYBaY4kafUFwGoMg+TGQpTqX9X6vy2+ihdXhw=; b= 19ZGKGQubkrUP1c6spSBuZajgL21LizIWkZIUcVU8J1mxqksTmwD+/6OBo7sKR2X gMx0Ap53sACOSG/HirykFAieXWf8eFzkwIDqigXghgnJGuUXdeEp0hb1hqg99hfO 54M5Oc2k80rVKcQkyhshAtp/wgYA77GzJ+tYRAvD+fkXzYBUdxuLHgSii/2N891R T+F/Sgc4/ux8wym2pYaF1RNp9xoX2BQw4if5dBR9nSv+eaJZpxk5aAOrXwGWn0kJ q0DXlhw8b9g58t/N6OiTaRH7Sx7HI9myUVpeTcxnxWpuF41YkZia2fqnMRwPRVtm OClrTb6WYfPUtSSf3lPdLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1722416125; x=1722502525; bh=nVKEAQNYBaY4kafUFwGoMg+TGQpT qX9X6vy2+ihdXhw=; b=GjgE/WMoAGbaeAgRpmvCZMk59bZ7dUBBpKbaXv5piNsv q9jAnAkPJESXe+0BVi+AyN44ZGjzkcPdcMbR8jeQIl679uw1qgjmg2rfcjoRSrfE s5ue6ZKro6hy4lpxTki8H0ZsXTOJfL5JnW/M2g0dNE5T1J+HodzljWXFPeD7MAkE 6LIDZ8QCfgWurOrAb4RsD/wAt0oLGjPgvuN3WDsqSaBnL8Uxm5/dRXRHQJbd9oCQ ckXUEAlHage7umoUK+NnyTpyXmIb3ZrgOO0XSi/IY8hlVQhvfiCpPSBE7pELJNJy STKf6p+vnXdJJKyo0Ok1thMR5YE6UruvcGcONrIYCQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeeigddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhkfgtggfuffgjvefvfhfosegrtdhmrehhtddvnecuhfhrohhmpeflohhsthgv ihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhigh hsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeeggeffveeigeegudejhefhfedtgedt udegjeeuvdetueejuedtkeeijeeijeetleenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhg shgvnhdrnhgvthdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jul 2024 04:55:23 -0400 (EDT) From: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= Message-Id: <5088180E-50DC-4374-B7F3-78DA6244291C@secure.kjonigsen.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_6701E944-F619-4FF0-9B13-B7EBAE0B36FD" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent Date: Wed, 31 Jul 2024 10:55:00 +0200 In-Reply-To: <8634nv2tcq.fsf@gnu.org> To: Eli Zaretskii References: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> <8634nv2tcq.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72184 Cc: Dmitry Gutov , Yuan Fu , acorallo@gnu.org, Theodor Thornhill , 72184@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.7 (-) --Apple-Mail=_6701E944-F619-4FF0-9B13-B7EBAE0B36FD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 27 Jul 2024, at 09:21, Eli Zaretskii wrote: >=20 >> Cc: 72184@debbugs.gnu.org >> Date: Sat, 20 Jul 2024 03:22:47 +0300 >> From: Dmitry Gutov >>=20 >> Right, we normally handle automatic indentation using=20 >> electric-indent-mode (which is on by default). >>=20 >> If RET behaves incorrectly in typescript-ts-mode somehow, more = details=20 >> should be provided. >=20 > Jostein, could you please respond, so that we could make progress > here? >=20 > Thanks. PREFACE I've now looked further into this issue, and what we're actually seeing = here is not indentation code "not working", but indentation rules not = taking into account incomplete parse-trees while code is being written. So as the original bug-submitter, I will have to just declare that the = original bug-description is clearly inaccurate. Sorry about that! Below is my attempt to better express what is actually failing and why. My hypothesis is that this could be an issue for other tree-sitter based = major-modes as well, and maintainers of those modes are encouraged to = check for similar issues. If more major-modes than typescript-ts-mode is affected, the optimum = solution may best be decided together, rather than individually per = mode. AS FOR THE BUG - DETAILS Consider the following pre-existing typescript/javascript function: function stuff() { // TODO implement } Using the typescript tree-sitter grammer, it gets the following nodes in = its tree-sitter AST: (function_declaration function name: (identifier) parameters: (formal_parameters ( )) body: (statement_block { (comment) })) =20 This matches the rules for indentation in typescript-ts-mode and indents = correctly regardless. But in a bare config with only electric-indent-mode enabled (and not = electric-pair-mode), trying to enter a new function will produce a = incomplete syntax tree, due to the missing final brace. The code will look like this: function gnu2() { // NOTE: no closing brace! And the tree-sitter AST will then look like this until completed: (expression_statement (function function name: (identifier) parameters: (formal_parameters ( )) body: (statement_block { (comment) })))) And typescript-ts-mode has no indentation rules for this AST. Thus = pressing enter wont cause indentation, despite electric-indent-mode = being enabled. I suspect this sort of issue could possibly affect other treesitter = based modes which has been developed mostly in existing configs with = "all the bells and whistles" (like electric-pair-mode) enabled. I'll hold off any fixes or suggestions for such until we have some = reports from other maintainers, if that is ok? -- Jostein= --Apple-Mail=_6701E944-F619-4FF0-9B13-B7EBAE0B36FD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii


On 27 Jul 2024, at 09:21, Eli = Zaretskii <eliz@gnu.org> wrote:

Cc: 72184@debbugs.gnu.org
Date: Sat, 20 Jul 2024 = 03:22:47 +0300
From: Dmitry Gutov = <dmitry@gutov.dev>

Right, we normally handle automatic = indentation using
electric-indent-mode (which is on by = default).

If RET behaves incorrectly in typescript-ts-mode = somehow, more details
should be = provided.

Jostein, could you please respond, so that = we could make = progress
here?

Thanks.


PREFACE

I've now looked = further into this issue, and what we're actually seeing here is not = indentation code "not working", but indentation rules not taking into = account incomplete parse-trees while code is being = written.

So as the original bug-submitter, I = will have to just declare that the original bug-description is clearly = inaccurate. Sorry about that!

Below is my = attempt to better express what is actually failing and = why.

My hypothesis is that this could be an = issue for other tree-sitter based major-modes as well, and maintainers = of those modes are encouraged to check for similar = issues.

If more major-modes than = typescript-ts-mode is affected, the optimum solution may best be decided = together, rather than individually per mode.

AS = FOR THE BUG - DETAILS

Consider the following = pre-existing typescript/javascript = function:

function stuff() = {
  // TODO = implement
}

Using the typescript tree-sitter grammer, it gets the following nodes = in its tree-sitter AST:

 (function_declaration function name: = (identifier)
  parameters: (formal_parameters = ( ))
  body: (statement_block { (comment) = }))
 
This = matches the rules for indentation in typescript-ts-mode and indents = correctly regardless.

But in a bare config with = only electric-indent-mode enabled (and not electric-pair-mode), trying = to enter a new function will produce a incomplete syntax tree, due to = the missing final brace.

The code will look = like this:

function gnu2() {  // NOTE: = no closing = brace!


And = the tree-sitter AST will then look like this until = completed:

 (expression_statement
  = (function function name: (identifier)
  =  parameters: (formal_parameters ( ))
  =  body: (statement_block { (comment) = }))))

And typescript-ts-mode = has no indentation rules for this AST. Thus pressing enter wont = cause indentation, despite electric-indent-mode being = enabled.

I suspect this sort of issue could = possibly affect other treesitter based modes which has been developed = mostly in existing configs with "all the bells and whistles" (like = electric-pair-mode) enabled.

I'll hold off any = fixes or suggestions for such until we have some reports from other = maintainers, if that is = ok?

--
Jostein
= --Apple-Mail=_6701E944-F619-4FF0-9B13-B7EBAE0B36FD-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 20:42:56 2024 Received: (at 72184) by debbugs.gnu.org; 1 Aug 2024 00:42:56 +0000 Received: from localhost ([127.0.0.1]:50454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZJuB-0000cr-Qy for submit@debbugs.gnu.org; Wed, 31 Jul 2024 20:42:56 -0400 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]:56015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZJu9-0000ce-Fu for 72184@debbugs.gnu.org; Wed, 31 Jul 2024 20:42:53 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 25FA81140350; Wed, 31 Jul 2024 20:42:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 31 Jul 2024 20:42:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1722472952; x=1722559352; bh=28LMmB5jdjgCo7t8aCOLXk+6g28LzGF015vEXkiguaU=; b= dRRMwrzTLcWtyjLpuIxNJ1sguGAAr3I+ndFO/MXZJMFyCSyqBJgFWGabBh4QsRoJ V90UEoifwTMrNjJi7a9BI4tO3ZtCNF6lYHl177Tfb7uHNWmSdbvJ69yRRi57+dQp zEQDKETdDDQ3csWFtTF4ompE5dKmO2jKuWKLanE6ciM5Gw6CrXZcDKEhL4ai8U8I Rb1gOhoEjTBCfStFRPPPb2P8k76rvJzFv1GxPGhCqpic+oc7WGPl4dW2lmZEGGEj ZGuiLYsqmHv0f8Tacjlzygn8zpcU0IqOQeIPIvMTNFugmkgvO15XMi+MeZSiUwfm Ztz6yYpHPQI8f+bbFhhy1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722472952; x= 1722559352; bh=28LMmB5jdjgCo7t8aCOLXk+6g28LzGF015vEXkiguaU=; b=Z nsaeYU79thcqBzZUJquLP9rvCO4IP9OGpihDEIS4ftAmP5uZQ37MeWgQdpHMdsvA mPRI5aidy6lxtZdMmw310IGmGUPCTfiEDcytZYWOZ4771blLqW9dUOR5o6/ZfZAa BFa7aYrfpImfK50BwP2IhC41d/KWFD1kUDt+muMeHMD+/kvUJu5oRp22eFfj+61V v4rN3Tm9HZAcjY1ANKmkZ/QS975aTTZjblj5hg9d7xzTBicaRKz13+5Jnq50DjAe WmIeJLtcce6mWT+bfBcn/A8SPNYqh2zrv0FJOoiannfVmMS8UNsTliX5oQ18B53S z+ZKr4UGfkbXnzZTDbpTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeejgdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeuteduhfeitdejkeeuffefhefgffevveetjedthfetteegtefhveeujeekjefg veenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghr tghpthhtoheptd X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jul 2024 20:42:29 -0400 (EDT) Message-ID: Date: Thu, 1 Aug 2024 03:42:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent To: =?UTF-8?Q?Jostein_Kj=C3=B8nigsen?= , Eli Zaretskii References: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> <8634nv2tcq.fsf@gnu.org> <5088180E-50DC-4374-B7F3-78DA6244291C@secure.kjonigsen.net> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <5088180E-50DC-4374-B7F3-78DA6244291C@secure.kjonigsen.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72184 Cc: Yuan Fu , acorallo@gnu.org, Theodor Thornhill , 72184@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.7 (-) Hi Jostein, On 31/07/2024 11:55, Jostein Kjønigsen wrote: > PREFACE > > I've now looked further into this issue, and what we're actually seeing > here is not indentation code "not working", but indentation rules not > taking into account incomplete parse-trees while code is being written. Makes sense, thanks. > So as the original bug-submitter, I will have to just declare that the > original bug-description is clearly inaccurate. Sorry about that! > > Below is my attempt to better express what is actually failing and why. > > *My hypothesis is that this could be an issue for other tree-sitter > based major-modes as well, and maintainers of those modes are encouraged > to check for similar issues.* > > If more major-modes than typescript-ts-mode is affected, the optimum > solution may best be decided together, rather than individually per mode. > > AS FOR THE BUG - DETAILS > > Consider the following pre-existing typescript/javascript function: > > function stuff() { >   // TODO implement > } > > > Using the typescript tree-sitter grammer, it gets the following nodes in > its tree-sitter AST: > >  (function_declaration function name: (identifier) >   parameters: (formal_parameters ( )) >   body: (statement_block { (comment) })) > > This matches the rules for indentation in typescript-ts-mode and indents > correctly regardless. > > But in a bare config with only electric-indent-mode enabled (and not > electric-pair-mode), trying to enter a new function will produce a > incomplete syntax tree, due to the missing final brace. > > The code will look like this: > > function gnu2() {  // NOTE: no closing brace! > > > And the tree-sitter AST will then look like this until completed: > >  (expression_statement >   (function function name: (identifier) >    parameters: (formal_parameters ( )) >    body: (statement_block { (comment) })))) > > > And typescript-ts-mode has no indentation rules for this AST. *Thus > pressing enter wont cause indentation, despite electric-indent-mode > being enabled.* > > I suspect this sort of issue could possibly affect other treesitter > based modes which has been developed mostly in existing configs with > "all the bells and whistles" (like electric-pair-mode) enabled. > > I'll hold off any fixes or suggestions for such until we have some > reports from other maintainers, if that is ok? We've seen this before - take a look at https://debbugs.gnu.org/62717, for example. In short, some ad-hoc counter-measures can and sometimes are added (proposals welcome), but ultimately when we know we can't reliably distinguish problem situations, or can only detect a minor fraction of them, we're also okay giving up and recommending people use electric-pair-mode for better experience. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 06:04:28 2024 Received: (at 72184) by debbugs.gnu.org; 15 Aug 2024 10:04:28 +0000 Received: from localhost ([127.0.0.1]:48375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seXLH-0008KK-R9 for submit@debbugs.gnu.org; Thu, 15 Aug 2024 06:04:28 -0400 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]:40345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seXLE-0008K4-RF for 72184@debbugs.gnu.org; Thu, 15 Aug 2024 06:04:26 -0400 Received: from phl-compute-01.internal (phl-compute-01.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 281A7114BBAB; Thu, 15 Aug 2024 06:03:43 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 15 Aug 2024 06:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1723716223; x=1723802623; bh=8gsmG2vk+3 Go4bZtChy+Nmweo1JoVfgHopwTyoY1+PA=; b=bQXRmFs/xxG5v2w1ZAKmgAvz9I eSxh6ZNBR7anGdpcX7HdpYivVyIBjt1nKxg0/OJBOq49faVlrH4LBROdVVmNjZch pJ1LLQJWEu+uedlJv4xyKN1AWs/+dj2qYxO+jJG1Ysj/lYNPVao/z0WR1VrVak2r u/UzEjMeghRpE6BR4okNIamcvQHDy1XTv0ENxUDxlXYJjbY4yEnCIky8pqO72S2Q Db/ytNqKI7HyPCk2Fhr2dFo6U8T5ETEDfjM58PRm1QtXVO9xXnzihDAzpti+o6H6 ib024xijabWDcPCV1CP8Vx4xNkEWJcg95HJakgKWsWTLqXw+LC61rLfSTHsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723716223; x= 1723802623; bh=8gsmG2vk+3Go4bZtChy+Nmweo1JoVfgHopwTyoY1+PA=; b=g xe7a6xBPOegu4TBoQWdru/UH3Eg6LRnKnORcThpuWd4rdFrzJkd/OQ7CCFfMolFb 4Ufwj1+Xj/9OiVLyhvUkeE0Z1Xls1M3ehqSGK6o77AZESuIslmimsjy7WM/MhhsZ tsZuKxl7oU1t/SQ7Ce0qpGOMxGA82q7BsKzhDtX7JrPuJKniALOe5gLaPnZodK4f zz+um10XeltaPBrZUfXemDOuDbeIF8W2egWti2X9VGEq2BTSQI5wDH19d24tlppf y55Uzm6yGRvpBFfDMxN5CKtvFFq57DduuO7jI1gWg4dwyH84ERw+9KwNORLsqxvx hXV4plrkVA3VbFlFJgFBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtiedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtddv necuhfhrohhmpeflohhsthgvihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhessh gvtghurhgvrdhkjhhonhhighhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeelffev fedvhedtvdehgfejteegvdffffelffehgedufefgkeehtddtteehgeeuveenucffohhmrg hinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth dpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepughm ihhtrhihsehguhhtohhvrdguvghvpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpd hrtghpthhtoheprggtohhrrghllhhosehgnhhurdhorhhgpdhrtghpthhtohepjedvudek geesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegtrghsohhurhhisehgmh grihhlrdgtohhmpdhrtghpthhtohepthhhvghosehthhhorhhnhhhilhhlrdhnoh X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Aug 2024 06:03:41 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent From: =?utf-8?Q?Jostein_Kj=C3=B8nigsen?= In-Reply-To: Date: Thu, 15 Aug 2024 12:03:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <202D18E7-3CA6-4D5D-A3BD-0E0DF2B88056@secure.kjonigsen.net> References: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> <8634nv2tcq.fsf@gnu.org> <5088180E-50DC-4374-B7F3-78DA6244291C@secure.kjonigsen.net> To: Dmitry Gutov X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72184 Cc: Eli Zaretskii , acorallo@gnu.org, Theodor Thornhill , Yuan Fu , 72184@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.7 (-) > On 1 Aug 2024, at 02:42, Dmitry Gutov wrote: >=20 > Hi Jostein, >=20 >=20 > We've seen this before - take a look at https://debbugs.gnu.org/62717, = for example. >=20 > In short, some ad-hoc counter-measures can and sometimes are added = (proposals welcome), but ultimately when we know we can't reliably = distinguish problem situations, or can only detect a minor fraction of = them, we're also okay giving up and recommending people use = electric-pair-mode for better experience. Right. In that case I think I'm fine with just closing this one too. It's not causing issues for me on a day-to-day basis, only on a = completely clean setup, and I honestly don't think too many programmers = are using Emacs that way. -- Jostein= From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 06:12:46 2024 Received: (at 72184-done) by debbugs.gnu.org; 17 Aug 2024 10:12:47 +0000 Received: from localhost ([127.0.0.1]:53574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfGQQ-0003mE-GW for submit@debbugs.gnu.org; Sat, 17 Aug 2024 06:12:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfGQO-0003m0-9B for 72184-done@debbugs.gnu.org; Sat, 17 Aug 2024 06:12:44 -0400 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 1sfGPe-000173-Ni; Sat, 17 Aug 2024 06:11:58 -0400 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=SpN6D9atihJyKmXqdI1SOXeEkN7rX/FEVQDeiWOPat4=; b=gdQSJS/acXMfvt9R4Rat 6iHEcsF0BOXJWNi4B97x/yNUqkN/NNqdFr5/3y7fV5j4szzj5hLjIKcu1lKsiMeVaOdB7ExYZcMVF 0LyYhDsS24fHq4P3be0KkS6aYvYScz7P/ELW51EfO70/M8yaZuhqZgHU9DTJX5xPN/Lnzl16nf46C DoW1nGDyfgXZsMdBD+bwlEtJ6vWGRkixc4EwPgY71yah831HI+AX1dLxky6/Vt6y6iuwHO7lG8zV0 bIIot//yHJMA6eOwP2QdS8RQ2UjyLSRdYJbip7oLB1O9XIXJlh4u/o6m4ptJ93jTS7x3X0mfdzdRc Y9f9QOcaiwf+7Q==; Date: Sat, 17 Aug 2024 13:11:56 +0300 Message-Id: <86le0v31cj.fsf@gnu.org> From: Eli Zaretskii To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= In-Reply-To: <202D18E7-3CA6-4D5D-A3BD-0E0DF2B88056@secure.kjonigsen.net> (message from Jostein =?utf-8?Q?Kj=C3=B8nigsen?= on Thu, 15 Aug 2024 12:03:25 +0200) Subject: Re: bug#72184: 31.0.50; typescript-ts-mode does not bind RET to newline-and-indent References: <31020dbe-3268-47e3-94c9-8c7acef452fd@gutov.dev> <8634nv2tcq.fsf@gnu.org> <5088180E-50DC-4374-B7F3-78DA6244291C@secure.kjonigsen.net> <202D18E7-3CA6-4D5D-A3BD-0E0DF2B88056@secure.kjonigsen.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72184-done Cc: dmitry@gutov.dev, casouri@gmail.com, acorallo@gnu.org, theo@thornhill.no, 72184-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: -3.3 (---) > From: Jostein Kjønigsen > Date: Thu, 15 Aug 2024 12:03:25 +0200 > Cc: Eli Zaretskii , > acorallo@gnu.org, > 72184@debbugs.gnu.org, > Yuan Fu , > Theodor Thornhill > > > > On 1 Aug 2024, at 02:42, Dmitry Gutov wrote: > > > > Hi Jostein, > > > > > > We've seen this before - take a look at https://debbugs.gnu.org/62717, for example. > > > > In short, some ad-hoc counter-measures can and sometimes are added (proposals welcome), but ultimately when we know we can't reliably distinguish problem situations, or can only detect a minor fraction of them, we're also okay giving up and recommending people use electric-pair-mode for better experience. > > Right. In that case I think I'm fine with just closing this one too. > > It's not causing issues for me on a day-to-day basis, only on a completely clean setup, and I honestly don't think too many programmers are using Emacs that way. OK, closing. From unknown Sun Sep 21 00:09:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 14 Sep 2024 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator