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.devel Subject: Standardizing more key bindings? Date: Sun, 27 Sep 2020 11:31:03 +0200 Message-ID: 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="25200"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 27 11:32:07 2020 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 1kMT2N-0006Sx-7f for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Sep 2020 11:32:07 +0200 Original-Received: from localhost ([::1]:40258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMT2M-0002v3-7c for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Sep 2020 05:32:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMT1Z-0002Uv-Es for emacs-devel@gnu.org; Sun, 27 Sep 2020 05:31:17 -0400 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:36258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMT1X-0004cZ-Iy for emacs-devel@gnu.org; Sun, 27 Sep 2020 05:31:17 -0400 Original-Received: by mail-wm1-x329.google.com with SMTP id e2so3618566wme.1 for ; Sun, 27 Sep 2020 02:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=MDrxNHDFLE7dudiNKIxTzRfFfxMSiqvHgC9beovee9k=; b=Ams8A0D76sTYNbKqbGuV8VPGVUdZ19TUd3kXKxFY/bCT1Pc1D1/nU/aAsJ9S55klIm O5S0KoWc9C15UjytRN8LLw1L1hi2cUERyQpCTdEHaZU4fuqzkZ/p81afLDyDlLNOUSM+ pmN/ldrO+tW27HaaQ2CHlHZyWauF1crjPEMAorvRCIHyQ8OzQKHrWw7D64ZklbrFiyKs pKgK/OnhEN9S1/LW24KA65Rcs72Zsh7nnPP2mNd/m3+Kh8hOp+iZ8gCAihrrAvD/QhWD hCnrRTUg3vAKa7kdZS5vLpW5vPVY3vZPMgK+QsXPPIfw/v69MnGHCAFZtCUdJsS2xhwr UYnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=MDrxNHDFLE7dudiNKIxTzRfFfxMSiqvHgC9beovee9k=; b=gvjuhYRi6eZf77v/GmpGCsB5vIrxkO2zm/MJE+MHkgD9il/0k152rap7gTHieGjbgp QUmWh3wSOE3VLa5YlPdrlTyZIoxJHlE48GR3Zd8VKW5Tm0vVY6y8g01M+ciAJcBfjTtI I4ecdw1I7OZ7ko3cCWTJnWCtcm2nYqmJBRntOxj8CBgvgfuZczFDcjQ9N5DpYpZQW3Qs kQwHFeYxguGF540ZHQz7Ff8dUVLdXorwF5Pl140/Sp3Flk+dZy/R/+9O2+Bu3UhmPZP0 M4ekouGbsYR9U3Sj/y9eEWXiEEDec7ulEITBO4eMkCt16q+JwJqztihMFTCVp3SbF6k7 tyYg== X-Gm-Message-State: AOAM530F3bnIFx/r2hsInO5GBgqA/iTdePSHtueV8CEIGiW8k0eY3JwK JphvxcW/FZzH9Z0xQ3p96tRp4XPtM2q9cAt0B0Pd/8KTDEHocA== X-Google-Smtp-Source: ABdhPJxYwlEm2yQIuoW0y1HDcYjJ9pEPbd0Pjf0o+lnVJlcMTw6LUX6wswHtpzp/SwV3W43wPiaMaPKNyRn1PeyGgkA= X-Received: by 2002:a7b:c4c3:: with SMTP id g3mr6626558wmk.128.1601199073626; Sun, 27 Sep 2020 02:31:13 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=thibaut.verron@gmail.com; helo=mail-wm1-x329.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, 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:256524 Archived-At: Dear all, It was pointed out recently that one of the features of spacemacs and the like offer is that key bindings are better standardized across packages. The example given, I believe, was sending a region to the REPL. This kind of standardization is something that Emacs already does, for some commands: we have indent-*-function, revert-buffer-function, for instance, which make it easy to bind similar behaviours to the same key across major modes. For the REPL example, I guess it should be possible to split basic functionality into some well-defined functions, and let packages assign those functions? Like a comint-create-process-function, a comint-send-region-function, a comint-send-buffer-function, etc. It doesn't seem too complicated to implement, but it would require precisely identifying the meaningful building blocks, and package maintainers would have to refactor their code to make use of those variables. I seem to recall Stefan bringing up such a discussion a few years ago, the goal then being to simplify setting up a comint buffer. Another possibility would be to define variables for "preferred" key bindings for some behaviours, so that packages would only have to bind those if non nil. This is minimal work for the package maintainers, and also easy to do by third party (fourth party?) packages or by the user for packages which are no longer maintained. But that would be a new concept for Emacs. Both options can be tentatively implemented as a separate package (similarly to no-litter). What do you think? Best, Thibaut