From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35536: 27.0.50; Expose buffer's marker list to Elisp Date: Thu, 02 May 2019 19:07:47 +0300 Message-ID: <83ef5gq1po.fsf@gnu.org> References: <87lfzo274b.fsf@tcd.ie> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="241095"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35536@debbugs.gnu.org, maurooaranda@gmail.com, monnier@iro.umontreal.ca To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 02 18:09:12 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMEGl-0010Ug-Ni for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 18:09:11 +0200 Original-Received: from localhost ([127.0.0.1]:53928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEGk-0002O8-MT for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 12:09:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEGd-0002Nh-O0 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMEGc-0000Sk-TO for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMEGc-0000SF-QI for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMEGc-0007VT-KP for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 May 2019 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35536 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35536-submit@debbugs.gnu.org id=B35536.155681329528782 (code B ref 35536); Thu, 02 May 2019 16:09:02 +0000 Original-Received: (at 35536) by debbugs.gnu.org; 2 May 2019 16:08:15 +0000 Original-Received: from localhost ([127.0.0.1]:46803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEFq-0007U9-R9 for submit@debbugs.gnu.org; Thu, 02 May 2019 12:08:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEFp-0007Tu-3D for 35536@debbugs.gnu.org; Thu, 02 May 2019 12:08:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEFj-0008MM-Mv; Thu, 02 May 2019 12:08:07 -0400 Original-Received: from [176.228.60.248] (port=4804 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMEFj-0003U5-99; Thu, 02 May 2019 12:08:07 -0400 In-reply-to: <87lfzo274b.fsf@tcd.ie> (contovob@tcd.ie) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:158644 Archived-At: > From: "Basil L. Contovounesios" > Date: Thu, 02 May 2019 16:44:52 +0100 > Cc: Mauro Aranda , > Stefan Monnier > > I attach a patch implementing this based on BUF_MARKERS, as per Martin's > suggestion. Any reasons not to expose such a function? I'm not yet convinced we need something like that, but in any case, is the order important? Because the code you propose produces a list in reverse order. More generally, I think we should discuss the need for this in more detail. Markers are used for several features, and there's internal stuff like conversion from character to byte positions that depends on them. Changing markers could thus easily crash Emacs, especially if it comes in some in-opportune moment. It is possible that people actually need higher-level primitives that manipulate markers internally. We should first identify the use cases where this could be needed, and then see how to help solving those use cases by something like a new marker-related primitive.