From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: command mode-specificity [was: scratch/command 064f146 1/2: Change...] Date: Wed, 17 Feb 2021 14:02:15 -0500 Message-ID: <266369DB-BDA0-4E90-BE1E-A17048590276@gmail.com> References: <87tuqbft57.fsf@telefonica.net> <87im6rndo0.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?=C3=93scar_Fuentes?= , Stefan Monnier , emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 17 20:04:09 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lCS7M-0008Dg-El for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 20:04:08 +0100 Original-Received: from localhost ([::1]:60444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCS7L-0002IC-Bg for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 14:04:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCS5i-0000ti-G2 for emacs-devel@gnu.org; Wed, 17 Feb 2021 14:02:26 -0500 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:44619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCS5Z-0001e2-TK for emacs-devel@gnu.org; Wed, 17 Feb 2021 14:02:26 -0500 Original-Received: by mail-qk1-x731.google.com with SMTP id c3so13220040qkj.11 for ; Wed, 17 Feb 2021 11:02:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LoaqVdDcbFtp/i+jmPBpnBHfUZmWEtXL71I+EgXG/rU=; b=No+Zg19DKWYSpnuJdoGDgvvg83sIoJyTpqG8Gfny8aAWYw2vTAW3StRyqDU1CmBe5O wZW8yUpfahN5nl6gyAgzAiCVRoAAgr4tZ0zYGHg1l/DKLBxZjPaYlWCkwIi//e4qQtWV VeWDddrWYvoWCTKNgfblDsY/GpLZG3BxPJMOPTxPBM4jLalR752xfTygiANZ+zZYbcOm Tjx3t2vCWWeGvmGqxpiHJOZlV8/Yh3/uj88oRBr5A8HkAZmST9Qr7ffUSZnE3cDssN4q 4z7RGjp9k2H9jVsSnb7rRo8vuNo5CtVvHusH51QzhbgqLoM0LBfkceXqbb60Yj8LVG69 jyTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LoaqVdDcbFtp/i+jmPBpnBHfUZmWEtXL71I+EgXG/rU=; b=pqnGU1/T+MEF+fk0b2x00nQlb5m63Y+WZhDd/vMcnO6G3xJR6JRrD3XCLcy9RsBd8n oFF5vm4trcskA9hjYE9NpD471U2R2sBLsqo1XPsePNygJcs8Sl+rkuS+Z3RMhPc+2aci WygYpjDczHWBRA2ZtJO/vEPioU9qggp9+8HJGB/0fX6uClVrOlyHbKG+Ib6ir035u/L8 aEjq836W91W55/20AfISQjm5eXW9u5PoM2jx6BU/tIv33jmSalf/c2CIx9y1BB69rSpj 9pQLLO6MsWh47e8aGoPlHk1BAGFYbl4t5c3mtukyc7cCbuj+BY6+ghFB8w2Z3WqaAvv8 m9OQ== X-Gm-Message-State: AOAM532tZEh8Y5YSFAGvLis+dcd8Aqj54BgsVkNYfnpDJk0nQOc7+R0J 06TyPLfCJxsBOdsXU1eQZ44= X-Google-Smtp-Source: ABdhPJz7RUOekSvRE6Vf23GaMCl7IkRRB/IP557FSY8qr9aqDT6HmNOjhV0a3CiDBk78Scff+RlO7g== X-Received: by 2002:a37:678e:: with SMTP id b136mr603220qkc.309.1613588536711; Wed, 17 Feb 2021 11:02:16 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4102:3d80:5420:7923:759f:d94c? ([2601:98a:4102:3d80:5420:7923:759f:d94c]) by smtp.gmail.com with ESMTPSA id b137sm2358406qkg.51.2021.02.17.11.02.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Feb 2021 11:02:16 -0800 (PST) In-Reply-To: <87im6rndo0.fsf@gnus.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=casouri@gmail.com; helo=mail-qk1-x731.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265051 Archived-At: > On Feb 17, 2021, at 6:20 AM, Lars Ingebrigtsen wrote: >=20 > Stefan Monnier writes: >=20 >> Tho things can get murky: e.g. when dealing with multi-language = buffers, >> or with commands like `diff-refine-hunk` (which I often use in Gnus's >> article buffers). >=20 > That's not a mode-specific command, so tagging it as such would be an > error... >=20 > Multi-language buffers are an interesting problem, though. But... = they > work by switching `major-mode' around, don't they? In which case, > things should pretty much work automatically. (I'm thinking of > mhtml-mode.) >=20 >> IOW when you have one "language's" text in a buffer that's not using = the >> corresponding major mode. >=20 > I'm trying to think of cases where this would be a problem, but I'm > having problems coming up with an example. Org-time-stamp comes to my mind. Presumably it is intended to work in = Org Mode only, but I use it in other places to insert a timestamp. Is = there a way to easily override the scope setting for a command? And if a = new user tries to use org-time-stamp and couldn=E2=80=99t find it in = M-x, how could he know the problem is because of this scope setting? Yuan=