GNU bug report logs - #71992
30.0.60; major-mode-remap-alist doesn't work for combination js-mode + js-ts-mode

Previous Next

Package: emacs;

Reported by: Roman Rudakov <rrudakov <at> fastmail.com>

Date: Mon, 8 Jul 2024 08:15:02 UTC

Severity: normal

Found in version 30.0.60

Done: Jeremy Bryant <jb <at> jeremybryant.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71992 in the body.
You can then email your comments to 71992 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71992; Package emacs. (Mon, 08 Jul 2024 08:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roman Rudakov <rrudakov <at> fastmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 08 Jul 2024 08:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roman Rudakov <rrudakov <at> fastmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.60; major-mode-remap-alist doesn't work for combination
 js-mode + js-ts-mode
Date: Mon, 08 Jul 2024 10:13:56 +0200
1. Evaluate: (setopt major-mode-remap-alist '((js-mode . js-ts-mode)))
2. C-x C-f ~/tmp.js

Expected result:

major-mode is js-ts-mode

Actual result:

major-mode is js-mode


In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
Romans-MBP.home
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.5

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
--infodir=/opt/homebrew/Cellar/emacs-plus <at> 30/30.0.60/share/info/emacs
--prefix=/opt/homebrew/Cellar/emacs-plus <at> 30/30.0.60 --with-xml2
--with-gnutls --with-native-compilation --without-compress-install
--without-dbus --without-imagemagick --with-modules --with-rsvg
--with-webp --without-pop --with-ns --disable-ns-self-contained
'CFLAGS=-Os -w -pipe -mmacosx-version-min=14
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT
-I/opt/homebrew/opt/gcc/include 
-I/opt/homebrew/opt/libgccjit/include'
'CPPFLAGS=-I/opt/homebrew/opt/zlib/include
-I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/icu4c/include
-I/opt/homebrew/opt/sqlite/include 
-I/opt/homebrew/opt/readline/include
-isystem/opt/homebrew/include -F/opt/homebrew/Frameworks
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
'LDFLAGS=-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib
-L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/sqlite/lib
-L/opt/homebrew/opt/readline/lib -L/opt/homebrew/lib
-F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
-L/opt/homebrew/lib/gcc/14 -I/opt/homebrew/opt/gcc/include
-I/opt/homebrew/opt/libgccjit/include''
Configured features:
ACL GIF GLIB GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY
KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM ZLIB
Important settings:
 value of $LANG: en_US.UTF-8
 locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
 corfu-popupinfo-mode: t
 pdf-occur-global-minor-mode: t
 erc-track-mode: t
 erc-ring-mode: t
 erc-netsplit-mode: t
 erc-menu-mode: t
 erc-match-mode: t
 erc-log-mode: t
 erc-list-mode: t
 erc-irccontrols-mode: t
 erc-noncommands-mode: t
 erc-move-to-prompt-mode: t
 erc-readonly-mode: t
 erc-button-mode: t
 erc-fill-mode: t
 erc-stamp-mode: t
 erc-autojoin-mode: t
 erc-autoaway-mode: t
 erc-networks-mode: t
 mu4e-column-faces-mode: t
 mu4e-modeline-mode: t
 TeX-PDF-mode: t
 csv-field-index-mode: t
 auto-insert-mode: t
 flymake-mode: t
 idle-highlight-mode: t
 hl-todo-mode: t
 yas-minor-mode: t
 electric-pair-mode: t
 global-git-commit-mode: t
 magit-auto-revert-mode: t
 server-mode: t
 org-roam-db-autosync-mode: t
 global-corfu-mode: t
 corfu-mode: t
 fido-vertical-mode: t
 icomplete-vertical-mode: t
 icomplete-mode: t
 fido-mode: t
 minions-mode: t
 repeat-mode: t
 outline-minor-mode: t
 save-place-mode: t
 savehist-mode: t
 subword-mode: t
 recentf-mode: t
 global-auto-revert-mode: t
 global-hl-line-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
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 window-divider-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/rrudakov/.config/emacs/elpa/ef-themes-1.7.0/theme-loaddefs 
hides 
/Users/rrudakov/.config/emacs/elpa/modus-themes-4.4.0/theme-loaddefs
/Users/rrudakov/.config/emacs/elpa/password-store-20231201.954/password-store 
hides /opt/homebrew/share/emacs/site-lisp/pass/password-store
/Users/rrudakov/.config/emacs/elpa/ef-themes-1.7.0/theme-loaddefs 
hides 
/opt/homebrew/Cellar/emacs-plus <at> 30/30.0.60/share/emacs/30.0.60/lisp/theme-loaddefs

Features:
(shadow face-remap mail-extr emacsbug tramp-cmds cursor-sensor 
cus-start
checkdoc corfu-popupinfo github org-git ghub-graphql treepy gsexp ghub
url-http url-gw nsm url-auth google-translate-smooth-ui
google-translate-core-ui popup google-translate-core
google-translate-backend use-package-ensure password-store-otp
password-store auth-source-pass nov esxml-query pdf-occur tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc pdf-tools pdf-view jka-compr pdf-cache pdf-info tq
pdf-util pdf-macs ob-restclient restclient elfeed-show elfeed-search
elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib 
xml-query
erc-track erc-ring erc-netsplit erc-menu erc-match erc-log erc-list
erc-goodies erc-pcomplete erc-button erc-fill erc-stamp erc-join
erc-autoaway erc erc-backend erc-networks erc-common erc-compat
erc-loaddefs mu4e-column-faces mu4e-icalendar gnus-icalendar icalendar
mu4e mu4e-org mu4e-notification mu4e-main smtpmail mu4e-view
mu4e-mime-parts mu4e-headers mu4e-thread mu4e-actions mu4e-compose
mu4e-draft gnus-msg mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark
mu4e-message flow-fill mu4e-contacts mu4e-update mu4e-folders
mu4e-context mu4e-query-items mu4e-server mu4e-modeline mu4e-vars
mu4e-helpers mu4e-config mu4e-window ido mu4e-obsolete rust-ts-mode
dockerfile-ts-mode lua-mode groovy-mode yaml-ts-mode haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme 
haskell-align-imports
haskell-complete-module haskell-ghc-support flymake-proc etags 
fileloop
dabbrev haskell-customize latex-mode-expansions latex latex-flymake
tex-ispell tex-style font-latex tex texmathp pip-requirements pyvenv
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-module-loaddefs esh-util css-mode-expansions css-mode eww 
url-queue
mm-url web-mode-expansions web-mode typescript-ts-mode
add-node-modules-path s js-mode-expansions js cc-mode-expansions 
cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine 
cc-vars
cc-defs prettier-js hippie-exp tempo clojure-mode-expansions
clj-refactor hydra lv inflections paredit cider tramp-sh cider-debug
cider-browse-ns cider-mode cider-xref-backend cider-find 
cider-inspector
cider-completion cider-profile cider-eval cider-jar arc-mode
archive-mode cider-repl-history pulse cider-repl cider-resolve
cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec
cider-clojuredocs cider-eldoc cider-docstring cider-client 
cider-common
cider-completion-context cider-connection cider-popup sesman-browser
nrepl-client cider-util sesman queue nrepl-dict spinner parseedn
parseclj-parser parseclj-lex parseclj-alist clojure-mode lisp-mnt 
align
java-ts-mode c-ts-common sqlformat sql-indent sql view pkgbuild-mode
logview datetime extmap bindat vlf-setup vlf vlf-base vlf-tune 
csv-mode
sort nginx-mode vimrc-mode ssh-config-mode xml-format reformatter
nxml-mode-expansions rng-nxml rng-valid nxml-mode nxml-outln nxml-rap
html-mode-expansions sgml-mode facemenu markdown-mode edit-indirect
color eglot external-completion jsonrpc ert ewoc debug backtrace
google-c-style autoinsert flymake-kondor flymake idle-highlight-mode
hl-todo yasnippet rg vc vc-dispatcher rg-info-hack rg-menu rg-ibuffer
rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext grep
flyspell-correct expand-region subword-mode-expansions
text-mode-expansions the-org-mode-expansions
python-el-fgallina-expansions er-basic-expansions expand-region-core
expand-region-custom multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop 
mc-mark-more
mc-cycle-cursors mc-edit-lines multiple-cursors-core elec-pair 
git-link
gitignore-templates magit-bookmark magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push 
magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
magit-margin magit-transient magit-process with-editor server 
magit-mode
transient edmacro kmacro magit-git magit-utils crm comp comp-cstr
warnings org-roam-migrate org-roam-log org-roam-mode org-roam-capture
org-roam-id org-roam-node org-roam-db emacsql-sqlite-builtin sqlite
org-roam-utils org-roam-compat org-roam org-capture org-attach
emacsql-sqlite emacsql-sqlite-common emacsql emacsql-compiler
magit-section async ob-async ob-plantuml ob-ditaa ob-clojure 
ob-haskell
ob-sqlite ob-shell ob-sql ob-python python pcase org-clock 
org-duration
comp-run comp-common oc-basic bibtex disp-table ol-info ol-gnus 
nnselect
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum
shr-tag-pre-highlight language-detection shr pixel-fill kinsoku 
url-file
svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap
nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message
sendmail yank-media rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util
mail-prsvr appt diary-lib diary-loaddefs ox-jira ox-slack ox-gfm ox-md
ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn
nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar
ox-html table ox-ascii ox-publish ox org-agenda org-element 
org-persist
org-id org-element-ast inline avl-tree generator org-refile
modus-vivendi-tinted-theme modus-themes org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src sh-script smie treesit executable
ob-comint org-pcomplete org-list org-footnote org-faces org-entities
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 org-version
org-compat org-macs alert log4e notifications dbus xml gntp
exec-path-from-shell cape corfu icomplete minions compat repeat 
bookmark
hideshow noutline outline re-builder advice flyspell ispell calc
calc-loaddefs rect calc-macs cal-menu calendar cal-loaddefs
dired-subtree dired-hacks-utils dash dired-git-info image-dired
image-dired-tags image-dired-external image-dired-util dired-aux xref
project saveplace savehist compile text-property-search ediff 
ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
diff-mode track-changes easy-mmode cap-words superword subword ibuffer
ibuffer-loaddefs imenu epa derived epg rfc6068 epg-config recentf
tree-widget autorevert filenotify tramp trampver tramp-integration
files-x tramp-message tramp-compat xdg shell pcomplete comint ansi-osc
ring parse-time iso8601 time-date format-spec ansi-color 
tramp-loaddefs
image-mode dired dired-loaddefs exif conf-mode hl-line gnutls puny
novice cl-extra help-mode use-package-core finder-inf
add-node-modules-path-autoloads alert-autoloads auctex-autoloads
tex-site cape-autoloads clj-refactor-autoloads cider-autoloads
clojure-mode-autoloads corfu-autoloads csv-mode-autoloads
debbugs-autoloads dired-git-info-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads dtrt-indent-autoloads
edit-indirect-autoloads ef-themes-autoloads elfeed-autoloads
emacs-everywhere-autoloads exec-path-from-shell-autoloads
expand-region-autoloads flymake-kondor-autoloads
flyspell-correct-autoloads ghub-autoloads gif-screencast-autoloads
git-link-autoloads gitignore-templates-autoloads gntp-autoloads
google-c-style-autoloads google-translate-autoloads
groovy-mode-autoloads haskell-mode-autoloads hl-todo-autoloads
hydra-autoloads idle-highlight-mode-autoloads inflections-autoloads
log4e-autoloads logview-autoloads datetime-autoloads extmap-autoloads
lua-mode-autoloads lv-autoloads magit-autoloads git-commit-autoloads
markdown-mode-autoloads minions-autoloads modus-themes-autoloads
mu4e-column-faces-autoloads multiple-cursors-autoloads
nginx-mode-autoloads nov-autoloads esxml-autoloads kv-autoloads
ob-async-autoloads async-autoloads ob-restclient-autoloads
org-roam-autoloads magit-section-autoloads emacsql-autoloads
org-tree-slide-autoloads ox-jira-autoloads ox-slack-autoloads
ox-gfm-autoloads paredit-autoloads parseedn-autoloads 
parseclj-autoloads
password-store-otp-autoloads password-store-autoloads
pdf-tools-autoloads pip-requirements-autoloads rx
pkgbuild-mode-autoloads plantuml-mode-autoloads dash-autoloads
popup-autoloads prettier-js-autoloads pyvenv-autoloads queue-autoloads
rainbow-mode-autoloads restclient-autoloads rg-autoloads s-autoloads
sesman-autoloads shr-tag-pre-highlight-autoloads
language-detection-autoloads sly-autoloads spinner-autoloads
sql-indent-autoloads sqlformat-autoloads ssh-config-mode-autoloads
tablist-autoloads telega-autoloads rainbow-identifiers-autoloads
treepy-autoloads vimrc-mode-autoloads visual-fill-column-autoloads
vlf-autoloads web-mode-autoloads wgrep-autoloads info
with-editor-autoloads xml-format-autoloads reformatter-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 password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cus-edit pp cus-load icons wid-edit
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 1182935 118223) (symbols 48 77853 8)
(strings 32 343811 24128) (string-bytes 1 10620732)
(vectors 16 312730) (vector-slots 8 2945571 75904)
(floats 8 91678 78) (intervals 56 1274 0) (buffers 992 16))

-- 
Best regards, Roman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71992; Package emacs. (Mon, 08 Jul 2024 21:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 71992 <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Roman Rudakov <rrudakov <at> fastmail.com>
Cc: 71992 <at> debbugs.gnu.org
Subject: Re: bug#71992: 30.0.60; major-mode-remap-alist doesn't work for
 combination js-mode + js-ts-mode
Date: Mon, 08 Jul 2024 22:37:50 +0100
Roman Rudakov <rrudakov <at> fastmail.com> writes:

> 1. Evaluate: (setopt major-mode-remap-alist '((js-mode . js-ts-mode)))
> 2. C-x C-f ~/tmp.js
>
> Expected result:
>
> major-mode is js-ts-mode
>
> Actual result:
>
> major-mode is js-mode
>
>
> In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
> appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
> Romans-MBP.home
> Windowing system distributor 'Apple', version 10.3.2487
> System Description:  macOS 14.5
>

FWIW, I've been able to reproduce this bug report in 30.0.60 and 29.4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71992; Package emacs. (Mon, 08 Jul 2024 23:57:01 GMT) Full text and rfc822 format available.

Message #11 received at 71992 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Jeremy Bryant <jb <at> jeremybryant.net>, Roman Rudakov
 <rrudakov <at> fastmail.com>, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 71992 <at> debbugs.gnu.org
Subject: Re: bug#71992: 30.0.60; major-mode-remap-alist doesn't work for
 combination js-mode + js-ts-mode
Date: Tue, 9 Jul 2024 02:55:48 +0300
On 09/07/2024 00:37, Jeremy Bryant via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Roman Rudakov<rrudakov <at> fastmail.com>  writes:
> 
>> 1. Evaluate: (setopt major-mode-remap-alist '((js-mode . js-ts-mode)))
>> 2. C-x C-f ~/tmp.js
>>
>> Expected result:
>>
>> major-mode is js-ts-mode
>>
>> Actual result:
>>
>> major-mode is js-mode
>>
>>
>> In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
>> appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
>> Romans-MBP.home
>> Windowing system distributor 'Apple', version 10.3.2487
>> System Description:  macOS 14.5
>>
> FWIW, I've been able to reproduce this bug report in 30.0.60 and 29.4

The reason might be that its auto-mode-alist entry references 
javascript-mode (and js-mode is made an alias in autoloads).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71992; Package emacs. (Tue, 09 Jul 2024 08:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 71992 <at> debbugs.gnu.org (full text, mbox):

From: Roman Rudakov <rrudakov <at> fastmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Jeremy Bryant <jb <at> jeremybryant.net>,
 Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 71992 <at> debbugs.gnu.org
Subject: Re: bug#71992: 30.0.60; major-mode-remap-alist doesn't work for
 combination js-mode + js-ts-mode
Date: Tue, 09 Jul 2024 10:51:43 +0200
Dmitry Gutov <dmitry <at> gutov.dev> writes:

> On 09/07/2024 00:37, Jeremy Bryant via Bug reports for GNU Emacs, 
> the
> Swiss army knife of text editors wrote:
>> Roman Rudakov<rrudakov <at> fastmail.com>  writes:
>> 
>>> 1. Evaluate: (setopt major-mode-remap-alist '((js-mode 
>>> . js-ts-mode)))
>>> 2. C-x C-f ~/tmp.js
>>>
>>> Expected result:
>>>
>>> major-mode is js-ts-mode
>>>
>>> Actual result:
>>>
>>> major-mode is js-mode
>>>
>>>
>>> In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
>>> appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
>>> Romans-MBP.home
>>> Windowing system distributor 'Apple', version 10.3.2487
>>> System Description:  macOS 14.5
>>>
>> FWIW, I've been able to reproduce this bug report in 30.0.60 and 
>> 29.4
>
> The reason might be that its auto-mode-alist entry references
> javascript-mode (and js-mode is made an alias in autoloads).

Indeed, adding (javascript-mode . js-ts-mode) entry to 
major-mode-remap-alist solves the problem.
-- 
Best regards, Roman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71992; Package emacs. (Tue, 09 Jul 2024 20:37:01 GMT) Full text and rfc822 format available.

Message #17 received at 71992 <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Roman Rudakov <rrudakov <at> fastmail.com>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, Stefan Monnier <monnier <at> IRO.UMontreal.CA>,
 71992-close <at> debbugs.gnu.org, 71992 <at> debbugs.gnu.org
Subject: Re: bug#71992: 30.0.60; major-mode-remap-alist doesn't work for
 combination js-mode + js-ts-mode
Date: Tue, 09 Jul 2024 21:35:41 +0100
Roman Rudakov <rrudakov <at> fastmail.com> writes:

> Dmitry Gutov <dmitry <at> gutov.dev> writes:
>
>> On 09/07/2024 00:37, Jeremy Bryant via Bug reports for GNU Emacs,
>> the
>> Swiss army knife of text editors wrote:
>>> Roman Rudakov<rrudakov <at> fastmail.com>  writes:
>>> 
>>>> 1. Evaluate: (setopt major-mode-remap-alist '((js-mode
>>>> . js-ts-mode)))
>>>> 2. C-x C-f ~/tmp.js
>>>>
>>>> Expected result:
>>>>
>>>> major-mode is js-ts-mode
>>>>
>>>> Actual result:
>>>>
>>>> major-mode is js-mode
>>>>
>>>>
>>>> In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
>>>> appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
>>>> Romans-MBP.home
>>>> Windowing system distributor 'Apple', version 10.3.2487
>>>> System Description:  macOS 14.5
>>>>
>>> FWIW, I've been able to reproduce this bug report in 30.0.60 and
>>> 29.4
>>
>> The reason might be that its auto-mode-alist entry references
>> javascript-mode (and js-mode is made an alias in autoloads).
>
> Indeed, adding (javascript-mode . js-ts-mode) entry to
> major-mode-remap-alist solves the problem.

Thanks Dmitry

On that basis I'm closing the bug.




Reply sent to Jeremy Bryant <jb <at> jeremybryant.net>:
You have taken responsibility. (Tue, 09 Jul 2024 20:37:02 GMT) Full text and rfc822 format available.

Notification sent to Roman Rudakov <rrudakov <at> fastmail.com>:
bug acknowledged by developer. (Tue, 09 Jul 2024 20:37:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 07 Aug 2024 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.