GNU bug report logs - #67556
29.1; java-ts-mode doesn't indent open curly brackets properly

Previous Next

Package: emacs;

Reported by: Spencer Pavkovic <spavkov <at> ilstu.edu>

Date: Fri, 1 Dec 2023 01:35:02 UTC

Severity: normal

Found in version 29.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

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 67556 in the body.
You can then email your comments to 67556 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#67556; Package emacs. (Fri, 01 Dec 2023 01:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Spencer Pavkovic <spavkov <at> ilstu.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 01 Dec 2023 01:35:02 GMT) Full text and rfc822 format available.

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

From: Spencer Pavkovic <spavkov <at> ilstu.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; java-ts-mode doesn't indent open curly brackets properly
Date: Thu, 30 Nov 2023 16:28:11 -0600
If you are in java-ts-mode, attempting to put an opening curly bracket
'{' on it's own line will not indent the bracket at all.

While I expect it to place the bracket on the same indent level as the
block (like regular java-mode), it is always far left with 0 tabs.

I did run with emacs -Q and the same thing happened.

// EXPECTED
public class Thing
{
     public Thing()
     {
         try
         {
             // stuff
         } catch (Exception e)
         {
             // stuff
         }
     }
}

// ACTUAL
public class Thing
{
     public Thing()
{
         try
{
             // stuff
         } catch (Exception e)
{
             // other stuff
         }
    }
}
In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.17.8) of 2023-11-15 built on localhost
Windowing system distributor 'The X.Org Foundation', version 11.0.12101009
System Description: Gentoo Linux

Configured using:
'configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --datarootdir=/usr/share
--disable-silent-rules --docdir=/usr/share/doc/emacs-29.1-r5
--htmldir=/usr/share/doc/emacs-29.1-r5/html --libdir=/usr/lib64
--program-suffix=-emacs-29 --includedir=/usr/include/emacs-29
--infodir=/usr/share/info/emacs-29 --localstatedir=/var
--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
--without-compress-install --without-hesiod --without-pop
--with-file-notification=inotify --with-pdumper --enable-acl
--without-dbus --with-modules --without-gameuser --with-libgmp
--without-gpm --with-native-compilation=aot --with-json
--without-kerberos --without-kerberos5 --without-lcms2 --with-xml2
--without-mailutils --without-selinux --without-small-ja-dic
--without-sqlite3 --with-gnutls --without-libsystemd --with-threads
--with-tree-sitter --without-wide-int --with-sound=no --with-zlib
--with-x --without-pgtk --without-ns --without-gconf
--without-gsettings --without-toolkit-scroll-bars --with-xpm --with-xft
--with-cairo --with-harfbuzz --without-libotf --without-m17n-flt
--with-x-toolkit=lucid --with-xaw3d --with-gif --with-jpeg --with-png
--with-rsvg --without-tiff --without-webp --with-imagemagick
--with-dumping=pdumper 'CFLAGS=-O2 -march=native -pipe'
'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,--as-needed''

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ IMAGEMAGICK JPEG JSON
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
THREADS TREE_SITTER X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
value of $LANG: en_US.utf8
locale-coding-system: utf-8-unix

Major mode: Outline

Minor modes in effect:
goto-address-mode: t
flyspell-mode: t
shell-dirtrack-mode: t
server-mode: t
rainbow-mode: t
yas-global-mode: t
yas-minor-mode: t
global-ligature-mode: t
ligature-mode: t
marginalia-mode: t
vertico-mode: t
which-key-mode: t
delete-selection-mode: t
recentf-mode: t
global-paren-face-mode: t
global-hungry-delete-mode: t
hungry-delete-mode: t
minibuffer-depth-indicate-mode: t
electric-pair-mode: t
global-hl-line-mode: t
whitespace-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
global-prettify-symbols-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
view-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug goto-addr flyspell ispell noutline
outline view jka-compr find-func shortdoc cc-langs cl-print ibuffer
ibuffer-loaddefs help-fns radix-tree java-ts-mode cc-mode-expansions
cc-mode cc-fonts cc-guess cc-menus cc-cmds expand-region
text-mode-expansions er-basic-expansions expand-region-core
expand-region-custom sh-script smie executable files-x compile misearch
multi-isearch smart-tabs-mode advice display-line-numbers elpaca-log
elpaca-ui macros mule-util c-ts-mode c-ts-common treesit edmacro kmacro
eat term ehelp shell pcomplete comint ansi-osc dired-aux vc-git
diff-mode vc-dispatcher parse-time iso8601 server company-oddmuse
company-keywords company-etags etags fileloop xref project ring
company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb company rainbow-mode ansi-color color
disp-table pcase yasnippet ligature marginalia vertico which-key
elfeed-show elfeed-search message sendmail yank-media rfc822 mml mml-sec
epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader shr pixel-fill
kinsoku puny svg dom elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db
elfeed-lib time-date avl-tree generator url-queue url-file browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap xml-query xml
yasnippet-autoloads company-autoloads tuareg-autoloads caml-autoloads
geiser-chicken-autoloads geiser-autoloads haskell-mode-autoloads
ligature-autoloads smart-tabs-mode-autoloads consult-autoloads
marginalia-autoloads vertico-autoloads which-key-autoloads
elfeed-autoloads diminish bookmark text-property-search pp time delsel
dashboard dashboard-widgets recentf tree-widget wid-edit ffap thingatpt
url-parse auth-source eieio eieio-core password-cache json map byte-opt
url-vars paren-face compat hungry-delete dashboard-autoloads
paren-face-autoloads rainbow-mode-autoloads expand-region-autoloads
magit-section-autoloads git-commit-autoloads with-editor-autoloads
magit-autoloads dash-autoloads hungry-delete-autoloads eat-autoloads
compat-autoloads ef-cherie-theme ef-themes diminish-autoloads
ef-themes-autoloads mb-depth elec-pair cc-styles cc-align cc-engine
cc-vars cc-defs hl-line comp comp-cstr warnings icons subr-x rx cl-extra
help-mode bytecomp byte-compile whitespace dired dired-loaddefs bind-key
easy-mmode cl-seq cl-macs gv elpaca elpaca-process cl-loaddefs cl-lib
elpaca-autoloads site-gentoo 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 inotify dynamic-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 696666 66035)
(symbols 48 30314 3)
(strings 32 243685 4935)
(string-bytes 1 6134869)
(vectors 16 59205)
(vector-slots 8 1611748 182263)
(floats 8 2492 2500)
(intervals 56 18212 16)
(buffers 984 30))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 09 Dec 2023 08:27:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Pavkovic <spavkov <at> ilstu.edu>, Yuan Fu <casouri <at> gmail.com>,
 Theodor Thornhill <theo <at> thornhill.no>
Cc: 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1;
 java-ts-mode doesn't indent open curly brackets properly
Date: Sat, 09 Dec 2023 10:26:22 +0200
> Date: Thu, 30 Nov 2023 16:28:11 -0600
> From:  Spencer Pavkovic via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> If you are in java-ts-mode, attempting to put an opening curly bracket
> '{' on it's own line will not indent the bracket at all.
> 
> While I expect it to place the bracket on the same indent level as the
> block (like regular java-mode), it is always far left with 0 tabs.
> 
> I did run with emacs -Q and the same thing happened.
> 
> // EXPECTED
> public class Thing
> {
>       public Thing()
>       {
>           try
>           {
>               // stuff
>           } catch (Exception e)
>           {
>               // stuff
>           }
>       }
> }
> 
> // ACTUAL
> public class Thing
> {
>       public Thing()
> {
>           try
> {
>               // stuff
>           } catch (Exception e)
> {
>               // other stuff
>           }
>      }
> }

Yuan and Theo, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 09 Dec 2023 16:41:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, 67556 <at> debbugs.gnu.org,
 Yuan Fu <casouri <at> gmail.com>
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly
 brackets properly
Date: Sat, 09 Dec 2023 17:40:12 +0100
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 09 Dec 2023 17:10:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly
 brackets properly
Date: Sat, 09 Dec 2023 19:08:52 +0200
> Date: Sat, 09 Dec 2023 17:40:12 +0100
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, Yuan Fu <casouri <at> gmail.com>,
>  67556 <at> debbugs.gnu.org
> 
>  Yuan and Theo, any comments? 
> 
> This can be supported, but no Java code is indented like this, though. But it could make sense to
> support at least _some_ indentation here. I can take a look at this tonight!

Thanks, please do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sun, 10 Dec 2023 09:58:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Theodor Thornhill <theo <at> thornhill.no>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sun, 10 Dec 2023 01:56:55 -0800

On 12/9/23 8:40 AM, Theodor Thornhill wrote:
>
>
> On Dec 9, 2023 09:26, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>     > Date: Thu, 30 Nov 2023 16:28:11 -0600
>     > From:  Spencer Pavkovic via "Bug reports for GNU Emacs,
>     >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>     >
>     > If you are in java-ts-mode, attempting to put an opening curly
>     bracket
>     > '{' on it's own line will not indent the bracket at all.
>     >
>     > While I expect it to place the bracket on the same indent level
>     as the
>     > block (like regular java-mode), it is always far left with 0 tabs.
>     >
>     > I did run with emacs -Q and the same thing happened.
>     >
>     > // EXPECTED
>     > public class Thing
>     > {
>     >       public Thing()
>     >       {
>     >           try
>     >           {
>     >               // stuff
>     >           } catch (Exception e)
>     >           {
>     >               // stuff
>     >           }
>     >       }
>     > }
>     >
>     > // ACTUAL
>     > public class Thing
>     > {
>     >       public Thing()
>     > {
>     >           try
>     > {
>     >               // stuff
>     >           } catch (Exception e)
>     > {
>     >               // other stuff
>     >           }
>     >      }
>     > }
>
>     Yuan and Theo, any comments?
>
> This can be supported, but no Java code is indented like this, though. 
> But it could make sense to support at least _some_ indentation here. I 
> can take a look at this tonight!
>
> Thanks for the ping :)
> Theo

Thank you Theo. I'll leave this to you.

Yuan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 16 Dec 2023 11:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: theo <at> thornhill.no, Yuan Fu <casouri <at> gmail.com>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sat, 16 Dec 2023 13:56:59 +0200
Theo, any progress?  This bug is one of those which I'd like to
resolve before releasing Emacs 29.2.  Could you please look into this?

Thanks.

> Date: Sun, 10 Dec 2023 01:56:55 -0800
> Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, 67556 <at> debbugs.gnu.org
> From: Yuan Fu <casouri <at> gmail.com>
> 
> 
> 
> On 12/9/23 8:40 AM, Theodor Thornhill wrote:
> >
> >
> > On Dec 9, 2023 09:26, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >     > Date: Thu, 30 Nov 2023 16:28:11 -0600
> >     > From:  Spencer Pavkovic via "Bug reports for GNU Emacs,
> >     >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >     >
> >     > If you are in java-ts-mode, attempting to put an opening curly
> >     bracket
> >     > '{' on it's own line will not indent the bracket at all.
> >     >
> >     > While I expect it to place the bracket on the same indent level
> >     as the
> >     > block (like regular java-mode), it is always far left with 0 tabs.
> >     >
> >     > I did run with emacs -Q and the same thing happened.
> >     >
> >     > // EXPECTED
> >     > public class Thing
> >     > {
> >     >       public Thing()
> >     >       {
> >     >           try
> >     >           {
> >     >               // stuff
> >     >           } catch (Exception e)
> >     >           {
> >     >               // stuff
> >     >           }
> >     >       }
> >     > }
> >     >
> >     > // ACTUAL
> >     > public class Thing
> >     > {
> >     >       public Thing()
> >     > {
> >     >           try
> >     > {
> >     >               // stuff
> >     >           } catch (Exception e)
> >     > {
> >     >               // other stuff
> >     >           }
> >     >      }
> >     > }
> >
> >     Yuan and Theo, any comments?
> >
> > This can be supported, but no Java code is indented like this, though. 
> > But it could make sense to support at least _some_ indentation here. I 
> > can take a look at this tonight!
> >
> > Thanks for the ping :)
> > Theo
> 
> Thank you Theo. I'll leave this to you.
> 
> Yuan
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 23 Dec 2023 09:05:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: theo <at> thornhill.no
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#67556: 29.1;
 java-ts-mode doesn't indent open curly brackets properly
Date: Sat, 23 Dec 2023 11:04:10 +0200
Ping! Ping!  Theo, please chime in.

> Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> Date: Sat, 16 Dec 2023 13:56:59 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Theo, any progress?  This bug is one of those which I'd like to
> resolve before releasing Emacs 29.2.  Could you please look into this?
> 
> Thanks.
> 
> > Date: Sun, 10 Dec 2023 01:56:55 -0800
> > Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, 67556 <at> debbugs.gnu.org
> > From: Yuan Fu <casouri <at> gmail.com>
> > 
> > 
> > 
> > On 12/9/23 8:40 AM, Theodor Thornhill wrote:
> > >
> > >
> > > On Dec 9, 2023 09:26, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > >
> > >     > Date: Thu, 30 Nov 2023 16:28:11 -0600
> > >     > From:  Spencer Pavkovic via "Bug reports for GNU Emacs,
> > >     >  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> > >     >
> > >     > If you are in java-ts-mode, attempting to put an opening curly
> > >     bracket
> > >     > '{' on it's own line will not indent the bracket at all.
> > >     >
> > >     > While I expect it to place the bracket on the same indent level
> > >     as the
> > >     > block (like regular java-mode), it is always far left with 0 tabs.
> > >     >
> > >     > I did run with emacs -Q and the same thing happened.
> > >     >
> > >     > // EXPECTED
> > >     > public class Thing
> > >     > {
> > >     >       public Thing()
> > >     >       {
> > >     >           try
> > >     >           {
> > >     >               // stuff
> > >     >           } catch (Exception e)
> > >     >           {
> > >     >               // stuff
> > >     >           }
> > >     >       }
> > >     > }
> > >     >
> > >     > // ACTUAL
> > >     > public class Thing
> > >     > {
> > >     >       public Thing()
> > >     > {
> > >     >           try
> > >     > {
> > >     >               // stuff
> > >     >           } catch (Exception e)
> > >     > {
> > >     >               // other stuff
> > >     >           }
> > >     >      }
> > >     > }
> > >
> > >     Yuan and Theo, any comments?
> > >
> > > This can be supported, but no Java code is indented like this, though. 
> > > But it could make sense to support at least _some_ indentation here. I 
> > > can take a look at this tonight!
> > >
> > > Thanks for the ping :)
> > > Theo
> > 
> > Thank you Theo. I'll leave this to you.
> > 
> > Yuan
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Thu, 28 Dec 2023 08:02:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly
 brackets properly
Date: Thu, 28 Dec 2023 09:01:24 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Ping! Ping!  Theo, please chime in.
>

Hi, sorry - holidays came crashing in, halting everything but family for
a while.

I had a quick glance when the bug was reported, but the fix wasn't super
simple. I'm looking at it now :)

Sorry for the delay, and thanks for the ping!

Should this go on master or emacs-29?

Theo

>> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Thu, 28 Dec 2023 08:07:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly
 brackets properly
Date: Thu, 28 Dec 2023 10:05:56 +0200
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: casouri <at> gmail.com, spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> Date: Thu, 28 Dec 2023 09:01:24 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Ping! Ping!  Theo, please chime in.
> >
> 
> Hi, sorry - holidays came crashing in, halting everything but family for
> a while.
> 
> I had a quick glance when the bug was reported, but the fix wasn't super
> simple. I'm looking at it now :)

Thanks!

> Should this go on master or emacs-29?

Preferably to emacs-29, unless you conclude that a fix is too risky
for the release branch.




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

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: theo <at> thornhill.no
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#67556: 29.1;
 java-ts-mode doesn't indent open curly brackets properly
Date: Tue, 09 Jan 2024 22:00:48 +0200
> Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
> Date: Thu, 28 Dec 2023 10:05:56 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Theodor Thornhill <theo <at> thornhill.no>
> > Cc: casouri <at> gmail.com, spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> > Date: Thu, 28 Dec 2023 09:01:24 +0100
> > 
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> > 
> > > Ping! Ping!  Theo, please chime in.
> > >
> > 
> > Hi, sorry - holidays came crashing in, halting everything but family for
> > a while.
> > 
> > I had a quick glance when the bug was reported, but the fix wasn't super
> > simple. I'm looking at it now :)
> 
> Thanks!
> 
> > Should this go on master or emacs-29?
> 
> Preferably to emacs-29, unless you conclude that a fix is too risky
> for the release branch.

Ping!  Any progress here?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 20 Jan 2024 09:08:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: theo <at> thornhill.no, casouri <at> gmail.com
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1;
 java-ts-mode doesn't indent open curly brackets properly
Date: Sat, 20 Jan 2024 11:06:45 +0200
Ping! Ping! Can we please make some progress here?

> Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
> Date: Tue, 09 Jan 2024 22:00:48 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
> > Date: Thu, 28 Dec 2023 10:05:56 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > > From: Theodor Thornhill <theo <at> thornhill.no>
> > > Cc: casouri <at> gmail.com, spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> > > Date: Thu, 28 Dec 2023 09:01:24 +0100
> > > 
> > > Eli Zaretskii <eliz <at> gnu.org> writes:
> > > 
> > > > Ping! Ping!  Theo, please chime in.
> > > >
> > > 
> > > Hi, sorry - holidays came crashing in, halting everything but family for
> > > a while.
> > > 
> > > I had a quick glance when the bug was reported, but the fix wasn't super
> > > simple. I'm looking at it now :)
> > 
> > Thanks!
> > 
> > > Should this go on master or emacs-29?
> > 
> > Preferably to emacs-29, unless you conclude that a fix is too risky
> > for the release branch.
> 
> Ping!  Any progress here?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sun, 11 Feb 2024 08:56:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: theo <at> thornhill.no, casouri <at> gmail.com
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1;
 java-ts-mode doesn't indent open curly brackets properly
Date: Sun, 11 Feb 2024 10:43:10 +0200
Ping! Ping! Ping! Yuan and Theo, could you please chime in?

> Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> Date: Sat, 20 Jan 2024 11:06:45 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping! Ping! Can we please make some progress here?
> 
> > Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
> > Date: Tue, 09 Jan 2024 22:00:48 +0200
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > > Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com
> > > Date: Thu, 28 Dec 2023 10:05:56 +0200
> > > From: Eli Zaretskii <eliz <at> gnu.org>
> > > 
> > > > From: Theodor Thornhill <theo <at> thornhill.no>
> > > > Cc: casouri <at> gmail.com, spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> > > > Date: Thu, 28 Dec 2023 09:01:24 +0100
> > > > 
> > > > Eli Zaretskii <eliz <at> gnu.org> writes:
> > > > 
> > > > > Ping! Ping!  Theo, please chime in.
> > > > >
> > > > 
> > > > Hi, sorry - holidays came crashing in, halting everything but family for
> > > > a while.
> > > > 
> > > > I had a quick glance when the bug was reported, but the fix wasn't super
> > > > simple. I'm looking at it now :)
> > > 
> > > Thanks!
> > > 
> > > > Should this go on master or emacs-29?
> > > 
> > > Preferably to emacs-29, unless you conclude that a fix is too risky
> > > for the release branch.
> > 
> > Ping!  Any progress here?
> > 
> > 
> > 
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sun, 11 Feb 2024 22:44:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>, theo <at> thornhill.no, casouri <at> gmail.com
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Mon, 12 Feb 2024 00:42:50 +0200
[Message part 1 (text/plain, inline)]
On 11/02/2024 10:43, Eli Zaretskii wrote:
> Ping! Ping! Ping! Yuan and Theo, could you please chime in?

Here's a minimal patch, consisting of a new rule and a couple of 
replacements where the new standalone-parent anchor is used instead of 
the helper c-ts-common-statement-offset.

Because the latter behaves differently when the opening curly is on a 
separate line, and we don't really want that.

A more finished change will likely either switch over to 
standalone-parent completely, or go back and revamp 
c-ts-common-statement-offset to avoid this distinction (despite the 
name, it only remains in use in java-ts-mode these days).

The former has been a simpler route so far, so I suggest we at least 
commit the attached.
[java-ts-mode-indent.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sun, 11 Feb 2024 22:46:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Theodor Thornhill <theo <at> thornhill.no>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Spencer Pavkovic <spavkov <at> ilstu.edu>, 67556 <at> debbugs.gnu.org,
 Yuan Fu <casouri <at> gmail.com>
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Mon, 12 Feb 2024 00:44:40 +0200
On 09/12/2023 18:40, Theodor Thornhill via Bug reports for GNU Emacs, 
the Swiss army knife of text editors wrote:
> This can be supported, but no Java code is indented like this, though.

At the very least, this style has been somewhat popular a decade ago 
when I last did Java.

Note that our Android port uses a somewhat similar style, though that 
one is more likely because the author likes the GNU C indentation.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 17 Feb 2024 08:36:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com,
 theo <at> thornhill.no
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sat, 17 Feb 2024 10:35:25 +0200
> Date: Mon, 12 Feb 2024 00:42:50 +0200
> Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> On 11/02/2024 10:43, Eli Zaretskii wrote:
> > Ping! Ping! Ping! Yuan and Theo, could you please chime in?
> 
> Here's a minimal patch, consisting of a new rule and a couple of 
> replacements where the new standalone-parent anchor is used instead of 
> the helper c-ts-common-statement-offset.
> 
> Because the latter behaves differently when the opening curly is on a 
> separate line, and we don't really want that.
> 
> A more finished change will likely either switch over to 
> standalone-parent completely, or go back and revamp 
> c-ts-common-statement-offset to avoid this distinction (despite the 
> name, it only remains in use in java-ts-mode these days).
> 
> The former has been a simpler route so far, so I suggest we at least 
> commit the attached.

No further comments, so I suggest that you install this on master.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 17 Feb 2024 13:32:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com,
 theo <at> thornhill.no
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sat, 17 Feb 2024 15:31:19 +0200
On 17/02/2024 10:35, Eli Zaretskii wrote:
> No further comments, so I suggest that you install this on master.

Not emacs-29? It seems like we fix a serious omission here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67556; Package emacs. (Sat, 17 Feb 2024 13:59:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: spavkov <at> ilstu.edu, 67556 <at> debbugs.gnu.org, casouri <at> gmail.com,
 theo <at> thornhill.no
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sat, 17 Feb 2024 15:56:04 +0200
> Date: Sat, 17 Feb 2024 15:31:19 +0200
> Cc: theo <at> thornhill.no, casouri <at> gmail.com, spavkov <at> ilstu.edu,
>  67556 <at> debbugs.gnu.org
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> On 17/02/2024 10:35, Eli Zaretskii wrote:
> > No further comments, so I suggest that you install this on master.
> 
> Not emacs-29? It seems like we fix a serious omission here.

I didn't realize this is a bug in Emacs 29.  Then emacs-29 is fine,
thanks.




Reply sent to Dmitry Gutov <dmitry <at> gutov.dev>:
You have taken responsibility. (Sat, 17 Feb 2024 20:38:02 GMT) Full text and rfc822 format available.

Notification sent to Spencer Pavkovic <spavkov <at> ilstu.edu>:
bug acknowledged by developer. (Sat, 17 Feb 2024 20:38:02 GMT) Full text and rfc822 format available.

Message #58 received at 67556-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: spavkov <at> ilstu.edu, 67556-done <at> debbugs.gnu.org, casouri <at> gmail.com,
 theo <at> thornhill.no
Subject: Re: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets
 properly
Date: Sat, 17 Feb 2024 22:36:49 +0200
On 17/02/2024 15:56, Eli Zaretskii wrote:
>> Date: Sat, 17 Feb 2024 15:31:19 +0200
>> Cc: theo <at> thornhill.no, casouri <at> gmail.com, spavkov <at> ilstu.edu,
>>   67556 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dmitry <at> gutov.dev>
>>
>> On 17/02/2024 10:35, Eli Zaretskii wrote:
>>> No further comments, so I suggest that you install this on master.
>>
>> Not emacs-29? It seems like we fix a serious omission here.
> 
> I didn't realize this is a bug in Emacs 29.  Then emacs-29 is fine,
> thanks.

Thanks. Now installed, with a couple more tweaks and a new indentation test.




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

This bug report was last modified 131 days ago.

Previous Next


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