From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add user option to disable location in bookmarks Date: Sun, 21 Jun 2020 16:13:06 +0700 Message-ID: References: <87sgep35cb.fsf@gmail.com> <87blld2x5h.fsf@gmail.com> <062414c6-41f4-4803-9a62-28274825b8e0@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jamie Beardslee , Emacs developers To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 21 11:13:52 2020 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 1jmw2x-000S0J-U0 for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jun 2020 11:13:51 +0200 Original-Received: from localhost ([::1]:55128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmw2x-0008KH-07 for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jun 2020 05:13:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmw2S-0007af-Pt for emacs-devel@gnu.org; Sun, 21 Jun 2020 05:13:20 -0400 Original-Received: from mail-ua1-x941.google.com ([2607:f8b0:4864:20::941]:46881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmw2R-0007Qr-2x for emacs-devel@gnu.org; Sun, 21 Jun 2020 05:13:20 -0400 Original-Received: by mail-ua1-x941.google.com with SMTP id t26so4616561ual.13 for ; Sun, 21 Jun 2020 02:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VBkHK8r+ZOFAhV7dBkhjHCYoNOgxWQE2olDfDMhtr98=; b=EYG+HkV4ANdXjMr05c5sO2STGktrxuiyDlXxfgStCfX0+BP3SeDGZ2IWhC0cjkB0rr Daq3AD9YctmCGgt9ZlvspF50WAAZZmDJ9QQ6DGDSLOb1kuzQqqCNGofpg07GEq4ARN4i ND0XSUQfGffZxvP2EGhCXv8MsZvFdIjtKg0huovM6AnZ7AMGwUtkFzbMnuwBs8Gm+EGu 36DSk3NkZLNmmsn5hUWbSJ6DjJLniHqKQxSin5679+YZDUQ6sxsACnc2kIdsXqm9F1P1 KmVJK3nquc1se90IKJegOSqUnJjUshyEa5/p6FU03/SUkxhGnnpuaiuM0N+7Ich9Py2R FDeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VBkHK8r+ZOFAhV7dBkhjHCYoNOgxWQE2olDfDMhtr98=; b=p8A22eGho66vF/sH8mPnxu3XWxnmznuYqX7jXSs6oAQU5ao6/qc3xyDRB4oGq36YaQ Si4f0751kkFX9x7edybTSQIvj5c3BOGREz5nHxVucIZJVf0GoIsexgQ+FAB9Hpn9By5u heKwxw+t23Y5VHYRTMUYwXz2itSz3YjpJUEyTr0o0wxMeFxbXLllhXSbxlOMAo02PwqW U2a33US7jpjzy36AiBPLBXbVr1O4tuLopJE9ICFCWWz3rW4Q96G9YKoZBqV709AYTix+ Yvwle3+4rokxrTfw1NU6NfMfh3whk0FlkWjVn/XuBcmOsB8XRbgdVBGn7Ahl+XWMhllv gtZg== X-Gm-Message-State: AOAM533PDr7OcphBCe5TbIyGQRHxwLzF1bbyoVGUzBIIvY4pABDhxijS k3jRltX4xsd29w3fO2GdcZG9ZdnWdrbFUkDey4g= X-Google-Smtp-Source: ABdhPJyxKN+gqBf28g7rOsAdTAUghMlDoNtRdBz35zBo5WwS6DCE8Jr6CK/AsMJefArL5dM7NlBPu7hWiUtAKsj3Nt8= X-Received: by 2002:a9f:2636:: with SMTP id 51mr8296779uag.41.1592730797620; Sun, 21 Jun 2020 02:13:17 -0700 (PDT) In-Reply-To: <062414c6-41f4-4803-9a62-28274825b8e0@default> Received-SPF: pass client-ip=2607:f8b0:4864:20::941; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x941.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:252487 Archived-At: On Sun, 21 Jun 2020 at 06:34, Drew Adams wrote: > If this is about save-place then save-place should > do the right thing. See above. If there's an option > to be added in that regard, it's a save-place option: > `save-place-ignore-bookmark-position'. The hook > function (see above) can move to the save-place place > if the option is non-nil, and just do nothing if it's > nil. I think you are too quick in punting the change to =E2=80=98save-place=E2= =80=99. I think it=E2=80=99s a matter of user expectations. You expect that a bookmark targets a particular location in the file. (There are bookmarks that do not target a file; let=E2=80=99s ignore them f= or now.) Activating the bookmark visits that file (if not already visited), displays that file=E2=80=99s buffer, and jumps to the bookmarked location (adjusting it by searching for context if necessary). Jamie expects that a bookmark targets the file in its entirety. Activating the bookmark then should visit the file (if not already visited) and display the file=E2=80=99s buffer. If the file had to be re-visited, save-place kicks in and restores the point and scroll position to the values saved when the file=E2=80=99s buffer was killed. If save-place is not active, the point and scroll position should remain whatever they end up by default (top of buffer?). I dare say both expectations are valid for files. Therefore, the fix should allow the user to avoid saving a location in bookmarks targeting files, perhaps by introducing a setting like =E2=80=98bookmark-set-save-location=E2=80=99, boolean, default t. Other boo= kmark types would then decide if it makes sense to honor that setting, and how. E.g. an Info buffer technically contains a whole Info manual but, through narrowing, makes an appearance of displaying only a single Info page; it would make sense to bookmark the page but not the exact line and context.