From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: VanL Newsgroups: gmane.emacs.help Subject: Re: binding b-key to pageback behavior Date: Mon, 25 Nov 2019 22:02:41 +1100 Organization: President Trump 2020 Keep America Great =?utf-8?B?yZnJmTBA?= Ultimat Fighting Cybr Message-ID: References: <86blt0d88p.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="10075"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 25 12:04:06 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZCA1-0002Tx-MT for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 12:04:05 +0100 Original-Received: from localhost ([::1]:42388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZCA0-0007Tr-HT for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 06:04:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZC9H-00076Z-R2 for help-gnu-emacs@gnu.org; Mon, 25 Nov 2019 06:03:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZC9C-0006BW-DU for help-gnu-emacs@gnu.org; Mon, 25 Nov 2019 06:03:19 -0500 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:47884 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iZC9C-0006AJ-6N for help-gnu-emacs@gnu.org; Mon, 25 Nov 2019 06:03:14 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1iZC96-0001QG-A4 for help-gnu-emacs@gnu.org; Mon, 25 Nov 2019 12:03:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:EmSit6V7uXUBN7PNX4Kh9Scukkk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121886 Archived-At: Emanuel Berg writes: > VanL wrote: > >> Is there a general configuration to bind >> b-key to pageback? > > Well, how would that work? In your code, it > isn't even the same function, it is > `scroll-down-command', then its > `View-scroll-page-backward'... And even if it > did, after evaluating it one wouldn't be able > to write this very message! Those modes the customization is done to are for reading only in the main. SPC behaves as expected there and I look for the reverse binding to apply to b. > What you can do, is something like: > > (defun set-vertical-keys (map) > "Set MAP keys for moving point vertically." > (define-key map "i" #'previous-line) > (define-key map "k" #'next-line) ) ; [1] > > and then, for example for the > gnus-summary-mode, do > > (require 'gnus-sum) > (set-vertical-keys gnus-summary-mode-map) > > Also, I'd recommend not doing this in hooks, > unless you have to. Thanks for the suggestions. Are you able to put a LICENSE on your code? For example, I keep a CC0 empty file and.. #+NAME: example #+BEGIN_SRC c /* ,* Copyright (c) yyyy xxx ,* ,* Permission to use, copy, modify, and distribute this software for any ,* purpose with or without fee is hereby granted, provided that the above ,* copyright notice and this permission notice appear in all copies. ,* ,* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ,* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ,* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ,* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ,* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ,* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ,* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ,*/ #+END_SRC > [1] https://dataswamp.org/~incal/emacs-init/scroll.el -- əə0@ 一 二 三 言 語 𝔖