From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: (copy-marker nil) Date: Mon, 07 May 2018 21:46:14 -0400 Message-ID: References: <364c8f2d-06ab-4f81-852f-eb3bac7a0615@easy-emacs.de> <1e55da6a-d791-c613-ac9a-5d9bc57f840f@easy-emacs.de> <0cc6f5df-d980-492c-a6f3-86070a73488c@default> <34886144-0f66-5677-5054-b940cf0f6e76@easy-emacs.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525743891 22691 195.159.176.226 (8 May 2018 01:44:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 May 2018 01:44:51 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 08 03:44:47 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fFrgL-0005nS-W5 for geh-help-gnu-emacs@m.gmane.org; Tue, 08 May 2018 03:44:46 +0200 Original-Received: from localhost ([::1]:48916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFriT-0002BS-3R for geh-help-gnu-emacs@m.gmane.org; Mon, 07 May 2018 21:46:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFrhx-0002BN-RQ for help-gnu-emacs@gnu.org; Mon, 07 May 2018 21:46:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fFrhu-00057P-QU for help-gnu-emacs@gnu.org; Mon, 07 May 2018 21:46:25 -0400 Original-Received: from [195.159.176.226] (port=44303 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fFrhu-000573-Ia for help-gnu-emacs@gnu.org; Mon, 07 May 2018 21:46:22 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fFrfl-0005Az-98 for help-gnu-emacs@gnu.org; Tue, 08 May 2018 03:44:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:avUNi+m4nrnnSHNS2f80v5OA9dI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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:116684 Archived-At: > Is there a use-case for a marker pointing nowhere? Yes. > From my point of view refusing to create such a marker makes sense. It would break existing code. BTW "check for a valid buffer position" won't work with copy-marker for other reasons (e.g. (copy-marker 0) returns a marker pointing to (point-min), even though 0 is not a valid position). I have no idea why you think copy-marker might be a good way to solve your problem, but the evidence seems to suggest you should try something else. Stefan