From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: delete buffer content from the point Date: Tue, 13 Jul 2021 13:51:45 +0200 Message-ID: <87a6mqtory.fsf@gmail.com> References: <87y2aafneu.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18191"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Luca Ferrari , help-gnu-emacs To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 13 13:52:12 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 1m3GxQ-0004Up-3t for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Jul 2021 13:52:12 +0200 Original-Received: from localhost ([::1]:58124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3GxP-0004ix-45 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Jul 2021 07:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Gx5-0004ia-0q for help-gnu-emacs@gnu.org; Tue, 13 Jul 2021 07:51:51 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:55029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3Gx3-0007rr-KS for help-gnu-emacs@gnu.org; Tue, 13 Jul 2021 07:51:50 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id k32so10233041wms.4 for ; Tue, 13 Jul 2021 04:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version; bh=xtSk7t7f002IjogB/ku7KswP2i7t1Vhfoj1JkZ8qIcI=; b=oPERnwGjwtDL5isKQ6eWSgwmG9f7JOpVq4+M6FrBKoPCUDXS0fWzPCm/yLfU2PFOfY fqubmb8NBJEbWNp6Am/llL2cQmpR4QqgdKBpwlRbncfZhKvkKq+hEc0mNH7CyeTtDNrC twzavQYQG3gZat0o2T9jMDHb/Jy4y2galNLT+0zUjT5HwJ3BpsAhr4piFJiWdyTYwb1X g4gz/TZoEvlgYYymHRgr8E4IgliRnmirqtZIB6rfAi1Iz+/qsXSoW5IfNzOOZPF/Mg8k 6WGaB9Ai8FMCVZ4h8On0Z7mk8SoG7cFfPZuesyCX7hBAR5dMt+MjxQMkvlHdOWfBXFwA HXwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=xtSk7t7f002IjogB/ku7KswP2i7t1Vhfoj1JkZ8qIcI=; b=Ib4hB9imkjLYxgKQLSqUy7r+4MHBqwy06rQqrRPbTqmzUMV6qIE9kTkeI+zC5FPbzC elyyfXqHzafqdfXUWXW5eqtf3InglhN5tvjEZwBYFb5pKLJoIY2J1vUrY2U7mjYLlXJN nPUUEcLghK6jlK/7SxyM0hw05EMgz0hpw418bVS5bu3Id5pxg18LsgHo2osRhmWj7Ytg loPmWQKSf/ZQsx2R1jn/OP1EFH55GIQbELZPQ7+Y9Ipbbw0RDcQ+Cxo31CKcjzVx8Esg QGL8iVeSo9ABh6pZt4/cTrPgSzFGPxRHSTZDQijUCYdMwHhIeF+q/Yg1SWrJ5MhIgdHB i4UQ== X-Gm-Message-State: AOAM533IabT/YoQZAKF8pQ+PaoEgOPkFGprLPGrSlmvHGH3/eqWVYEBJ q6ukFlrAYLNlR/GScj8I3qMRtpgc3zA= X-Google-Smtp-Source: ABdhPJy5Oos3DGORG+//ucwd7YwiOBH5fdZram/jjOuTTJ1yZjVhp5yh7Ikrp9K8R5YZBrSK+7fNTQ== X-Received: by 2002:a1c:e91a:: with SMTP id q26mr20205151wmc.170.1626177107110; Tue, 13 Jul 2021 04:51:47 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id t16sm17630587wrp.44.2021.07.13.04.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 04:51:46 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87y2aafneu.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 13 Jul 2021 11:44:57 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=rpluim@gmail.com; helo=mail-wm1-x330.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:131678 Archived-At: >>>>> On Tue, 13 Jul 2021 11:44:57 +0000, Philip Kaludercic said: Philip> (defun local/delete-rest-of-buffer () Philip> "Delete the buffer contents from the point onwards." Philip> (delete-region (point) (point-max))) Philip> would probably do the job, without having to append the region to the Philip> kill ring. Note that this will not delete to the end of the buffer if narrowing is in effect; you'd need to throw in a (widen) for that. Robert --