From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 16:19:51 2023 Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 21:19:51 +0000 Received: from localhost ([127.0.0.1]:34158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSPBu-0005iQ-I0 for submit@debbugs.gnu.org; Wed, 15 Feb 2023 16:19:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:44614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSPBs-0005iG-0L for submit@debbugs.gnu.org; Wed, 15 Feb 2023 16:19:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSPBq-000874-Ri for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 16:19:46 -0500 Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSPBm-0001gX-Vc for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 16:19:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1676495976; bh=cxVVtJc7XnI07+hqsh8Sv/TE9U8rvylhqObN8FBXnE4=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=rP4U9nJupXoXZ+eSUtWPyQsv5928L4B4vfcwulObfdUBW3LipEmikU/zFNp+DMILgMWFuG3Iy11aNY2srSPrbQ0uWKtK2SwULRy0EX2zxhWgPqPiSE0a8nqzR6qDMVG+kG6C4z4kkRLq3dORppcqnjXiNQIDnE2HzPuBZXQI939NJ/OgxocBFmME/YGcv6pjUaHLKCfkRC9MCR3mylNX878vsJiHZSJA2I5ngDfTe5xpI1OioyjjUHj/PA9GwhulX1s9CazLYzzeGfBFdWIXsaXzwTswVE7QlD/m1odgwqn9haWxgNzFkG8ul2Ab0y2xPgDwNKqFkWcd7FK6f7xaVQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676495976; bh=j1uzREsZ2mFg/BYco+GDWQE2UM1sf+5lpT4QCs2a4gF=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=qdScrSNqRZPXubLi84tIb8+TONZ1q3sSTgkHb36e8KykrHotksD15AjPdUaZvVUW6oFqe1YoZuCDHy5LARZgSAF6BmZKDb1Wq7kxzKnk/USnyQSGE6f1/L859gcJ0SMTFAAM+ZhPbDlRQHOBpvps4AG5jVF2Iid0xXLAXNJ/g5+FkHRUHzZrv4tuxISPd2SMUE3SuwlLiK5mQ1tggYDEv8zWaeuN6SkpXV6Q0xau7G4ebDuR5dbILYUM06YmZK+IXuYUttMtyv1KcCHNXqson1PQxFUiLTit2negzgtAGUF1OMVcUNXTpSUFvOISceiBm0PP7lDnwc7P9OVskQimtA== X-YMail-OSG: zIoj9m4VM1nnrWsnI4vsvJDJPtJkhMGnbid9Dzb43lHwi7mf0oDwZjsAsOpnvHh rd5PFSQf2etu2tgMo8JLkUqGfmzvzW04FYkIGwoqSB96p0REp1c_HDLNBheYRH_nv3D0JgjKpIZR UWUAZwy7uEs98M836dH1gV5nHUrMcYz0vODdi3_3K7NGAIr21lAsmJZPRYP7g9HOLnpPu44qk6Hl MKi3QYieUL.mrJFUCLSD_jBUJvYgNwb4kTsN69.7m3pDnaO5EYgejdR3nTF3bfbdu7eE.kc3_OAm RGIJ5tnvKiXanhEe5_L7slbmYiiEED2Z8MIL6_zAIDim8VNPWbOTI5TPKr5KdmDjcKzqz0HySebV DAXOtn24JQggNxvhKVGbDjsW6FZEi85O02u4H7l3NxIxMqqXHTFom5ykxXdmic8cEdnPs0hIYUiB srLkgWhQh4amjtZhW9GLlqs3G7OTNs9AnTf_wEOS3eObYiDTLjR9A9dOJO_U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Qt7SOub2xNWLH0gvPvAtelgw2nkY5PgHnJrp0n9cu_LtPuIsS3HacOYrEYAJzjeqz3ZWGu3GX wRWKWgKP8mUjiGG5SvqKcWRkp3MitrZt79k_CYu0y78uNR.RQsb4mvGbxZTI1vzeQapDJsuKwty3 4GvAxoT1jIoeKXM3op_i9z0xUe1o9VNbe8Vtagsi8k0OOdshB7MHt_ngbIUKCG9h.Nf7pwabJ_Gy 4fxGKb5DSumYOn44yalWL1LkZawh40WztTyRG96TAyLZcKvkI4XT9AqJr0Y9YrYfG6UkgdqkPbjC Gu.LB8Nl_64gCf8fxQtHJNPXnwxzTkufzlpe0aSPH1rW4Ubi2qWnk3r56D8_7XnR88z40NR8q_D7 74cawVYn7YN5.aKskahFDBHKiavkJIBaqirNJHqh5RJuTgr4nIHdD8JsxGdcYGyryhZv.GsFDM_R tb_PjLKkVPhrJjQOV8oj6.vuYXHLF60omO3tTlXi0ViDIoOcND1snNiSgYK.Z7OlRARnTEG.wQAW Ad1I1alpFXuZ5OgKJjc1i4vUq20M2CyBfIh_JIzoinz.lVHV0cjWPSBcXOvRrXBuCZpyz1D5BTXy 1JJ7i9L9lck5F2OykWOqLKiz9ifZZxjr5QPytv05fOfdN9r_fo0v3OO1rPsyvigJ.p4rC4a6GIYZ sQaI- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Wed, 15 Feb 2023 21:19:36 +0000 Received: by hermes--production-ir2-65c64dfd66-q88mm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 40c5b5e6db7bc3038a4dcf4537530feb; Wed, 15 Feb 2023 21:19:33 +0000 (UTC) From: Ergus To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Wrong indentarion in csharp-mode Date: Wed, 15 Feb 2023 22:19:03 +0100 Message-ID: <87k00i7hko.fsf@aol.com> MIME-Version: 1.0 Content-Type: text/plain References: <87k00i7hko.fsf.ref@aol.com> X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Content-Length: 7896 Received-SPF: pass client-ip=74.6.132.42; envelope-from=spacibba@aol.com; helo=sonic306-3.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) Hi: I just found that this indentations are wrong in csharp mode: // wrong new myNamespace.myClass { Name1 = x.Value, // defun-block-intro var2 = 2 // statement-cont } // statement-cont The problem seems to be related with the dot (.) in the new, because this variant indents correctly: // right new myClass { Name1 = x.Value, // brace-list-intro var2 = 2 // brace-list-entry } // brace-list-close csharp-ts-mode is doing it right BTW. In GNU Emacs 30.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.8) of 2023-02-15 built on Ergus Repository revision: 6a677fd3b6677248a8bc1787b105879684289fa2 Repository branch: master System Description: Arch Linux Configured using: 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json --with-x-toolkit=gtk3 --with-xft --with-modules --with-cairo --with-harfbuzz --with-native-compilation '--program-transform-name=s/^ctags$/ctags.emacs/'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: C#//law Minor modes in effect: subword-mode: t windmove-mode: t fancy-compilation-mode: t global-auto-revert-mode: t electric-pair-mode: t flyspell-mode: t company-mode: t flycheck-mode: t diff-hl-margin-mode: t gtags-mode: t repeat-mode: t c-ms-space-for-alignment-mode: t xterm-mouse-mode: t xclip-mode: t override-global-mode: t winner-mode: t save-place-mode: t delete-selection-mode: t savehist-mode: t global-display-fill-column-indicator-mode: t display-fill-column-indicator-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t which-key-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t size-indication-mode: 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 Load-path shadows: /mnt/casa/gits/emacs_clones/gtags-mode/gtags-mode hides /home/ergo/.config/emacs/elpa/gtags-mode-1.0/gtags-mode /home/ergo/.config/emacs/elpa/transient-20230213.1337/transient hides /home/ergo/.local/share/emacs/30.0.50/lisp/transient Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date dabbrev cap-words superword subword cape-keyword windmove jka-compr shortdoc csharp-mode c-ts-common treesit cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs fancy-compilation compile text-property-search comint ansi-osc help-fns radix-tree autorevert filenotify ffap thingatpt url-parse auth-source password-cache url-vars elec-pair flyspell-correct flyspell ispell company-semantic company-template company-capf company flycheck ansi-color json map find-func dash pcase diff-hl-margin diff-hl-dired dired-x dired dired-loaddefs diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode cape compat comp comp-cstr warnings icons rx gtags-mode subr-x files-x xref project term/tmux term/xterm xterm init repeat xt-mouse xclip edmacro kmacro use-package-bind-key bind-key simple-16-theme winner ring saveplace delsel savehist easy-mmode display-fill-column-indicator display-line-numbers diminish which-key cl-extra help-mode use-package-diminish use-package-core disp-table info dumb-jump-autoloads highlight-indent-guides-autoloads company-lua-autoloads evil-collection-autoloads vundo-autoloads sudo-edit-autoloads cuda-mode-autoloads nginx-mode-autoloads crdt-autoloads annalist-autoloads company-auctex-autoloads cape-autoloads groovy-mode-autoloads flycheck-rust-autoloads string-inflection-autoloads company-c-headers-autoloads protobuf-mode-autoloads markdown-mode-autoloads tree-sitter-autoloads lice-autoloads lorem-ipsum-autoloads julia-mode-autoloads nasm-mode-autoloads deadgrep-autoloads popup-autoloads company-nginx-autoloads csv-mode-autoloads d-mode-autoloads tsc-autoloads i3wm-config-mode-autoloads ssh-config-mode-autoloads move-dup-autoloads clang-format-autoloads esup-autoloads dired-sidebar-autoloads gnuplot-autoloads web-completion-data-autoloads phi-search-autoloads better-shell-autoloads fancy-compilation-autoloads arduino-cli-mode-autoloads flycheck-julia-autoloads magit-autoloads magit-section-autoloads auctex-autoloads tex-site which-key-autoloads git-commit-autoloads with-editor-autoloads evil-autoloads goto-chg-autoloads flycheck-autoloads multiple-cursors-autoloads ibuffer-sidebar-autoloads dired-subtree-autoloads dired-hacks-utils-autoloads systemd-autoloads pkgbuild-mode-autoloads neotree-autoloads modern-cpp-font-lock-autoloads company-reftex-autoloads google-c-style-autoloads flymake-nasm-autoloads request-autoloads caml-autoloads arduino-mode-autoloads ede/auto eieio-base cl-seq eieio byte-opt bytecomp byte-compile eieio-core cl-macs gv cl-loaddefs cl-lib sphinx-mode-autoloads f-autoloads diff-hl-autoloads lua-mode-autoloads gtags-mode-autoloads mutt-mode-autoloads xclip-autoloads diminish-autoloads imenu-list-autoloads paradox-autoloads spinner-autoloads avy-zap-autoloads nftables-mode-autoloads s-autoloads ibuffer-vc-autoloads objed-autoloads iedit-autoloads languagetool-autoloads vterm-toggle-autoloads vterm-autoloads avy-autoloads git-timemachine-autoloads emamux-autoloads transient-autoloads flymake-quickdef-autoloads slime-autoloads yasnippet-snippets-autoloads ibuffer-project-autoloads haskell-mode-autoloads shell-command+-autoloads notmuch-autoloads e2ansi-autoloads face-explorer-autoloads pkg-info-autoloads flx-autoloads opencl-mode-autoloads ptemplate-templates-autoloads ptemplate-autoloads yasnippet-autoloads git-modes-autoloads compat-autoloads ibuffer-tramp-autoloads debbugs-autoloads cobol-mode-autoloads macrostep-autoloads flyspell-correct-autoloads company-autoloads dash-autoloads epl-autoloads vdiff-autoloads hydra-autoloads lv-autoloads early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 314716 25828) (symbols 48 18893 0) (strings 32 80618 11390) (string-bytes 1 2807148) (vectors 16 45056) (vector-slots 8 1351905 127627) (floats 8 236 1199) (intervals 56 3420 54) (buffers 984 15)) From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 17 14:28:10 2023 Received: (at 61541) by debbugs.gnu.org; 17 Feb 2023 19:28:10 +0000 Received: from localhost ([127.0.0.1]:41597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT6Ow-0005nx-HU for submit@debbugs.gnu.org; Fri, 17 Feb 2023 14:28:10 -0500 Received: from out0.migadu.com ([94.23.1.103]:20448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT6Ov-0005nq-Lx for 61541@debbugs.gnu.org; Fri, 17 Feb 2023 14:28:10 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676662089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gZjQS3bK0PtNoAc/Vievy1LtC+6brpOcISWMo+vMtys=; b=jRzfBkg5wTR55v3onmWDMHjeBhKmQyuvLvJ+YSjGLDr05t/5hvoK+njXWk+J7xp3xAQxSE +A2HdaA/ISQ8rlCXM/7KxlqIYqZ5TOsZmBAxLaINZza7tO186Yfvuer+nWrXdpQuL3n3nL Yu8EPIM91tXy0Trg3GMH74gGEt08dA0G1TvONNC7UKiTPdUGsEopB2/jzKK0+uS3szhJJn COF2BJ3XdejTFQitGaKO+ASb+6UapHo1sL4y6OypOOlGZHcox2J6cBV7NsED0eA0k10lzA 1pK3SiHpGNsEV7+/qbiiq90DEYrG0FvT7Z3HvEU1IpeWlq2xFPJP6xwTsGiN3Q== From: Theodor Thornhill To: Ergus Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode In-Reply-To: <87k00i7hko.fsf@aol.com> (Ergus's message of "Wed, 15 Feb 2023 22:19:03 +0100") References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> Date: Fri, 17 Feb 2023 20:28:07 +0100 Message-ID: <87a61cozw8.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61541 Cc: jostein@kjonigsen.net, 61541@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 (-) Ergus writes: > Hi: > > I just found that this indentations are wrong in csharp mode: > > // wrong > new myNamespace.myClass > { > Name1 = x.Value, // defun-block-intro > var2 = 2 // statement-cont > } // statement-cont > > > The problem seems to be related with the dot (.) in the new, because > this variant indents correctly: > > // right > new myClass > { > Name1 = x.Value, // brace-list-intro > var2 = 2 // brace-list-entry > } // brace-list-close > > > csharp-ts-mode is doing it right BTW. > Hi! Yeah, this is one of the harder issues iirc, and one of the ones that made us move to tree-sitter in csharp-mode in the first place. What do you think Jostein? Patches welcome! Theo From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 17 16:07:00 2023 Received: (at 61541) by debbugs.gnu.org; 17 Feb 2023 21:07:01 +0000 Received: from localhost ([127.0.0.1]:41696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT7wa-0008Ic-Jg for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:07:00 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT7wZ-0008IP-5U for 61541@debbugs.gnu.org; Fri, 17 Feb 2023 16:06:59 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B8D8D5C0053; Fri, 17 Feb 2023 16:06:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 17 Feb 2023 16:06:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to; s=fm3; t=1676668013; x=1676754413; bh=fw B/MLMoo/HwPobjykIrc+1Uny7a5hw0lKeIrKG2O/I=; b=Stn2fPFvTdS/JZ4jyV q3QePmbMwb3sn1psP9VVAWXR2AXLYV1r7dDL66xswt3N+H022+BPDiu4FpDzJcA7 enjIdpAp63szLm9RtPTeIv3ssDLEDMro7oc/s2P3/eWPxyuKCAm+z1svf32ORswB AYcbB6nVzjmApFCNs1vyM1aUL0T/8JnE9X6tKN6bHvpXF0EcDVODciAz8pN4hKoF k1M3ho2CmlMymphdEVRzt/V/BQTk9hsO8KIynNF1DLRB0JysDlgJiwVofqL+J2V/ 3rmnEQTOLMY5n9KhpGGfMYXxxvqtn8UhDwYXk4/NF+EyZ85YpZrbcB2ViSCbG0x6 Yxpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1676668013; x=1676754413; bh=fwB/MLMoo/HwPobjykIrc+1Uny7a5hw0lKe IrKG2O/I=; b=lDKlhXWftpGNsCZjAQ5asxkIjgEX99QTBouV4WjeY4Buq+qBrHp jYTXX/9I1A40cKdTxZp+PdjmIt54W/5Rr90o056r9JEtazdd/wt5MDllfAhzcpEx 5HwJuS1BjJNiUtgJbfd7ndn11xNoRkkKmlPdnXB52jZ6vNjI1TcjgqVagNEX4Cpi A7ada1CT5Y3nNRInDN/TcJnEOF2MaCg/LPanWFKqQ9XL+xCCqAoA9aN9oo7+lhAl vndX9A4BGzK37P0GpBT6LPY3tpok48dCtNxdnof3N3XMBFrQ7D1A5k2Kyizjwy7R +00AkSOKVLdhCGc2tzhA/hfR+c5C8MRIuzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeiledgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfghruffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefl ohhsthgvihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjh honhhighhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpefhgeevvefhfeeffedtvdfh vdeiieffheeiheegheegtddtkeevffelteetgedvjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhj ohhnihhgshgvnhdrnhgvth X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Feb 2023 16:06:52 -0500 (EST) Message-ID: <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> Date: Fri, 17 Feb 2023 22:06:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode Content-Language: en-GB, nb-NO To: Theodor Thornhill , Ergus References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= In-Reply-To: <87a61cozw8.fsf@thornhill.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 61541 Cc: jostein@kjonigsen.net, 61541@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: , Reply-To: jostein@kjonigsen.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) 2/17/23 20:28, Theodor Thornhill wrote: > Ergus writes: > >> Hi: >> >> I just found that this indentations are wrong in csharp mode: >> >> // wrong >> new myNamespace.myClass >> { >> Name1 = x.Value, // defun-block-intro >> var2 = 2 // statement-cont >> } // statement-cont >> >> >> The problem seems to be related with the dot (.) in the new, because >> this variant indents correctly: >> >> // right >> new myClass >> { >> Name1 = x.Value, // brace-list-intro >> var2 = 2 // brace-list-entry >> } // brace-list-close >> >> >> csharp-ts-mode is doing it right BTW. >> > Hi! > > Yeah, this is one of the harder issues iirc, and one of the ones that > made us move to tree-sitter in csharp-mode in the first place. > > What do you think Jostein? > > Patches welcome! > > Theo > First of all: Thanks for a detailed bug-report. Then for the bad news: I may be missing something here. I'm on the latest revision of the emacs-29 branch, and I really can't reproduce at all. I've tried typing out the concrete code-samples above, and I've tried copy-pasting them. No matter what I do, I cannot reproduce the behaviour outlined above. Ergus: Could you come up with a even more complete example? I mean... If I can't reproduce, I definitely won't be able to come up with a patch. -- Jostein From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 17 16:44:00 2023 Received: (at 61541) by debbugs.gnu.org; 17 Feb 2023 21:44:00 +0000 Received: from localhost ([127.0.0.1]:41774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8WN-0000na-SO for submit@debbugs.gnu.org; Fri, 17 Feb 2023 16:44:00 -0500 Received: from sonic315-14.consmr.mail.bf2.yahoo.com ([74.6.134.124]:33426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT8WM-0000nL-JN for 61541@debbugs.gnu.org; Fri, 17 Feb 2023 16:43:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1676670230; bh=7MoXdB5PH+xyZiPFpUFTRc1mda5fWBxULwASzVElbsQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=I+dR2IpS3eSbC7p+ZqNX5XBpQfLnEHKxGBFQ7J8Di2wDz8zW+DjFa0wQfjodF7WurnuxEpiKdfXMiniTKODDbrYxcslz/INcaw4+gym8dYbHP5bUwlVUy0JkvQPJ/ycnqnCpbF9hIk5Ii/Q+mUopGAh19yS+qT6R0ClRjiTgFC8tkdvTdYII0R7bMl9UhXN9AyYFb0Udp1OxLQAJym60LPmx1qrvEQjpSaS/Y2U0wQbigI/V/SSrPtOYtOE0nOIaObHEaueVueQeOP6OCkRZ3ldW8bGo17bBWUeJb86OuW7CbqJAYLmTrEoPkBnCzW9sOL1NdBZP1kZ3zf7Idj/Xeg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676670230; bh=ULWB1APmacXSd0o0Gezjl8Fj1xsbyAt+Pr3P5TVRwni=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=pLvkjb9STXw3YwHy6CFcLHNu4pj6Qx42g6mYS4e/7WJ97OHKb9JsJGt9lYhWMy9j6M7Mnx4Q/39ycgQcztEULTRlwJSXVoOK/mQpxaKDHD4u4EBmt4VEYRX0GN+XM4iapjM9mIuIp62ROlbMvCQTvy66aR9azOA259qmfx8NSsPir1y4ZwkN1mb5NpdTYR9ft7qngJrsBoQE6wAcfD2eO83WhVBGOSb0hi48i0/PNS5dFX0YwQWjuE5nAB0nUJ+lu1jiR7mADvnetF9eTxTz9gphkWO95AI0b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M_OxbzdcOwmz.KHsyXoiWbeUFTRXHHwU4B6ah4LG38dox9vfc MVcByYh2GYWzO2UR16hNRUtNauza8t6XMgy.ih5GuMvp__7f.FKIw6OiY3NZlALDabl2Fng2VqEE 0nyLNoD9w0LbnaoNVv6eisSgGGvsLrWUMD7KpF5bX9qbZfoltjcBec4KhX8U35U6PUNyqFSRBdER uZ_.52m6h X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Fri, 17 Feb 2023 21:43:50 +0000 Received: by hermes--production-ir2-65c64dfd66-wgvcl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a013df23548792a63257957ff362d350; Fri, 17 Feb 2023 21:43:49 +0000 (UTC) Date: Fri, 17 Feb 2023 22:43:46 +0100 From: Ergus To: jostein@kjonigsen.net Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode Message-ID: <20230217214346.dr6d54yxk2rr6ucj@Ergus> References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Content-Length: 2071 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61541 Cc: Theodor Thornhill , 61541@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Feb 17, 2023 at 10:06:50PM +0100, Jostein Kj�nigsen wrote: >2/17/23 20:28, Theodor Thornhill wrote: >>Ergus writes: >> >>>Hi: >>> >>>I just found that this indentations are wrong in csharp mode: >>> >>>// wrong >>>new myNamespace.myClass >>>{ >>> Name1 = x.Value, // defun-block-intro >>> var2 = 2 // statement-cont >>> } // statement-cont >>> >>> >>>The problem seems to be related with the dot (.) in the new, because >>>this variant indents correctly: >>> >>>// right >>>new myClass >>>{ >>> Name1 = x.Value, // brace-list-intro >>> var2 = 2 // brace-list-entry >>>} // brace-list-close >>> >>> >>>csharp-ts-mode is doing it right BTW. >>> >>Hi! >> >>Yeah, this is one of the harder issues iirc, and one of the ones that >>made us move to tree-sitter in csharp-mode in the first place. >> >>What do you think Jostein? >> >>Patches welcome! >> >>Theo >> >First of all: Thanks for a detailed bug-report. > >Then for the bad news: I may be missing something here. I'm on the >latest revision of the emacs-29 branch, and I really can't reproduce >at all. > >I've tried typing out the concrete code-samples above, and I've tried >copy-pasting them. > >No matter what I do, I cannot reproduce the behaviour outlined above. > >Ergus: Could you come up with a even more complete example? > >I mean... If I can't reproduce, I definitely won't be able to come up >with a patch. > >-- >Jostein > Hi Jostein: I just do: emacs -Q /tmp/main.cs Then pasted (or write) the code snippet shown in the example, and re-indent the buffer: I get this: new myNamespace.myClass { Name1 = 1, Name2 =2 } Exactly like in the example C-c C-o shows the same than in the example. Even the fontification is wrong. If I remove the dot like this myNamespacemyClass the fontification and indentation is fixed immediately. I am using the master branch (emacs-version = 30.0.50) tomorrow I can try to reproduce the issue on emacs-29 branch, but I have to build it. Best, Ergus From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 17 18:38:25 2023 Received: (at 61541) by debbugs.gnu.org; 17 Feb 2023 23:38:25 +0000 Received: from localhost ([127.0.0.1]:41877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTAJ6-0006IQ-RE for submit@debbugs.gnu.org; Fri, 17 Feb 2023 18:38:25 -0500 Received: from out0.migadu.com ([94.23.1.103]:23273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTAJ4-0006IH-Ml for 61541@debbugs.gnu.org; Fri, 17 Feb 2023 18:38:23 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676677101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AobEtuJBI9jfCtWWRccsYtcWLQ4bA6KyBRHgJhiAVdI=; b=JhJaR2Cc2COa0P/13GI65aOEupyALH4YxBich+bnR4xCc6/MKe+Gevli/1UaXfoHJubcIe 1DqucOLVfdO0UKXh6ko/jzxe+I37oBlIYaq2upbUTrUBn8UY3gpfkJ1gHG3BYH+tOH+NcU AstUDvAvy0tCF9XwOx6wwAwZUMLTJBfWGtTruBB3z5/q90iAGFdMO+/A9tPWRRcRccY7J3 5HNqzWZGlZC/CpcN/1EjK/vr3txSjwKnb/2lK6ynJr2+HMfRLWQ8rmc7aUrqniC9ZnZEKS ToAMNdsXEZ1H5tMqRBNVF533gAhm0HyevxMC4QRAbA8WNY60U5R+GhWcXEY+0w== From: Theodor Thornhill To: Ergus , jostein@kjonigsen.net Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode In-Reply-To: <20230217214346.dr6d54yxk2rr6ucj@Ergus> References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> <20230217214346.dr6d54yxk2rr6ucj@Ergus> Date: Sat, 18 Feb 2023 00:38:20 +0100 Message-ID: <87edqn6exf.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61541 Cc: 61541@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 (-) Ergus writes: > On Fri, Feb 17, 2023 at 10:06:50PM +0100, Jostein Kj=C3=AF=C2=BF=C2=BDnig= sen wrote: >>2/17/23 20:28, Theodor Thornhill wrote: >>>Ergus writes: >>> >>>>Hi: >>>> >>>>I just found that this indentations are wrong in csharp mode: >>>> >>>>// wrong >>>>new myNamespace.myClass >>>>{ >>>> Name1 =3D x.Value, // defun-block-intro >>>> var2 =3D 2 // statement-cont >>>> } // statement-cont >>>> >>>> >>>>The problem seems to be related with the dot (.) in the new, because >>>>this variant indents correctly: >>>> >>>>// right >>>>new myClass >>>>{ >>>> Name1 =3D x.Value, // brace-list-intro >>>> var2 =3D 2 // brace-list-entry >>>>} // brace-list-close >>>> >>>> >>>>csharp-ts-mode is doing it right BTW. >>>> >>>Hi! >>> >>>Yeah, this is one of the harder issues iirc, and one of the ones that >>>made us move to tree-sitter in csharp-mode in the first place. >>> >>>What do you think Jostein? >>> >>>Patches welcome! >>> >>>Theo >>> >>First of all: Thanks for a detailed bug-report. >> >>Then for the bad news: I may be missing something here. I'm on the=20 >>latest revision of the emacs-29 branch, and I really can't reproduce=20 >>at all. >> >>I've tried typing out the concrete code-samples above, and I've tried=20 >>copy-pasting them. >> >>No matter what I do, I cannot reproduce the behaviour outlined above. >> >>Ergus: Could you come up with a even more complete example? >> >>I mean... If I can't reproduce, I definitely won't be able to come up=20 >>with a patch. >> >>-- >>Jostein >> > > Hi Jostein: > > I just do: > > emacs -Q /tmp/main.cs > > Then pasted (or write) the code snippet shown in the example, and > re-indent the buffer: > > I get this: > > new myNamespace.myClass > { > Name1 =3D 1, > Name2 =3D2 > } > > Exactly like in the example C-c C-o shows the same than in the > example. Even the fontification is wrong. > > If I remove the dot like this myNamespacemyClass the fontification and > indentation is fixed immediately. > > I am using the master branch (emacs-version =3D 30.0.50) tomorrow I can > try to reproduce the issue on emacs-29 branch, but I have to build it. > > Best, > Ergus Try this, Ergus and Jostein. What do you think? diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index b6b842d7fd..293a910081 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -474,28 +474,37 @@ csharp-guess-basic-syntax (and (eq (char-before) ?\]) (not (eq (char-after) ?\;)))))) `((annotation-top-cont ,(c-point 'iopl)))) - ((and ;; Heuristics to find object initializers (save-excursion ;; Next non-whitespace character should be '{' (goto-char (c-point 'boi)) - (eq (char-after) ?{)) - (save-excursion - ;; 'new' should be part of the line - (goto-char (c-point 'iopl)) - (looking-at ".*new.*")) + (unless (eq (char-after) ?{) + (backward-up-list 1 t t)) + (save-excursion + ;; 'new' should be part of the line + (goto-char (c-point 'iopl)) + (looking-at ".*new.*"))) ;; Line should not already be terminated (save-excursion (goto-char (c-point 'eopl)) (or (not (eq (char-before) ?\;)) (not (eq (char-before) ?\{))))) - (if (save-excursion - ;; if we have a hanging brace on line before - (goto-char (c-point 'eopl)) - (eq (char-before) ?\{)) - `((brace-list-intro ,(c-point 'iopl))) - `((block-open) (statement ,(c-point 'iopl))))) + (cond + ((save-excursion + ;; if we have a hanging brace on line before + (goto-char (c-point 'eopl)) + (eq (char-before) ?\{)) + `((brace-list-intro ,(c-point 'iopl)))) + ((save-excursion + ;; if we have a hanging brace on line before + (goto-char (c-point 'boi)) + (and (eq (char-after) ?\}) + `((brace-list-close ,(save-excursion + (backward-up-list 1 t t) + (point))))))) + (t + `((block-open) (statement ,(c-point 'iopl)))))) (t (apply orig-fun args)))) =20 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 18 20:58:58 2023 Received: (at 61541) by debbugs.gnu.org; 19 Feb 2023 01:58:58 +0000 Received: from localhost ([127.0.0.1]:45271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTYyf-0001nv-UJ for submit@debbugs.gnu.org; Sat, 18 Feb 2023 20:58:58 -0500 Received: from sonic304-10.consmr.mail.bf2.yahoo.com ([74.6.128.33]:43970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTYyc-0001nd-Po for 61541@debbugs.gnu.org; Sat, 18 Feb 2023 20:58:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1676771927; bh=Plf6PYXuKVlZSnd8wuly03drvM6KRMTc41UDsOeao7c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=XnZqccMy2D439pOhpCEKWgdWKuPJ/UUq5KHiFCLn7XyOlKxo5+gzMb3HRAu8rjkLNVvinU5jcjSy1HbbhopUrNforU3kPYH4MObn41uWpGHB2e7QIU5w7SNGRKCYWE1HNipFz3bdNousmA1oMztKIF/Qdot65q0FBuunkkpyf1kjgxTPP2S5cSfBZHrHqn3nO87z7uipIy4PAjteYg310z4G9MD9VohGgj8Hv92+iEBlBJzLYEl1PeeO8nYrGVGiGIkVs57p4zgincUd23wEDsaQknnG9945VweW2zhD7rBlWPYmcq06wt8+V/p6cvbivyeH+jkEaBtxvJpQVAJm0Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676771927; bh=dM4MmDW63JrKAIiLS+SHro0OiltOWzfJlT4BxDBUOul=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=EaSZu2QWu4K0gc4SXb7tS//uwIyVIc8XS5RdLP46WMIH+Fic2/cNVZuQNwEUGUtldd0FTQBYJsxVxUW+0b5E1Qq9i2j4atmft841DDn/k3BPXNR7tocmbse5+FuZCt1OXndcViODVkqkHlNHpFn0coc8w/BUTjFgVyfpBb9qO2Ln8SkE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kPdnkYXW7jQfEFOJNNGwPy8Ty1 Dt8oyWmZA1go.8_K8Q4xKshDpnxDTqO7C7KNCSUTJloBxr6nOD9vjDQOkGdhTP3rUwI8wXqRg._i T9EpcpZ9T6eOQAVdwczVfPWTQHmLTcqC5GKdtnoCg9vXzp_A7as3Xl3F5eyAg8GLaj4WOZ2VXOK6 nkBcEyMX6_Vad7rdMV29bJ6zZBj0FKiVmwY4mGyp_0EmTmqS6cgqpWU9H7eeEUn1g6aUMe5922GD tU4OWrGZGmKGhg8fW4kDxfknIC7iiXPcCmEPIrUprHdzAyTbehPYUAjhfw57xbgEek8boJ63VV93 5oRU- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Sun, 19 Feb 2023 01:58:47 +0000 Received: by hermes--production-ir2-65c64dfd66-fhq4t (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2b3b87d367da09b657634a27a021ec1f; Sun, 19 Feb 2023 01:58:45 +0000 (UTC) Date: Sun, 19 Feb 2023 02:58:42 +0100 From: Ergus To: Theodor Thornhill Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode Message-ID: <20230219015842.rp2m7n5df4fcp2ug@Ergus> References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> <20230217214346.dr6d54yxk2rr6ucj@Ergus> <87edqn6exf.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87edqn6exf.fsf@thornhill.no> X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Content-Length: 4540 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61541 Cc: jostein@kjonigsen.net, 61541@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Theo: I think this works... I will try it a bit more tomorrow. Thanks, Ergus On Sat, Feb 18, 2023 at 12:38:20AM +0100, Theodor Thornhill wrote: >Ergus writes: > >> On Fri, Feb 17, 2023 at 10:06:50PM +0100, Jostein Kj�nigsen wrote: >>>2/17/23 20:28, Theodor Thornhill wrote: >>>>Ergus writes: >>>> >>>>>Hi: >>>>> >>>>>I just found that this indentations are wrong in csharp mode: >>>>> >>>>>// wrong >>>>>new myNamespace.myClass >>>>>{ >>>>> Name1 = x.Value, // defun-block-intro >>>>> var2 = 2 // statement-cont >>>>> } // statement-cont >>>>> >>>>> >>>>>The problem seems to be related with the dot (.) in the new, because >>>>>this variant indents correctly: >>>>> >>>>>// right >>>>>new myClass >>>>>{ >>>>> Name1 = x.Value, // brace-list-intro >>>>> var2 = 2 // brace-list-entry >>>>>} // brace-list-close >>>>> >>>>> >>>>>csharp-ts-mode is doing it right BTW. >>>>> >>>>Hi! >>>> >>>>Yeah, this is one of the harder issues iirc, and one of the ones that >>>>made us move to tree-sitter in csharp-mode in the first place. >>>> >>>>What do you think Jostein? >>>> >>>>Patches welcome! >>>> >>>>Theo >>>> >>>First of all: Thanks for a detailed bug-report. >>> >>>Then for the bad news: I may be missing something here. I'm on the >>>latest revision of the emacs-29 branch, and I really can't reproduce >>>at all. >>> >>>I've tried typing out the concrete code-samples above, and I've tried >>>copy-pasting them. >>> >>>No matter what I do, I cannot reproduce the behaviour outlined above. >>> >>>Ergus: Could you come up with a even more complete example? >>> >>>I mean... If I can't reproduce, I definitely won't be able to come up >>>with a patch. >>> >>>-- >>>Jostein >>> >> >> Hi Jostein: >> >> I just do: >> >> emacs -Q /tmp/main.cs >> >> Then pasted (or write) the code snippet shown in the example, and >> re-indent the buffer: >> >> I get this: >> >> new myNamespace.myClass >> { >> Name1 = 1, >> Name2 =2 >> } >> >> Exactly like in the example C-c C-o shows the same than in the >> example. Even the fontification is wrong. >> >> If I remove the dot like this myNamespacemyClass the fontification and >> indentation is fixed immediately. >> >> I am using the master branch (emacs-version = 30.0.50) tomorrow I can >> try to reproduce the issue on emacs-29 branch, but I have to build it. >> >> Best, >> Ergus > > >Try this, Ergus and Jostein. What do you think? > >diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el >index b6b842d7fd..293a910081 100644 >--- a/lisp/progmodes/csharp-mode.el >+++ b/lisp/progmodes/csharp-mode.el >@@ -474,28 +474,37 @@ csharp-guess-basic-syntax > (and (eq (char-before) ?\]) > (not (eq (char-after) ?\;)))))) > `((annotation-top-cont ,(c-point 'iopl)))) >- > ((and > ;; Heuristics to find object initializers > (save-excursion > ;; Next non-whitespace character should be '{' > (goto-char (c-point 'boi)) >- (eq (char-after) ?{)) >- (save-excursion >- ;; 'new' should be part of the line >- (goto-char (c-point 'iopl)) >- (looking-at ".*new.*")) >+ (unless (eq (char-after) ?{) >+ (backward-up-list 1 t t)) >+ (save-excursion >+ ;; 'new' should be part of the line >+ (goto-char (c-point 'iopl)) >+ (looking-at ".*new.*"))) > ;; Line should not already be terminated > (save-excursion > (goto-char (c-point 'eopl)) > (or (not (eq (char-before) ?\;)) > (not (eq (char-before) ?\{))))) >- (if (save-excursion >- ;; if we have a hanging brace on line before >- (goto-char (c-point 'eopl)) >- (eq (char-before) ?\{)) >- `((brace-list-intro ,(c-point 'iopl))) >- `((block-open) (statement ,(c-point 'iopl))))) >+ (cond >+ ((save-excursion >+ ;; if we have a hanging brace on line before >+ (goto-char (c-point 'eopl)) >+ (eq (char-before) ?\{)) >+ `((brace-list-intro ,(c-point 'iopl)))) >+ ((save-excursion >+ ;; if we have a hanging brace on line before >+ (goto-char (c-point 'boi)) >+ (and (eq (char-after) ?\}) >+ `((brace-list-close ,(save-excursion >+ (backward-up-list 1 t t) >+ (point))))))) >+ (t >+ `((block-open) (statement ,(c-point 'iopl)))))) > (t > (apply orig-fun args)))) > From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 04 15:45:32 2023 Received: (at 61541-done) by debbugs.gnu.org; 4 Sep 2023 19:45:32 +0000 Received: from localhost ([127.0.0.1]:52641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdFVo-0006kq-1a for submit@debbugs.gnu.org; Mon, 04 Sep 2023 15:45:31 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:60923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdFVi-0006kY-8w for 61541-done@debbugs.gnu.org; Mon, 04 Sep 2023 15:45:26 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50087d47d4dso3005580e87.1 for <61541-done@debbugs.gnu.org>; Mon, 04 Sep 2023 12:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693856716; x=1694461516; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=lUQitmtpuPgA3xGz9ExKjnt9rL1R3caOMoyjKmkqP78=; b=hG4cqhvke53xdsEwTMoTgYP7lzONSXUNcdmo+fM3bh5N7xOy+uvQtjyoBhD9tttohQ WC+Cy9bFWE/p3lBovtcvAtR2H+t77i+CfEN+wvvl0iWsKe1RtdZ9TA2EtS36UMM7bVfO fVGXIC/9RkoiszyGJBrQWURAbbhtlUtT1F3IqHb40nAk6jleyukbDoAoSGhlpUGL7re5 8e9wi0DFvowiZiaV6ztHYNAekFVPOWwf36WwkT7bJ2U7R7zkUdxbwWe2CJbJE+HTX7nr XOXQiu5SOAMaz3z3DLmZMFvpbB0W7ARihOkUFCeoCZOrND0cgkS/+nEXUHeyqXQxadrf 0YmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693856716; x=1694461516; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lUQitmtpuPgA3xGz9ExKjnt9rL1R3caOMoyjKmkqP78=; b=J5hIlzM45GumC6TakvlOY6X6hSvox6077uqQk4tDSfK4vqQcy78Kd75h0tXP9Bq2be 40djPKLPLQZBO4J5wi+uedYT1J4w8IRoapM9L4ZgMn5IrwrNl2DYV5bn4jWPtA2/+0Ua CkphMoOiNZGzAxoVJs+0aEZl3g1uUawtNvJHDY4qYGnaVZzVo3z9BefK+PW9CHnZRopt t+EVHpe5eTo4+99f9JA7EJUqG6M20auhymgLcylih9T/MulreN039RNPmSP8UpbM1UfA i4YROqGQxDCgEbYcg3tI0bfMPhq4ZjWLTc16rOyWg7Z3jiVgInHhIZlBd4GLLpBLfeMO l09Q== X-Gm-Message-State: AOJu0YywGKyPFb1kfZe2Mh1Dvxm7x86s52Y20LY1vhP0GmPMaQekF5E/ QmB4Q3JWE18BDltryodgS4AeP6TIFHNndlSm01890ljM X-Google-Smtp-Source: AGHT+IGQ9RebSjJ1dXHDB3ZuxEUqOZSX27+l6MYypDKLBzecfWrYNqgiOHXbslNDuZEPCn1QsTw2a7DGMvV0fSni/wQ= X-Received: by 2002:a05:6512:3e12:b0:4fb:fe97:5e35 with SMTP id i18-20020a0565123e1200b004fbfe975e35mr8248377lfv.47.1693856716017; Mon, 04 Sep 2023 12:45:16 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 4 Sep 2023 12:45:15 -0700 From: stefankangas@gmail.com In-Reply-To: <87edqn6exf.fsf@thornhill.no> (Theodor Thornhill's message of "Sat, 18 Feb 2023 00:38:20 +0100") References: <87k00i7hko.fsf.ref@aol.com> <87k00i7hko.fsf@aol.com> <87a61cozw8.fsf@thornhill.no> <305e7060-58cc-344a-ae1a-98c82510aa88@secure.kjonigsen.net> <20230217214346.dr6d54yxk2rr6ucj@Ergus> <87edqn6exf.fsf@thornhill.no> MIME-Version: 1.0 Date: Mon, 4 Sep 2023 12:45:15 -0700 Message-ID: Subject: Re: bug#61541: 30.0.50; Wrong indentarion in csharp-mode To: Theodor Thornhill Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61541-done Cc: Ergus , jostein@kjonigsen.net, 61541-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: -1.0 (-) Theodor Thornhill writes: > Try this, Ergus and Jostein. What do you think? it seems like this patch was installed as commit dfc850ca0223, but the bug was left open. I'm therefore closing this bug report. From unknown Sun Jun 22 17:13:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 03 Oct 2023 11:24:09 +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