From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WJh3AWFTr2KGAgEAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 18:48:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gL1NAWFTr2KW8AAAauVa8A (envelope-from ) for ; Sun, 19 Jun 2022 18:48:33 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BC11D16E35 for ; Sun, 19 Jun 2022 18:48:32 +0200 (CEST) Received: from localhost ([::1]:34684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2y6B-0000la-U9 for larch@yhetil.org; Sun, 19 Jun 2022 12:48:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2y5h-0000lC-0N for emacs-orgmode@gnu.org; Sun, 19 Jun 2022 12:48:01 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:61852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2y5f-0006Tm-Ea for emacs-orgmode@gnu.org; Sun, 19 Jun 2022 12:48:00 -0400 Received: from tosh-laptop (unknown [IPv6:2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp1-g21.free.fr (Postfix) with ESMTPS id 285BBB0055A; Sun, 19 Jun 2022 18:47:55 +0200 (CEST) Received: by tosh-laptop (sSMTP sendmail emulation); Sun, 19 Jun 2022 18:49:14 +0200 From: Bruno Barbier To: Ypo , Org-mode Subject: Re: Keybinding doubt about ARG In-Reply-To: References: Date: Sun, 19 Jun 2022 18:49:14 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: softfail client-ip=212.27.42.1; envelope-from=brubar.cs@gmail.com; helo=smtp1-g21.free.fr X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MISSING_MID=0.497, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action Message-Id: X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655657312; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=KoNq57VAAAJC//LSfuBeeITADafy5axXC0zvoBG/w0w=; b=nSSJVpVbXngUD8mQ9kmki8EV6X2S72qO4zlaDX2MJU63YKS5DK9se3f9dfOENUFEoakHQg wLr9xDrjDqHA1ggRocKva07UOsTkc/Nwzcu9k8k84KksTe5QGgFvBCl6JYebMLThRGbde/ 9W6Ynr58c/epUDavWa+1Ttl3SESShfnG/h6Ofql7bx8dMK5jwekZh9ygH47x6fdeHCSZc0 8nzSBncJApayStTAnzXnkJPKs91yaXR3JtlHce+tnWzzPDDfnu77GT0PMrFdqKFYRFTp8c OXtZWCeZdarLRAOqOIgHUfNScCO0FRRb9Njr10SJ+7sYgxjjPQRGRwYA5Jn1tA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655657312; a=rsa-sha256; cv=none; b=YT3yS/CCGzpgMn26yMSJstGPagjSRmPBWUYfdlInIpV7lgcHlqKH9XNsRC0H4GgI1GTPP7 rEtl33rYjqp3au+t2/7+eRNv7b+c0S+tReDwp5epcW38k1sPBJPXNwNQVth06Ux9RasMOo BzJluT+ZqC7t6CKmwWBSh62K9zDEa+HfScRBsLeMwSxETBpAPTaByy35HSUee1FZ+JQ4E/ UtGFN7qxzr7puoQihf1fS0EO2rpEDkvfwQMI3Zv3/k/5zS0EqD+8fn0MQiHukt2wyVv1jn Oq7Ntkq9FcAPn3oFwlD4nqAm5piN/8B8ut2O78wVc3Nw4xVjVtUJw6Fru67K8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.72 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BC11D16E35 X-Spam-Score: 1.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: tjwLdh4Ooi7E Ypo writes: > Is it possible to use ARG when defining keybindings? > > For the command (scroll-up-command &optional ARG) I want to define this > keybind: > > > (define-key global-map (kbd "M-n") 'scroll-up-command 1) > > > But: > > eval-region: Wrong number of arguments: define-key, 4 I don't think that 'define-key' allows to specify extra arguments. But, you can easily define your own command. (defun my-scroll-up-of-1 () (interactive) (scroll-up-command 1)) (define-key global-map (kbd "M-n") 'my-scroll-up-of-1)