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: Thu, 25 Jul 2024 14:33:03 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000baf488061e16a070" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23727"; mail-complaints-to="usenet@ciao.gmane.io" To: 72298@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 20:35:21 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 1sX3JB-00065J-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 20:35:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX3Im-0000Bz-50; Thu, 25 Jul 2024 14:34:56 -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 1sX3Il-0000Bo-1r for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:34:55 -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 1sX3Ik-0005ow-Q1 for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:34:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sX3Is-0003nq-9M for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:35: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: Thu, 25 Jul 2024 18:35: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.172193247114573 (code B ref 72298); Thu, 25 Jul 2024 18:35:02 +0000 Original-Received: (at 72298) by debbugs.gnu.org; 25 Jul 2024 18:34:31 +0000 Original-Received: from localhost ([127.0.0.1]:37761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX3IM-0003my-R0 for submit@debbugs.gnu.org; Thu, 25 Jul 2024 14:34:31 -0400 Original-Received: from mail-vk1-f177.google.com ([209.85.221.177]:58770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX3IK-0003mk-FV for 72298@debbugs.gnu.org; Thu, 25 Jul 2024 14:34:29 -0400 Original-Received: by mail-vk1-f177.google.com with SMTP id 71dfb90a1353d-4f52c326501so564743e0c.1 for <72298@debbugs.gnu.org>; Thu, 25 Jul 2024 11:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721932395; x=1722537195; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=CUTSLfuWPNAjUjbL7amfe4qzAATBUPGzfmhPQCVgaVk=; b=RYJ1PIqH4Y/DJ+j6gfLOjttXMTEVbxzrunOhFYe8UXo0QqDkAHenQ6P6QTsdMJxv0k 76e7fYGVRiuVSPqtFVGLHB05As1ZtYDsxmCyMaQBeLvklIrcq443uFIz+763gm1xRfWc lzqGQa3OyTolDeuDWkMVVVXX5xf4Pb8lrIUPjjGO2XrzCB45Oacry+FieIixvMmSaQhj bSIG0bpFpcrtblM2zWozTX56AtO4NRshs4NiNC8ZyZixnCeGZU+uPRsoBIwswU5HJH5N 3irZKXkccEZUVQ+3EADqmfPkSVN7pbidk01c7Ily3c5xbF8N7DA00uNhd8NPNdT+tMjM BC8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721932395; x=1722537195; h=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=CUTSLfuWPNAjUjbL7amfe4qzAATBUPGzfmhPQCVgaVk=; b=iwiHv1R7jidd7ll/1nyc8/Nx6hdXIeq01W0Vpt18PoHYxRoODWxXBCTv6uJTFGbFD3 LC1c2AVE3722qjACiEiHqHPmIeoaVAvt/8viZ1frSVcBwEuI4GPfRheqKXZ6vnUn/0Y3 881qGWxy9ndxEUtYlz/lndcdTAOHf6VhBlZoNpUm64m87YVeR4YlPyEFhnihLJ9bbpG5 pC0jDWWXxJVdNpwCk8Nm9JvbrSG2FbhetzQa+ZunGfOJnW+DIzbzXOmGdGCnTCBh95yv bhw+8Lk6Ie4kXAVrdib10vn4E7/Tl6E44zna2r2tVyX0EX4cAzT+/v4Zl7ta8d2FV7KI ebmg== X-Gm-Message-State: AOJu0YyPZPfD5I77xc3tjoMobWCIcR76Gaf7MpOOR6uDJabJe1xrmXEp WPzDhjizFhJWkSsVueUBXhiCKD3MHOUyfLbLFgEyqp+Ymh1Jxn4yJw43OL4ZHkjL/V/4YP/X/e0 3g5uMeMpT1C59nio1Ds09uPOVTGqIpK+C X-Google-Smtp-Source: AGHT+IG6G7Xjb3zvbGX3eMjpF7oaUwe7tgnoRq+IFPhoG/7SnABecZpUKQ3tj5yYIPF1LeARyCve/n8VduOPeZwZW7A= X-Received: by 2002:a05:6122:d97:b0:4f5:2a42:d51e with SMTP id 71dfb90a1353d-4f6ca586091mr2886395e0c.13.1721932394982; Thu, 25 Jul 2024 11:33:14 -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:289331 Archived-At: --000000000000baf488061e16a070 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 wr= ote: > 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 fro= m > 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 manuall= y > to be shared. Perhaps other people have the same expectation. > > Thank you, > > Stephane > --000000000000baf488061e16a070 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
An example of a personal hack to make this work could be to add somethin= g like this to a python-mode-hook:

(if (derived-mode-p 'python-base-mode)
=C2=A0= (setq local-abbrev-table python-base-mode-abbrev-table))
On Thu, = Jul 25, 2024 at 2:15=E2=80=AFPM Ship Mints <shipmints@gmail.com> wrote:
I was expecting that python-base-mode-abbr= ev-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 d= oesn't work for me.

(define-abbrev-table 'python-mode-abbrev-table ()
=C2=A0 = "Abbrev table for Python mode."
;; should=C2=A0this:
=C2=A0 :parents (l= ist python-mode-skeleton-abbrev-table))
;; be defined thusly?
=C2=A0 :parents (list pytho= n-base-mode-abbrev-table python-mode-skeleton-abbrev-table))

I tried to find guidanc= e on this outside of hacking abbrev tables manually to be shared. Perhaps o= ther people have the same expectation.

Thank you,

Stephane
--000000000000baf488061e16a070--