From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: SMIE questions Date: Thu, 23 Jul 2020 13:52:22 +0200 Message-ID: References: Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9639"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 23 13:53:06 2020 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 1jyZmc-0002Pp-FL for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jul 2020 13:53:06 +0200 Original-Received: from localhost ([::1]:46584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyZmb-0005Dp-Au for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jul 2020 07:53:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyZm9-0005CT-SP for help-gnu-emacs@gnu.org; Thu, 23 Jul 2020 07:52:37 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:50752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyZm8-0004sT-79 for help-gnu-emacs@gnu.org; Thu, 23 Jul 2020 07:52:37 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id c80so4704777wme.0 for ; Thu, 23 Jul 2020 04:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=x/dO30gr5Q8OEj6r/WoAiAjERuNFIv1bgVddWUeOBL0=; b=uaXihTS/WlQoRQUmzQ/RslC8bD5kHyYqi02nHaTPH9vhFfDBt7tFOz0SnJkvDcTZOf 4iiAMIoSUiw7zUm9P7UimPjkaJduk+sn4PpqGLhWxKIRXyEWZnincYnqp4nTLzUHHe+T hr9OtsdFUXCaIhH7rJd1/NlnlB8FquW0+r3pvGWJ+wnG754Um1mHWtKxmLJfH4d4dUn+ brG1rf7+6FWBrhDdcZ+1Z89UGvf7FCk4h8qQV1rgpoO2mcijbjP47bluknr/3ifRe8Qy /3zemLWPLS94ObZJQ4uVZzyo6+mPDb77KBYLqFAjQSg9SzU1sF/kz971bZYbN+UDpNj7 zomw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=x/dO30gr5Q8OEj6r/WoAiAjERuNFIv1bgVddWUeOBL0=; b=LUKLYhnVWHJl7SOhCs54Ur1Wv9ob/efptKCUsTe/om1ku+iKCmFUYnFmmYwIsBiIl/ wTz/bakK+GyTmopcTZ1Sn3r8kTXsTXyy+2lxwcnWVQBUQzGe5nspOIj/uPDmWhGGhBHx gLKi4kXc9/FwxWL5YguAPZTaNX5+G9qlExWE7ZcHa52l3XScI65TLvcaYo2lO4NIPlT4 sb81Oe6y9lOk3CfSkpmZd5IepaLT//77P+n8mKy8/W8MyOegrh3Hcc6LXBf9hO0+bOuZ gQTuDzP3kq4LFFgu0SY0sYZLM+84Abh3+JK5d3Mdt6nDF2ifYWCTZ64knDbwdviJVBZc AcfQ== X-Gm-Message-State: AOAM531oCxcijROjIHr8B52BFB7e4qvyuIWELftV6OBbYSPDJ0O0wf75 h9Vnk5jb3MeGf+YA6/UktoFCL8t15x8UlW4r3bBIU2ax X-Google-Smtp-Source: ABdhPJyUlSTmrR+eLPnC5bIWVNnLewv70o/n3DYlD9NgJgAiZApdTW75lS8gtRD1vQsRpvLudaio9SwzRyuIYcDWwwQ= X-Received: by 2002:a7b:cb8d:: with SMTP id m13mr3627224wmi.184.1595505153231; Thu, 23 Jul 2020 04:52:33 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=thibaut.verron@gmail.com; helo=mail-wm1-x330.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, HTML_MESSAGE=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-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:123573 Archived-At: Hi, > - How are the calls to the rules function determined? For example, if I > indent before the quote (point 42), the function is called 2 or 3 times: > once with :list-intro, one with :elem args, and once (if the previous was > nil) with :elem basic (incidentally, there seems to be a small mistake in > the documentation there). > Okay I think I have figured that one out: if string quotes are part of the syntax, the lexer needs to return them as tokens. Now, if I do this, I can control the indentation of the docstring as I would expect, but I cannot indent the next line, it results in Error: (wrong-type-argument number-or-marker-p noindent) If I replace the quotes by regular parentheses in the language and the grammar and the lexer, it seems to work fine. But if I give a syntax-class of string-fence to those, the same error comes again. It seems that the trouble is that smie somehow tries to indent in the middle of the docstring, and for that calls smie-indent-string which returns noindent. What I don't know is if it is because my grammar is wrong, or if I should report it as a bug in emacs. Thanks, best regards! Thibaut