From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Temporary notes in Emacs buffers? Date: Thu, 2 Jan 2020 23:06:35 -0800 (PST) Message-ID: <078d0c84-5dd5-4222-8471-8687c2c77e90@default> References: <87zhfecbpt.fsf@mbork.pl> <87sgl0osts.fsf@web.de> <65742f83-393a-4df2-9562-7c500b40adcd@default> <87a777ydnh.fsf@web.de> <73dc0d0e-f208-4169-a70d-f2f17994a4f4@default> <87o8vmlkdq.fsf@web.de> <958f5d11-5d36-4627-a106-11b47b3e9c79@default> <87png2ed33.fsf@web.de> <1d24a14a-b38a-4a66-b6d0-cca8aff7dacc@default> <87mub573g5.fsf@web.de> 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="185188"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Help Gnu Emacs mailing list To: John Yates , Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 03 08:06:57 2020 Return-path: Envelope-to: geh-help-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 1inH2v-000m0e-E8 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 08:06:57 +0100 Original-Received: from localhost ([::1]:49390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inH2t-0000yj-IR for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 02:06:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51793) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inH2h-0000yS-95 for help-gnu-emacs@gnu.org; Fri, 03 Jan 2020 02:06:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inH2g-0000t7-23 for help-gnu-emacs@gnu.org; Fri, 03 Jan 2020 02:06:43 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:35996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inH2f-0000pJ-Ol for help-gnu-emacs@gnu.org; Fri, 03 Jan 2020 02:06:41 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00374Gbw070189; Fri, 3 Jan 2020 07:06:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=enjS4MpQccJxMrhwqcX/O7XCPwCDo6Z5xcWK3L7RNtA=; b=g/D7d13Nru5zOArPoxts2DZzmH0h2NKLTZ0Ji00m20BE/z2v0WlkVTRBOSzD5zIglItT wNm1kCuPn7JilYMq5cUxR34Vue3F5taciaipIxpiUFZz94IODVlXiJ6Loj/G4tmhwySo QZlHAY69G5U9GXRWqx7Hi+ij3EwMxHoyzo9g9UkHfsOZHPevNnUOOJacSyfaJgtQTWj0 2daMq7bsEjICKJFOoqEPcCPiBlehXdd+r7Sj9+Xq7VVIHyvo58N+tM0sqJ+ar9s5x4xz MZZIPxdTZML4t5c0atGyPWfPXXO+qZ/D4HyWK42coiaYHW7Yl26i99xUNHkb5jwf+0S0 UQ== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2x5xftu2fm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2020 07:06:40 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00373che034149; Fri, 3 Jan 2020 07:06:40 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2x8gjbhvbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2020 07:06:39 +0000 Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00376aAd024390; Fri, 3 Jan 2020 07:06:37 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9488 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001030066 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9488 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001030066 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:122144 Archived-At: [Sending my reply again, as the HTML reply made no distinction (that I can see in my email client) between what you wrote and what I replied.]=20 > This broaches the question of what is being annotated, > the file as a container (e.g. inode) or its contents If we're still talking about bookmarks, then either one can be the target. To get to the content you first get to the container. But there's no requirement that you target any of the content. A bookmark can act in any way you like on a file, as container, without having anything to do with the content. A bookmark's handler is just a function. > 1. What happens when one moves the file? > 2. What happens when one copies the file? > 3. What if after the copy one deletes the original? > > My sense is that this thread is most concerned > with use case number 1. >=20 > An approach not yet mentioned is including some > form of UUID as a file local variable.=C2=A0 In such > a setting notes indirect through a persistent > UUID-to-path map.=C2=A0 A file handler recognizes > relevant operations on UUID annotated and > updates the map.=C2=A0 This might also include > updating the new copy's UUID to preserve > uniqueness. If Emacs gives you a way to get to a file by an UUID that doesn't change when you move the file, then you could use that in a bookmark. That might, indeed, be a good answer. I don't know that Emacs provides such a way (how?). (You can get the inode of a file, but can you find a file, given its inode?)