From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: append, push, and add-to-list. Date: Mon, 5 Jul 2021 14:19:41 +0800 Message-ID: References: <8735suaw71.fsf@zoho.eu> <87czrxifp4.fsf@zoho.eu> <878s2lidp1.fsf@zoho.eu> <874kd9ia1a.fsf@zoho.eu> 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="901"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 08:20:40 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 1m0HyB-000Ad8-6y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 08:20:39 +0200 Original-Received: from localhost ([::1]:49060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0HyA-0002Mq-2y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 02:20:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0HxZ-0002Mb-2B for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 02:20:01 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:33345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0HxT-0000fH-Rj for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 02:20:00 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id t17so30563070lfq.0 for ; Sun, 04 Jul 2021 23:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=5sDUxhcE8DFmQCc3wgngFPO/7bbFh9Iiq6TGjIuk5rc=; b=vX0o2nGkQivwbHnbseqqQ9t8K4gYeixC2c9sc0+GqE6DGCkZJnyxMSXjhtv/1ApXIF f5GyyfeMb/pyseMkO7QuB1zEM1HYsT33NT8/d/OifCuHT6ZcwGMesW8RA4HTuY+Wo0ri Km9rVGhqrLangDQsRAyJF/dz19ZxNyf3oihINzU+Wk6rgHwBWmzj3NecrZBH94+YaqTj 6+gooBjw87dMthiPg3ONcmqFCj1r3XHZiKZYiF4eqEKb0EYI70lQnmW+qnK9anSd22Sg VXJimU6wyLPTQGjoFEGam97nUZh2DDmYf8+Xlm4DGp7r2WGaz2t+pthtHa18sHEifUg2 tq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=5sDUxhcE8DFmQCc3wgngFPO/7bbFh9Iiq6TGjIuk5rc=; b=B4nY78Rgk1LbWQh/5ERk15S4vds+IdJQg0KhT+zfefYForws504m5ziVsX52zox7AD ui7iq4y6y8jjD/S7P6zdiUgew6NKDj40HWmPhkS02HmP1SFXWuAmNYozeLWyDWlkpZrc hMOzbtoKRD9aENdaOSrH9IrIMbjxdmwCvaEWtXcmNShsjWkyqdf1Eh1pY22EZEs/gktY 9lRVRS06GQYQEkRt/frJl6NELl2tPRlQZme8Z+uStAie2yA4kC3qQH7Mw/opHImKXneb es9oEL8b8VNVNy34nkELJPHDMtm9MFtvNL12T2XrRS61oxdHw8x0QJOwjD1Y0T6Ax9GA blJg== X-Gm-Message-State: AOAM533Fi7UiivoCDgTyAasA3XrZjohXfBie3yrhvmm+tIaqHL95qREo K/oWIpX75SXGbemEt6ORTQ8ez3BFWEG4/A5Mx4A= X-Google-Smtp-Source: ABdhPJx73KDzfuiH0vTaXzcCfhZ102Bhmqe9SITM93cx27P89Fhgh7OuK8wkz2kHi6MUdQkn8FqARABA0thy+ETS6X4= X-Received: by 2002:a19:ee13:: with SMTP id g19mr9103952lfb.484.1625465992753; Sun, 04 Jul 2021 23:19:52 -0700 (PDT) In-Reply-To: <874kd9ia1a.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x135.google.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, 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: 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:131473 Archived-At: On Mon, Jul 5, 2021 at 1:51 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > >> (setq lst '(a b)) > >> (setq lst `(,@lst logic) ; (a b logic) > > > > You have a typo here, should be the following: > > > > ((setq lst `(,@lst logic)) > > Heh, yes but now there is another typo :) > > It should look like this: > > (setq lst '(a b)) > (setq lst `(,@lst logic)) ; (a b logic) > Yes. Thanks again. > > Wonderful examples, but how to eval multiple line lisp codes > > in scratch buffer? I only know with twice hitting of `C-j' > > for this job, as shown below: > > You can use `eval-buffer' I tried with `eval-buffer' but can't see the expected output. > or enclose it in a `progn' perhaps. > Or, for this particular example, `let'/`let*'... > > I have M-9 do `eval-last-sexp', more ergonomic IMO than > whatever is the default binding... > HY -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China