From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Omar Polo Newsgroups: gmane.emacs.help Subject: Re: Execute "M-x some-command" in ~/.emacs.d/init.el. Date: Wed, 26 May 2021 17:31:59 +0200 Message-ID: <87bl8x1pg0.fsf@omarpolo.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33996"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.15; emacs 28.0.50 Cc: help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 26 17:32:43 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1llvWT-0008ZJ-Pe for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 17:32:41 +0200 Original-Received: from localhost ([::1]:59572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llvWS-0005q3-SG for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 11:32:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llvW8-0005pg-An for help-gnu-emacs@gnu.org; Wed, 26 May 2021 11:32:20 -0400 Original-Received: from mail.omarpolo.com ([144.91.116.244]:65325) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llvW4-00024Y-Vg for help-gnu-emacs@gnu.org; Wed, 26 May 2021 11:32:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omarpolo.com; s=20200327; t=1622043130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3X4ppK+J3+Q4Gp6S8O/VFdCgX50H/UMa7IFj3wPmAd8=; b=GMvTi+RqQAFRpa57GfmvSh/OrFsvqOwBVhRnlzQdAPNJ6XarUrjtd5JkCbX45r4EmoeVTw xlk/tIRMFZyAiFUMXo29/E1wpIk4yDIvas6CFPl3afgp/SjPqUFLjJWSwDBbnNwuQPf0Xm nNzclcdEgtH42Gb5tTcGQJu6q98JzjU= Original-Received: from localhost (host-87-5-224-100.retail.telecomitalia.it [87.5.224.100]) by mail.omarpolo.com (OpenSMTPD) with ESMTPSA id 03615365 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 26 May 2021 17:32:09 +0200 (CEST) Original-Received: from venera (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id c5258365; Wed, 26 May 2021 17:31:59 +0200 (CEST) In-reply-to: Received-SPF: pass client-ip=144.91.116.244; envelope-from=op@omarpolo.com; helo=mail.omarpolo.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130243 Archived-At: Hongyi Zhao writes: > See my following settings in ~/.emacs.d/init.el: > > (require 'keycast > (keycast-mode) > ) > > The above code snippet will automatically run the "M-x keycast-mode" > command. While I also tried with following configuration, but it seems > that the command was not triggered during Emacs' initialization: > > (use-package keycast > :commands (keycast-mode) > ) > Any hints for this problem? use-package' :commands doesn't invoke commands, it only sets up autoloads. You probably intended (use-package keycast :config (keycast-mode)) > Regards