GNU bug report logs - #44592
In sh-script-mode, should the syntax of . and / be made symbol?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dario Gjorgjevski <dario.gjorgjevski@HIDDEN>; dated Thu, 12 Nov 2020 13:50:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 44592 <at> debbugs.gnu.org:


Received: (at 44592) by debbugs.gnu.org; 14 Nov 2020 16:44:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 14 11:44:28 2020
Received: from localhost ([127.0.0.1]:51787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kdyf6-0001Ud-Je
	for submit <at> debbugs.gnu.org; Sat, 14 Nov 2020 11:44:28 -0500
Received: from quimby.gnus.org ([95.216.78.240]:44938)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kdyf4-0001UP-Cu
 for 44592 <at> debbugs.gnu.org; Sat, 14 Nov 2020 11:44:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=cy7f8uW99FTqhC7AZPONzx4TjsB6EudU6TGkzBeNKAE=; b=bSXVwmwrrV8dpk+omqa5Fnc189
 p5I8ZNMdLOXachbpQieZIenMupcCzeh0V5COZV12RjeYB0/Pj5kULwVjqCC7pSLk7a+UXAD21fjlG
 jMANhpi/1Pj6Ygi/nodusH/XBmg+8MRm4jKOSbHsDy+pbBIQQoXUJ4ou3Pk0XC1kl7P0=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kdyew-0000sx-DB; Sat, 14 Nov 2020 17:44:20 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Dario Gjorgjevski <dario.gjorgjevski@HIDDEN>
Subject: Re: bug#44592: In sh-script-mode, should the syntax of . and / be
 made symbol?
References: <fv2zojo8k2y9ar.fsf@HIDDEN>
X-Now-Playing: Moor Mother's _Circuit City_: "Act 1 - Working Machine"
Date: Sat, 14 Nov 2020 17:44:17 +0100
In-Reply-To: <fv2zojo8k2y9ar.fsf@HIDDEN> (Dario Gjorgjevski's message of
 "Thu, 12 Nov 2020 14:49:32 +0100")
Message-ID: <87eekvyjku.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Dario Gjorgjevski <dario.gjorgjevski@HIDDEN> writes: >
 Changing the syntax of . and / to symbol would make the entire >
 relative-path/to/configure
 be considered the first sexp and therefore > give the correct indentation
 show above. > > Moreover, one wo [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 44592
Cc: 44592 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dario Gjorgjevski <dario.gjorgjevski@HIDDEN> writes:

> Changing the syntax of . and / to symbol would make the entire
> relative-path/to/configure be considered the first sexp and therefore
> give the correct indentation show above.
>
> Moreover, one would then be able to use, e.g., kill-sexp to kill a full
> path as opposed to just one component.

I think that sounds like a too drastic change in how the mode works,
perhaps -- how the killing commands (etc) works gets into your muscle
memory.

> What do you think?  Alternatively, we could work on fixing only the
> SMIE-provided indentation and leave the syntax as it is.

I think that sounds like a better solution.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#44592; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Nov 2020 13:49:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 12 08:49:51 2020
Received: from localhost ([127.0.0.1]:44012 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kdCz0-0003RC-US
	for submit <at> debbugs.gnu.org; Thu, 12 Nov 2020 08:49:51 -0500
Received: from lists.gnu.org ([209.51.188.17]:46066)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dario.gjorgjevski@HIDDEN>) id 1kdCyv-0003R2-U2
 for submit <at> debbugs.gnu.org; Thu, 12 Nov 2020 08:49:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:55842)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dario.gjorgjevski@HIDDEN>)
 id 1kdCyv-00022k-8x
 for bug-gnu-emacs@HIDDEN; Thu, 12 Nov 2020 08:49:45 -0500
Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:54885)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <dario.gjorgjevski@HIDDEN>)
 id 1kdCyp-0002IT-KP
 for bug-gnu-emacs@HIDDEN; Thu, 12 Nov 2020 08:49:44 -0500
Received: by mail-wm1-x332.google.com with SMTP id d142so5320727wmd.4
 for <bug-gnu-emacs@HIDDEN>; Thu, 12 Nov 2020 05:49:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=8CITMzjxqNaRhOkVQaFqNp+6qHNIrqhBYHy4E6QYs/8=;
 b=aS9dhplxLzYlf0WZVXS6kYwAylzMz2wweODLpxTZF+7XR68gyuOnzhJSe12cobqbKP
 2nPKJK4rzKeEVRwPS3XGENSrOKmzNDeweitoHgP5A2rz6kiHcP2sSPHfAGrryL3HhtJw
 b5C69yL6KeLjM6AfJ3jLe/0QRY7NkIcb81VeKfDcZStucinCkm0BmLs8iGo5TxPmGVZB
 KcTIF0hCrf5NVOw8oBJ4QcPwz5auawE7x0UzemiFzsM+gvl+Up2IULpY52TZDsiKWT7x
 ojadz8RG3rogniB5YwzTQrnSxeQv2wkbMVFWmzM+YxEU2HzfHwbubT3W+i670nijTcE9
 OmSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=8CITMzjxqNaRhOkVQaFqNp+6qHNIrqhBYHy4E6QYs/8=;
 b=e99VFZrG9g5SXl4gNru1jl0l4fafJq2eNnwM78OOwZRQgWCJ7ugKPrwSi7XcqR7/IR
 f2+HamIOEOBYNbTlvEBtLa/6csvLATX3uSPTsuw/O6/nGOdKi9puQU3dWnQ9938xITSP
 O1oZFLIc60aDe6Iaw823AE9ux0Hajzi6Zp/X5Anw20DiM4n1gACRZ2RR3bt/A1k/rWpB
 Ef9zWWM3DPoadC4q1x4kK9apjI+kV35yWcU/T8Y/3B1ytlC3UQGw7wQ0NI4RjvYeiP0u
 ftkBo8JOpnrTyKRhCMDhVaPcSzoJvdDt2sP/VlZRYpZ9YdrQOk0kiVDy9m2N7jBm0dNl
 fOew==
X-Gm-Message-State: AOAM532F8lyigsA15MIOYEFfjk76113xJ10qQYpDbXuk0L3YhuTr4ItX
 vZN4q5dLKKOaiwyYal45hIafDfRFep0=
X-Google-Smtp-Source: ABdhPJwaCjJ6z0LohAPVwk1RBveVMV0wJEYsZ0x3MolswBm+elRcofkJ2+Wdm5KJETxOk335XTPThg==
X-Received: by 2002:a1c:2b03:: with SMTP id r3mr9394283wmr.184.1605188974178; 
 Thu, 12 Nov 2020 05:49:34 -0800 (PST)
Received: from ZALANDO-31298
 (p200300e9770cc086cc3651117f379878.dip0.t-ipconnect.de.
 [2003:e9:770c:c086:cc36:5111:7f37:9878])
 by smtp.gmail.com with ESMTPSA id m20sm8077533wrg.81.2020.11.12.05.49.33
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 12 Nov 2020 05:49:33 -0800 (PST)
From: Dario Gjorgjevski <dario.gjorgjevski@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: In sh-script-mode, should the syntax of . and / be made symbol?
Date: Thu, 12 Nov 2020 14:49:32 +0100
Message-ID: <fv2zojo8k2y9ar.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::332;
 envelope-from=dario.gjorgjevski@HIDDEN; helo=mail-wm1-x332.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

In the syntax table of sh-script-mode, the syntax of . and / is
punctuation.  This has the advantage of being able to use, e.g.,
kill-sexp to kill one component of a path.  However, it also has the
disadvantage of not correctly indenting line continuations when a path
to a command is given.

As an example, consider:

    relative-path/to/configure --prefix=$prefix             \
                               --with-x                     \
                               --with-x-toolkit=gtk3        \
                               --with-cairo

(This is how I would expect it to be indented.)  Currently,
sh-script-mode would consider only relative-path to be the first sexp on
the leading line and therefore indent it as:

    relative-path/to/configure --prefix=$prefix     \
                 --with-x                           \
                 --with-x-toolkit=gtk3              \
                 --with-cairo

Changing the syntax of . and / to symbol would make the entire
relative-path/to/configure be considered the first sexp and therefore
give the correct indentation show above.

Moreover, one would then be able to use, e.g., kill-sexp to kill a full
path as opposed to just one component.

What do you think?  Alternatively, we could work on fixing only the
SMIE-provided indentation and leave the syntax as it is.

Best regards,
Dario

-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid




Acknowledgement sent to Dario Gjorgjevski <dario.gjorgjevski@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#44592; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 14 Nov 2020 17:00:02 UTC

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