From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master c9a8a47ba4: Add new user option 'yank-transform-functions' Date: Tue, 24 May 2022 18:02:11 +0200 Message-ID: <87k0aahqbg.fsf@gnus.org> References: <165299854484.648.782279094390042574@vcs2.savannah.gnu.org> <20220519221545.35270C009A8@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 24 18:32:51 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ntXSk-0002xd-QC for ged-emacs-devel@m.gmane-mx.org; Tue, 24 May 2022 18:32:50 +0200 Original-Received: from localhost ([::1]:47336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntXSj-0001Ld-F0 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 May 2022 12:32:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntWzH-0004S7-QY for emacs-devel@gnu.org; Tue, 24 May 2022 12:02:24 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:55108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntWzG-0000SU-60 for emacs-devel@gnu.org; Tue, 24 May 2022 12:02:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tHMlFb7eGLECtPc26NjdqKVDg/YNCVejh5dXMuH8Icw=; b=gfDQxJCCidsvnfzaGchUiVz7oi qdiupkvWIg2sX2hzJVrxxahyuI6GW+pauYFqYoWCxLDGjNhbBuhjdULIK9uHsyLhCfkfa7fSXWFgV 9Mbbb/9sjNHoCJTUf2OHxUYhTrA1dZYVjipc8r2WPErFwlmXbkG2XuUOM9DtDUUEqSSk=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntWz7-0008UP-M0; Tue, 24 May 2022 18:02:16 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU0GxdWLx2WTUX/ //+KXLFAAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YFGA8kOxo77YAAAAFuSURBVCjPTdCxbtwwDAZg KrB2p5AK9G3kQ3hDJwnQL8C3dciQe4sOWbIFKA9o5t5wfsr+9BVFBhv4zF8kZZFFpaFhKW83CVJk XoqIHByzzIVf5OEmE5EqC/LFkSTNjrzxlcqUHLoxNNWYhYnjP0TvJme2iRhwxB35oIUj9ORfclu6 hHBQnoyIrbIiCwsBoXVp5ScPIqBbD7WoA8i/engqyqVqw9c/XfrMrNTahnXBbE+M1XbpOWLqWQLP IGb9NiVumPtoMfezpujdFDG2sxFhWGOuvRm4BK5A0+N63XECFv3+fG1cHcPWoOvV4MBrTIpx65X3 xLtmrOMDSSbgBwoHr+iSfANCX7DKzAjKwPEFkEdHHaYMSNn/1J6ELJmoRCb82jsiG/h9eh29xGci 76jysBmhn8C7WR1lR/Tz73avZPi43/V/RY0Ijoxmxtgj4TON3WXZLjsu9gleCgUf9woVipwcwwEJ JzlthvuzbX8BZU6TIT7dm1kAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDUtMjRUMTU6MzY6NTgr MDA6MDBzmPqoAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA1LTI0VDE1OjM2OjU4KzAwOjAwAsVC FAAAAABJRU5ErkJggg== X-Now-Playing: ZAKINO, Seiichi Sakuma's _On In Out_: "What Time Do You Think It Is" In-Reply-To: (Stefan Monnier's message of "Tue, 24 May 2022 11:24:26 -0400") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290196 Archived-At: Stefan Monnier writes: >> * lisp/simple.el (yank-transform-functions): New user option. >> (yank): Mention it. > > Hmm... why is this a user option? > [ Also, tho less importantly: Why is it a list of functions instead of > being symmetric with Emacs-28's `kill-transform-function`? ] > > Are users expected to be able to make use of this with Custom? How? It's a list of functions because it's a defcustom, really. I envisioned that people might be wanting to add other things to it to (say) record yanked text, for instance. >> +@lisp >> +(defun yank-with-clean-whitespace () >> + (interactive) >> + (let ((yank-transform-functions >> + '(string-clean-whitespace))) >> + (call-interactively #'yank))) >> +@end lisp >> +@end defopt > > This example doesn't call for a `defcustom` but for a `defvar`, no? It's in the lispref manual. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no