From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.help Subject: Re: Debugging SMIE for sh-script.el Date: Thu, 02 Sep 2021 22:29:55 +0200 Message-ID: <87k0jyd8l8.fsf@gmail.com> References: <87k0jz9rri.fsf@gmail.com> <04ae9f30-5e65-d7de-501e-92d557ddf84c@gmail.com> <87tuj26gke.fsf@gmail.com> <91293bb2-f135-8799-0e3a-96b2ebd7e88d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16246"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Nikolay Kudryavtsev Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 02 22:31:24 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 1mLtMq-00045l-6e for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Sep 2021 22:31:24 +0200 Original-Received: from localhost ([::1]:36304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLtMp-0006k3-4C for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Sep 2021 16:31:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLtLU-0006eP-Dy for help-gnu-emacs@gnu.org; Thu, 02 Sep 2021 16:30:00 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:43764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLtLS-0000uT-O5 for help-gnu-emacs@gnu.org; Thu, 02 Sep 2021 16:30:00 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id b6so4910740wrh.10 for ; Thu, 02 Sep 2021 13:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=asxnKhhnVRiCXhiORYF+8UpRkCIvhn+BD6Z3FVKMYac=; b=LNKJ2fl0Hr3Mp6RSnlNddadutE2zlKJkVI5fLpioJ8xhqusFFrhSL2b6vA8j0Ydnla 7rwyHS7sPaDHZO0nmJI75s3YmpxH23sjfV1TQlC+s+qrT7cp8tIkd3ajwJwV04SdtZ5N sTBdXtp0vLDJFVoC2i+I9XOvtXy8An9j+xi0Om3ytduIEui63Eu5SZKgz881AbazBRg5 7Tn8g2uiqcYEhMLK67OTPyZ0rC0UeQ13/iVZrtVJShRQlXl/4JoRVmZfFDl0kZKg+tQA IhgkOVBHSfxhsAyqWKGdb8J8IQ7wKeFMOvNQG+GeiHEVKFeRfPTgXk0de9EBjDtACv39 3kQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=asxnKhhnVRiCXhiORYF+8UpRkCIvhn+BD6Z3FVKMYac=; b=jzu9gDvRcQMLfxGuy4EywWAHpPDjNKXVVI05hBzSrMdHfiIlz7UCQWwEMvfXbrqseB z/DQe/ehulcZezU6bLoON+X3kGA0XEw5AgYhUt5yNCEhZxGPr9Bw6Uk9AgsAJoQoT1bm KMgc2/TV0ooomDBpyBawzOIDHh80r7bLhzgt9EdLitftohG3+nIFYtoURmIXA/1GnaCt uqCLzkMgRVjhs6dUXh+dkEFnYZPpmXd8pZQ/kzHTkkKQNkFhMRWuLXfz4QlyjEtpb3sd SAY1lnlxivzdfHO9vP6xBorS2Di+KfTWrdRJhFZ7z1ohFSofIDowyuNO8qqJvdcBmVGc rUCg== X-Gm-Message-State: AOAM532DkER58R5jwjSt+SPPjuEElTZw+GTMRAF6bJt/BYEE3zmOGV9S sEWmOFGgAb1xOEvEV3W7xloOl86jIpM= X-Google-Smtp-Source: ABdhPJxDsdh/IOTqnSa7O5YWZxsALvClOEC5bpQe6+OhPlhFm66hDk0c/PC9JkLoJ9Cny0ptT595nw== X-Received: by 2002:adf:9d45:: with SMTP id o5mr126334wre.226.1630614596885; Thu, 02 Sep 2021 13:29:56 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:20e:d340:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id z19sm3043686wma.0.2021.09.02.13.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 13:29:56 -0700 (PDT) In-Reply-To: <91293bb2-f135-8799-0e3a-96b2ebd7e88d@gmail.com> (Nikolay Kudryavtsev's message of "Thu, 2 Sep 2021 21:09:55 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x432.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:132862 Archived-At: Nikolay Kudryavtsev writes: > maybe there's another function further down > the chain which can, smie-indent-exps that is and that's where 6 comes > from. See my original message. To paraphrase, with this shell buffer: #+begin_src sh ${foo}/bar --baz \ --quux #+end_src With point on "--quux", this yields 6: #+begin_src elisp (let ((sh-indent-after-continuation nil)) (smie-indent-calculate)) #+end_src - smie-indent-calculate runs all functions in smie-indent-functions, - in a shell buffer, this variable only holds (sh-smie--indent-continuation t), - but this yields nil: #+begin_src elisp (let ((sh-indent-after-continuation nil)) (sh-smie--indent-continuation)) #+end_src So what gives? I've tried Edebugging, but couldn't figure out how to stop at a spot that made things clearer. PS: aaand I've just read now Stefan's replies, which kill two birds in one stone explaining both this riddle, and what the trailing "t" means. That's the thing I was missing.