From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: A patch for `pwd' - copying the current directory to the kill ring Date: Thu, 01 Feb 2018 22:11:16 +0100 Message-ID: <87vafg1kln.fsf@mbork.pl> References: <871sieozdg.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1517519722 10096 195.159.176.226 (1 Feb 2018 21:15:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Feb 2018 21:15:22 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 27.0.50 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 01 22:15:18 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehMCL-0001sE-RL for ged-emacs-devel@m.gmane.org; Thu, 01 Feb 2018 22:15:09 +0100 Original-Received: from localhost ([::1]:35515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehMEM-00025J-KP for ged-emacs-devel@m.gmane.org; Thu, 01 Feb 2018 16:17:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehMDC-0001jK-Gy for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:17:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehM8o-0002AF-ES for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:16:02 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:51767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehM8o-00029R-0i for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:11:30 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 3221AE66F7; Thu, 1 Feb 2018 22:11:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mabXbEM44IOt; Thu, 1 Feb 2018 22:11:26 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 85DCEE669E; Thu, 1 Feb 2018 22:11:26 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222373 Archived-At: On 2018-01-26, at 00:23, Stefan Monnier wrote: >> I evaluated those two forms, and this one: >> (global-set-key [?\C-c ?p] #'copy-next-command-output) > > Probably in a buffer not using lexical-binding. > This code (like most of the code I write) presumes lexical-binding. > >> I think the generalisation is unwarranted in this case anyway. I bind >> C-c f to a command that puts the pwd on the kill ring, with a few >> tweaks to make it more useful to me (it optionally replaces "/" with >> "\", and if called in a buffer visiting a file, returns the file's >> name). It's more specialised, not more general. I use it a lot. > > One doesn't oppose the other. I just think it's a fairly common request > to be able to insert the output of a command in the current buffer or > copy it to the clipboard, and rather than tweak each and every command > to add some clever way to do that, I think Emacs would benefit from > having a way to do it in general. Could you give more examples of commands that would benefit from that? Not that I think there aren't any, just I can't think of them right now. Best, -- Marcin Borkowski