From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: A short defense of shorthands.el (but CL packages are still better) Date: Tue, 08 Nov 2022 00:02:38 -0500 Message-ID: References: <87leoqfbrh.fsf@gmail.com> <87tu3b9ifi.fsf@gmail.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1224"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org To: =?iso-8859-1?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 08 06:03:20 2022 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 1osGla-0000BL-Va for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Nov 2022 06:03:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osGky-0000Bi-Tr; Tue, 08 Nov 2022 00:02:40 -0500 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 1osGkw-0000A0-U3 for emacs-devel@gnu.org; Tue, 08 Nov 2022 00:02:38 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osGkw-0007r9-LL; Tue, 08 Nov 2022 00:02:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=CJEius8jxVtr/ghyotCYmqXc3xOBESZ9pxVDFKJgu4Q=; b=DcS9hJckE3DF 6K8vOev1+6F62nCELnPPUM4vRaN7Agj68H9dP0F4UB0I4L9B1C46S6r/wbLz/grT0en/QMxEMUMYg sm/AUYdv4qPiAdb1xbu6vO9UvEPnOyIQvDD37S6AAS7ct4p2SR6YwJbEiuafDncKH9ZdQ1L2Pdi8F E28+oo9zhyiy8C7fyJyzZAFHnC2Tkf6Tdvvedt86/ARx7e810Wp1VAA2DOP90vnT67wN3+LjzGda3 0tKSFKaX8sBLdlvK3aGRbyXS5YwgAL/sPwO+uUg2kyvqri+yUiQSDuKtn0YRZtCIHPmv7NU1ZM1qc 7It47l8wNI6/jjvd+VKTcQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1osGkw-0007xK-3q; Tue, 08 Nov 2022 00:02:38 -0500 In-Reply-To: <87tu3b9ifi.fsf@gmail.com> (message from =?iso-8859-1?Q?Jo=C3?= =?iso-8859-1?Q?=A3o_T=C3=A1vora?= on Mon, 07 Nov 2022 10:18:25 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299311 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > You would see, in the Emacs echo area line, the indication > xenomorph-foo: (POINT) > every time point is over a reference to the function x-foo. Is that behavior bar? What behavior would we prefer ElDoc to implememt for such cases? Would we want it to show `x-foo' instead of `xenomorph-foo' in the echo area?, How does ElDoc know to apply the shorthands for x.el when looking at the text of x.el? Does ElDoc have code to do this explicitly? > > Maybe you're right about C-h f, but you have not specified the > > scenario fully. What does the user actually type, to invoke it? > Type this: > C-h f x e n o TAB RET > This will most likely lead to a *Help* buffer displaying xenomorph-foo's > docstring. That seems correct to me. `xenomorph-foo' is a defined function; why shouldn't C-h f know about it? > way you invoke the interactive function defined above is > M-x xenomorph-foo RET > _not_ > M-x x-foo That too seems correct to me. When I consider the case of `string.el', which would rename s-* to string-*, these all seem like correct behavior (though M-x won't allow these functions under any name, since they are not interactive). > And if the function ever signals an error, and you have the debugger > activated, then this is what shows up in the Backtrace: > Debugger entered--Lisp error: (error "ohno") > signal(error ("ohno")) > error("ohno") > xenomorph-foo(104) > funcall-interactively(xenomorph-foo 104) I think that is correct, too. It might be confusing if you are looking at the source of x.el and you don't notice it uses a shorthand. Nonetheless, it is correct. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)