From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21195: 25.0.50; Let MARKER arg to `set-marker' be a number Date: Sat, 30 Apr 2016 17:05:08 -0800 (GMT-08:00) Message-ID: References: <87vb2y93j6.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1462064803 14166 80.91.229.3 (1 May 2016 01:06:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 May 2016 01:06:43 +0000 (UTC) Cc: 21195@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 01 03:06:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awfqA-0007rb-BM for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 May 2016 03:06:30 +0200 Original-Received: from localhost ([::1]:60244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awfq6-0005CX-6X for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Apr 2016 21:06:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awfpx-0004zx-In for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 21:06:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awfpl-0000ja-Vp for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 21:06:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awfpl-0000jE-T3 for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 21:06:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awfpi-00043k-B7 for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2016 21:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 May 2016 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 21195-submit@debbugs.gnu.org id=B21195.146206472115558 (code B ref 21195); Sun, 01 May 2016 01:06:02 +0000 Original-Received: (at 21195) by debbugs.gnu.org; 1 May 2016 01:05:21 +0000 Original-Received: from localhost ([127.0.0.1]:58863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awfp3-00042s-4H for submit@debbugs.gnu.org; Sat, 30 Apr 2016 21:05:21 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awfp1-00042c-3H for 21195@debbugs.gnu.org; Sat, 30 Apr 2016 21:05:19 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u4115CxP028541 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 May 2016 01:05:12 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u4115Ck9004528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 May 2016 01:05:12 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u41159A9018678; Sun, 1 May 2016 01:05:10 GMT In-Reply-To: <87vb2y93j6.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] 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: 208.118.235.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:117480 Archived-At: > > Minor enhancement request. Let `set-marker' (aka `move-marker') accept > > a buffer position that is just a number as its first arg. IOW, give > > `set-marker' this behavior: > > > > (defun new-set-marker (num-or-marker position &optional buffer) > > "..." > > (unless (markerp num-or-marker) > > (setq num-or-marker (with-current-buffer buffer > > (copy-marker num-or-marker)))) > > (set-marker num-or-marker position buffer)) >=20 > Hm... Well, I don't really see the point. `set-marker' is so > conceptually clean. And saying `(set-marker (make-marker) ...)' is so > easy. Closing. Well, I said it was minor. Consider funcalling, applying, or mapping over positions, which can be markers. Sure, you can use an anonymous function that does just what you need (test with markerp, copy-marker if not a marker)... But why shouldn't `set-marker' do this? It's trivial and costs only a call to `markerp' for doing what `set-marker' does now.