From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.bugs Subject: bug#36979: closed (Re: bug#36979: Calendar: mention how to copy date) Date: Sat, 10 Aug 2019 20:55:43 +0200 Message-ID: <8736i86ea8.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> References: <7csgqbl0i6.fsf@fencepost.gnu.org> <87v9v7a3ka.2.fsf@jidanni.org> <87tvarw2d4.5.fsf@jidanni.org> <8736i8yj24.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="7078"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36979@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 10 20:56:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hwWXA-0001dn-Se for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Aug 2019 20:56:09 +0200 Original-Received: from localhost ([::1]:37720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwWX9-0002HK-Ua for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Aug 2019 14:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39283) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwWX6-0002H2-1a for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2019 14:56:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwWX5-0008Dy-1i for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2019 14:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hwWX4-0008Dj-IL for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2019 14:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hwWX4-000843-EW for bug-gnu-emacs@gnu.org; Sat, 10 Aug 2019 14:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Nordin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Aug 2019 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36979 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 36979-submit@debbugs.gnu.org id=B36979.156546335430983 (code B ref 36979); Sat, 10 Aug 2019 18:56:02 +0000 Original-Received: (at 36979) by debbugs.gnu.org; 10 Aug 2019 18:55:54 +0000 Original-Received: from localhost ([127.0.0.1]:44457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwWWw-00083f-BK for submit@debbugs.gnu.org; Sat, 10 Aug 2019 14:55:54 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:53213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwWWu-00083N-2a for 36979@debbugs.gnu.org; Sat, 10 Aug 2019 14:55:53 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 9233C2400E6 for <36979@debbugs.gnu.org>; Sat, 10 Aug 2019 20:55:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1565463345; bh=IsH9V44NAvoTP0MZ4QoTyTECW6nC5eonVSw8XXjsSvA=; h=From:To:Cc:Subject:Date:From; b=canAKdJhbYhubQL//aRcDnbTc82puZ9jvAOPNYfhn3aJTTgYFgqiOP0j7EbpVfdUQ Cwcqr2FVVGsfy7lAhNp2ZJwB/tPA8JJUnZmpgaYm71CHV3fP/k1HV6gYbQn2/N6SEF b7jl+DSDJT/CuCqUXsEmWt5e8iIMUqH2K5bj4JgEPyA0cM5ZBbfOEk5C5ondGNba2Z 1Qz1sfM0OzL/t6e2g6VGnTcua75WH1yze4qoTtViZjpYpHhS73X5f0Uo8Muqo8s0oO r1NBaqZAdUPSjpPwBjsoovhH6SAUzzcoFW2auY+cIIXs3rDPxonaJhghsijEG3rjX6 RTFMdZVMvF3KQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 465WXJ30Zvz9rxN; Sat, 10 Aug 2019 20:55:44 +0200 (CEST) In-Reply-To: <8736i8yj24.5.fsf@jidanni.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164856 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: >>>>>> "RMS" =3D=3D Richard Stallman writes: > >>> But do mention how to copy things like this rather than just view them. > > RMS> How do they get displayed? Surely there is a way to copy text from = there. > RMS> If they are displayed in the echo area, can you find them in *Messag= es*? > > Yes, but is that the "proper" way to copy them? > One has to (know to) look in *Messages*, find the line one wants with > the cursor, and copy that line, no more, no less. > > About 10 key strokes, careful positioning needed too. > > Clearly "looking in the dumpster for the discarded document." > > Thus we see the proper way to copy them has not been implemented yet. I can add my sympathy for the desire of functionality to add date under point to the kill ring. I was searching for such a feature at some point (didn't find it) and wrote this function which I bound to RET in calendar-mode-map: (defun tn-calendar-kill-date (&optional arg) "Kill new a string based on point in calendar buffer in iso format With no prefix ARG, kill the date as an iso date. With one prefix arg ('C-u'), kill the date as an iso week. with two prefix arg ('C-u C-u'), kill as both the iso week and date." (interactive "p") (let* ((date (calendar-cursor-to-date)) (encoded-time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 = date))) (date-string (format-time-string "%Y-%m-%d" encoded-time)) (iso-week-string (format-time-string "%gW%V" encoded-time)) kill-string) (cond ((=3D arg 4) (setq kill-string iso-week-string)) ((=3D arg 16) (setq kill-string (format "%s %s" iso-week-string date-string))) (t (setq kill-string date-string))) (kill-new kill-string) (message "Put %s to kill-ring" kill-string))) Best regards -- Tomas