From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.help Subject: Re: Debugging SMIE for sh-script.el Date: Mon, 6 Sep 2021 20:24:37 +0300 Message-ID: <829bc30d-41a7-c630-a568-00e7f18f1407@gmail.com> References: <87k0jz9rri.fsf@gmail.com> <04ae9f30-5e65-d7de-501e-92d557ddf84c@gmail.com> <87bl5ad5g4.fsf@gmail.com> <3b4cea5f-c08f-3307-655f-a43185ada5ee@gmail.com> <760e21aa-03ea-fb6c-5625-57493c59e455@gmail.com> <5542c259-2e3d-ce97-12ea-5e03d5c150a5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18647"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: help-gnu-emacs@gnu.org, =?UTF-8?Q?K=c3=a9vin_Le_Gouguec?= To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 06 19:25:47 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNINO-0004c6-Br for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 06 Sep 2021 19:25:46 +0200 Original-Received: from localhost ([::1]:41708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNINM-0004wW-Fs for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 06 Sep 2021 13:25:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNIMN-0004lC-SV for help-gnu-emacs@gnu.org; Mon, 06 Sep 2021 13:24:43 -0400 Original-Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:41921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNIML-0003oJ-Vo for help-gnu-emacs@gnu.org; Mon, 06 Sep 2021 13:24:43 -0400 Original-Received: by mail-lj1-x234.google.com with SMTP id m4so12359755ljq.8 for ; Mon, 06 Sep 2021 10:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=MT/Gd2kv5IsH9a6SCzYWMSq0wShgNdbQ/ETG/1c5EIs=; b=ldnd6aedKJcQ5gbM6KdmFGgY+y5lrK6UR/Ho8qKN+A9L+iJzzVCQ8uTnKdPvk1jtl+ f3gVkp0geWZTX4DwuUC5QJY/w0sCU2na8inBPJrNylmnkpK1PIWegi/bhNaWgjfwE47j uhFQ7HYl6YftahqlUpwUutDy+x53TFd3EECO5zekr5iqgpWEw5ahpow6GoecLfaYE8wp xAmhoInexx9U5C194GjlfwbZawpUeHD0kGtOFel3zY9du9BppDsZI3j9hikUyjdGwAJB mgcKphTbSNktw8urClitPSVC3hyKixaz3Ys34bRxoKCkwi/mx63U/9OBOq2SnNGCk7NR /djQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=MT/Gd2kv5IsH9a6SCzYWMSq0wShgNdbQ/ETG/1c5EIs=; b=Yq1rg/nIZaWmDLMwoLihXi+Y3BhOqh9Xhenrf5b7+InyxweFer097toKkD/Q8f1Xml FhvQoC0+gKK0DiMe0msWWo0IS8oowfcSVMwHij3OpB0IYpZ+Tf1H0suOrDkd4JymIz2u EFCCOlT+/jFjfoYZWMuA+zTLJa80nQ53MCrm3cD9BvXjoZ+N/pxXidzviCr4WR9Nq85R vVxKPsjlDlRYXSKxXiexLaGWuJAFPX1+nkHk5lbhAY/fCZQ555lgU2LP6DtF2HPkZ+7Y EJuM9d7Yo2eI7nEgIFlAyDDAX9Qrbrt7oO9t3rGZytKF8usXLEnycJC5ydjLDVL1DATg qwWA== X-Gm-Message-State: AOAM5319umLEbUiSekM/+Jjt4h3YnKtkQ0S9Lv/UN7IcvPgqGAQsX/Yh DqUNeV/xfi6+QFvrvmEWvog= X-Google-Smtp-Source: ABdhPJytp9D5KgB/GBOQ+xCUEa4wSSfrfHrc5tUaffd09ILqwT7rwCZKskYH+AiOMbjxeyLWLr8bhg== X-Received: by 2002:a2e:900c:: with SMTP id h12mr12008683ljg.263.1630949079648; Mon, 06 Sep 2021 10:24:39 -0700 (PDT) Original-Received: from [192.168.1.72] (128-69-156-0.broadband.corbina.ru. [128.69.156.0]) by smtp.gmail.com with ESMTPSA id i6sm1126844lja.112.2021.09.06.10.24.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Sep 2021 10:24:39 -0700 (PDT) X-Google-Original-From: Nikolay Kudryavtsev In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=nikolay.kudryavtsev@gmail.com; helo=mail-lj1-x234.google.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, HTML_MESSAGE=0.001, NICE_REPLY_A=-2.332, 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-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132926 Archived-At: Oh, you're right. Seems that I haven't read Kevin's last letter carefully enough. Sorry about that. I also don't understand the discussion of treating $(cat food) as a single token, since blocks with the standard openers/closers are supposed to be returned by the smie lexer as "" when it runs into them from the outside. Anyway, I still think that even in this case, changing sh-smie--indent-continuation is a better idea than touching the token grab code. Just to test I've coded an implementation of it , that behaves correctly for Kevin's use case. Needs more testing, but seems to work ok in general.