From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite' Date: Tue, 2 Jul 2019 07:23:27 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="14645"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 25032@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 02 07:24:13 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 1hiBH2-0003eR-Mo for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2019 07:24:12 +0200 Original-Received: from localhost ([::1]:49208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiBH1-0005n4-LK for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2019 01:24:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51925) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiBGw-0005mm-Jk for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 01:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiBGu-0000Vs-KO for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 01:24:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiBGs-0000V5-In for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 01:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hiBGs-0005wB-4l for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 01:24:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jul 2019 05:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25032 X-GNU-PR-Package: emacs Original-Received: via spool by 25032-submit@debbugs.gnu.org id=B25032.156204502722803 (code B ref 25032); Tue, 02 Jul 2019 05:24:02 +0000 Original-Received: (at 25032) by debbugs.gnu.org; 2 Jul 2019 05:23:47 +0000 Original-Received: from localhost ([127.0.0.1]:46460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiBGc-0005vj-Sa for submit@debbugs.gnu.org; Tue, 02 Jul 2019 01:23:47 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:37040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiBGa-0005vW-K0 for 25032@debbugs.gnu.org; Tue, 02 Jul 2019 01:23:45 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id f17so1737303wme.2 for <25032@debbugs.gnu.org>; Mon, 01 Jul 2019 22:23:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=4CltBeYUySvyiT+eIa+4Xz+fCuZ1eqiNQ6c9uK44emE=; b=GQa/KLMUyh2KSw8OLzwDrjyaUzTCIwUkCOvTe5Thbv5WgsCCo/EkGiIc/PinH9US4v VkCBoCHx5gaGqfq7uXJ6/MKHyGZ+Q1X22+W2Oa+Flp1fClmLf1IcN9rScLrDPJfnRxKE O/T3Pp+GabuwKXAeRG05F7+aVXORzaanZBsvtTnt/Fg8273Y2zTgqOBFeSfAb0FhRhKo 4QNCpxnptgyVfTBLwXTcxUq7SaxZwPwk9Oc+w83N9Tw4sXhywG/vkJwb/uVsR7TsZEB3 y4AYR2ZCYaI02HG4KM1i9tKo7ybiVWvmyPKXhlP01L5xfWMbn0tGK0r7H83MzprsiMM0 Do+Q== X-Gm-Message-State: APjAAAXb8VxsjEikwETKset7216JtDcwVm2BDtlptG1vACZdgS9u/ZPQ XDqYnbnavZnv+qVO9Y7f4uc0Dwrwu65aqejZAJo= X-Google-Smtp-Source: APXvYqxiJUuHoEtx++gjJL3vgGReJGuNdWc9of7BFLZccEdPX4nDcmxCGdQezUWLhcHRk7sejSZEiOhIDZxcsyhf0/Y= X-Received: by 2002:a1c:9696:: with SMTP id y144mr1804954wmd.73.1562045018681; Mon, 01 Jul 2019 22:23:38 -0700 (PDT) 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:161949 Archived-At: Drew Adams writes: > 3. Similarly, why does the doc string of `bookmark-set-internal' say > "_Interactively_..."? It should just say that it prompts for a > bookmark name and then... And "error" is not easily and commonly > understood as a verb - use "raise an error" instead. I have attached a patch which tries to improve the doc string. > 4. `bookmark-set-internal' should preferably not accept both args PROMPT > and NAME. See below. > If NAME is present (e.g. for non-interactive use of > `bookmark-set') then PROMPT makes no sense and is not used (and the > doc string is wrong about PROMPT in that case). Please see if my above patch does not improve the situation. > 5. In `bookmark-set-internal', a nil third arg should have been used to > mean overwrite, not raise an error, as overwriting is still, and > always has been, the default behavior of `bookmark-set'. You should > have introduced the new value `error', not the new value `overwrite', > and kept the default (nil) behavior as overwriting. I see your point. But on the other hand a user can just use bookmark-set and bookmark-set-overwrite, which are not advertised as internal. > You will no doubt argue that this does not matter because > `bookmark-set-internal' is "internal". But the main command is > still, and should still be `bookmark-set'. `bookmark-set-internal' > should reflect _its_ behavior for the default case (nil). I suspect that some of the things above will be a bit tricky to fix if we still want to keep this as a general (internal) function used by bookmark-set and bookmark-set-internal. Which would be the main purpose of this function, as I understand it. The way it's written actually makes the implementation of the latter two functions very straghtforward. The code is not very hard to follow, in my opinion. But it's harder to think of a better alternative. So, after we improve the doc string, this reviewer sees two options for moving forward here: 1. Someone writes up a concrete suggestion. 2. We close this as wontfix and move on. Thanks, Stefan Kangas