From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#72298: Should python-mode-abbrev-table declare :parents python-base-mode-abbrev-table? Date: Sat, 24 Aug 2024 10:14:57 -0400 Message-ID: References: <86cylynwbi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e3472c06206e8471" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 72298@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 24 16:17:43 2024 Return-path: Envelope-to: geb-bug-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 1shraI-0003TA-EL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 16:17:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shrZx-00015k-6I; Sat, 24 Aug 2024 10:17:21 -0400 Original-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 1shrZr-00015C-AJ for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 10:17:17 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shrZr-0008PH-19 for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 10:17:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=E2zbmCLAsTZXJaXg0Pv7heGtlP/n51gaWw9cD1isWaw=; b=GIvI3akfhuE7KeDs2XHa3DrjcHzDO3HifKC3O7XxiY1sV7VpNwRhsG7HMHtjVAcX7BkCF0wDCS0ZjvGX9Sfzr9QHV0aCF7JMIoQXbf3/Nao+iox69N1qfT3NO8ulvMtEjiWeR+pizPm/Dr7EaQJ/YUOaNNHksoXvXo/bODeqGZkg6nCDQMcgy+LY03eW8Fl/oHq8e7Q/IhsoXB4mgZfMBy2Y2/yvp/USVZGm649kooN8eEneJLFqUQnoKN0x4bdx/GDFgqhLvflTAjJ3Yhd/VHrm0X2JfnRivPQCbcl8GGq0Mc/LG/fWoeKqRzcj10NH3B8zcvJL44DZN+QvofRtTQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shrac-0000LH-Ae for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 10:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Aug 2024 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72298 X-GNU-PR-Package: emacs Original-Received: via spool by 72298-submit@debbugs.gnu.org id=B72298.17245090251194 (code B ref 72298); Sat, 24 Aug 2024 14:18:02 +0000 Original-Received: (at 72298) by debbugs.gnu.org; 24 Aug 2024 14:17:05 +0000 Original-Received: from localhost ([127.0.0.1]:41747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shrZh-0000JB-2u for submit@debbugs.gnu.org; Sat, 24 Aug 2024 10:17:05 -0400 Original-Received: from mail-oo1-f50.google.com ([209.85.161.50]:49634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shrZe-0000IN-Qn for 72298@debbugs.gnu.org; Sat, 24 Aug 2024 10:17:04 -0400 Original-Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5d5e1c86b83so2335975eaf.3 for <72298@debbugs.gnu.org>; Sat, 24 Aug 2024 07:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724508908; x=1725113708; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=E2zbmCLAsTZXJaXg0Pv7heGtlP/n51gaWw9cD1isWaw=; b=UWXOC/8Tetf9iOON4wiVbg4kdN86tksCPnU5NjqoSb38XUiWBWRB0hzYMFthCjHoCb AohfipGlRwk9gbfdEg46uCkaTG0YIgs0HWBacUqxDXEpGtuKlo9L5OCV4y3swlXqdr0W HuSv2/uT0gJzZQuOXMH6VPthBcyFxt0ijXGdLm42DKeuHmJ3M2EwMTCfkwfO3eudbych +ewVxpivyk58f7Bul9RnQ3RYUVwk0umEOe+FvmMYGhF8/iQWaezAWL4NYWdu4CZABJMj yH+jm3Hg67FROKIMaW7LK1VIbWR/XfFBxjFNFgTK3UWf3Hj+ZwdMQwVZDohPCm0Ha+5h J/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724508908; x=1725113708; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E2zbmCLAsTZXJaXg0Pv7heGtlP/n51gaWw9cD1isWaw=; b=CF3WkQBLnzX9iZ39QZqFDtvoHObKNZlTOPhYdA9naFa+xHQS9Ah6h7pH1CPTLeEPJw heg2o0AC8FoaS5807U+6oUfwJfNBcPWD7cRviTBSuolMDwvUywA6nMmirLe4UT0XnLaC kGgiUgC48r3aEJ6ypWmToxhC3/TeE4SPb/RSFOWt7AOkJHX/nsiSSVxHRhU2qvbIgeyY JSoEEYuX5jNUrx5URDy7cQzh1hj2UD/zbZaYyEGu+mpKUtv/O2b1uh774rJ6jVZb465T pkLCnUEB7bvmUbB5pIcrWTtufwkcUY6RpnTqQpfBEyBSK4DTPbjWamJPgUQOu0YAiHoR Nptg== X-Forwarded-Encrypted: i=1; AJvYcCWsPI1NbpwcX1su8cWYpzKf2kjxQ2GVVxwqHXpGG789WMFbPZq0ruFieBlboaJxTFBd1NyjXA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx4ydzI53nKkzrUJk6U/gNuh1UEQ4gO2CsberPvGnBDucyB8ylg 8AwlbOAFh5A66sz9QbsXRhKmEdgBxHoT7cGTUND/PKG5fVk5IQfVCx7L3BkfIxsmjeL9XxzCU3u uObXPCsskC41c4Ws3poA6AzFtt24= X-Google-Smtp-Source: AGHT+IGIONWNt3hTouqQORjQaWVFEcvH/tVYg4UZbYE0qDdizp5oCKki37aNz05Ne2rg+uEX+v5+yMVvgLy/PF710aE= X-Received: by 2002:a05:6358:5908:b0:1aa:c71e:2b5b with SMTP id e5c5f4694b2df-1b5c21edd9emr549377255d.19.1724508908239; Sat, 24 Aug 2024 07:15:08 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290674 Archived-At: --000000000000e3472c06206e8471 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you. Will save confusion for people. On Sat, Aug 24, 2024 at 7:30=E2=80=AFAM kobarity wrote= : > Eli Zaretskii wrote: > > > > > From: Ship Mints > > > Date: Sat, 17 Aug 2024 09:53:15 -0400 > > > > > > Greetings. Curious if I'm barking up the wrong tree with this > assessment... > > > > > > On Thu, Jul 25, 2024 at 2:33=E2=80=AFPM Ship Mints > wrote: > > > > > > An example of a personal hack to make this work could be to add > something like this to a > > > python-mode-hook: > > > > > > (if (derived-mode-p 'python-base-mode) > > > (setq local-abbrev-table python-base-mode-abbrev-table)) > > > > > > On Thu, Jul 25, 2024 at 2:15=E2=80=AFPM Ship Mints > wrote: > > > > > > I was expecting that python-base-mode-abbrev-table would apply to > both python-mode and > > > python-ts-mode buffers. python-ts-mode doesn't derive from > python-mode so the abbrev tables > > > aren't shared by default. Unless I'm missing something, using a base > table doesn't work for me. > > > > > > (define-abbrev-table 'python-mode-abbrev-table () > > > "Abbrev table for Python mode." > > > ;; should this: > > > :parents (list python-mode-skeleton-abbrev-table)) > > > ;; be defined thusly? > > > :parents (list python-base-mode-abbrev-table > python-mode-skeleton-abbrev-table)) > > > > > > I tried to find guidance on this outside of hacking abbrev tables > manually to be shared. Perhaps > > > other people have the same expectation. > > > > kobarity, any comments? > > It seems to me that the skeletons should be defined in > python-base-mode. How about the attached patch? > --000000000000e3472c06206e8471 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you. Will save confusion for people.

On Sat, Aug 24, 2024 at = 7:30=E2=80=AFAM kobarity <kobarity= @gmail.com> wrote:
Eli Zaretskii wrote:
>
> > From: Ship Mints <shipmints@gmail.com>
> > Date: Sat, 17 Aug 2024 09:53:15 -0400
> >
> > Greetings. Curious if I'm barking up the wrong tree with this= assessment...
> >
> > On Thu, Jul 25, 2024 at 2:33=E2=80=AFPM Ship Mints <shipmints@gmail.com> = wrote:
> >
> >=C2=A0 An example of a personal hack to make this work could be to= add something like this to a
> >=C2=A0 python-mode-hook:
> >
> >=C2=A0 (if (derived-mode-p 'python-base-mode)
> >=C2=A0 =C2=A0 (setq local-abbrev-table python-base-mode-abbrev-tab= le))
> >
> >=C2=A0 On Thu, Jul 25, 2024 at 2:15=E2=80=AFPM Ship Mints <shipmints@gmail.com> wrote:
> >
> >=C2=A0 I was expecting that python-base-mode-abbrev-table would ap= ply to both python-mode and
> >=C2=A0 python-ts-mode buffers. python-ts-mode doesn't derive f= rom python-mode so the abbrev tables
> >=C2=A0 aren't shared by default. Unless I'm missing someth= ing, using a base table doesn't work for me.
> >
> >=C2=A0 (define-abbrev-table 'python-mode-abbrev-table ()
> >=C2=A0 =C2=A0 "Abbrev table for Python mode."
> >=C2=A0 ;; should this:
> >=C2=A0 =C2=A0 :parents (list python-mode-skeleton-abbrev-table)) > >=C2=A0 ;; be defined thusly?
> >=C2=A0 =C2=A0 :parents (list python-base-mode-abbrev-table python-= mode-skeleton-abbrev-table))
> >
> >=C2=A0 I tried to find guidance on this outside of hacking abbrev = tables manually to be shared. Perhaps
> >=C2=A0 other people have the same expectation.
>
> kobarity, any comments?

It seems to me that the skeletons should be defined in
python-base-mode.=C2=A0 How about the attached patch?
--000000000000e3472c06206e8471--