From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#35536: 27.0.50; Expose buffer's marker list to Elisp Date: Fri, 03 May 2019 18:22:39 +0100 Message-ID: <875zqrbggw.fsf@tcd.ie> References: <87lfzo274b.fsf@tcd.ie> <83ef5gq1po.fsf@gnu.org> <87imusztof.fsf@tcd.ie> <8336lwpxcq.fsf@gnu.org> <87sgtvczba.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="268510"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35536@debbugs.gnu.org, maurooaranda@gmail.com, monnier@iro.umontreal.ca To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 03 23:15:56 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 1hMfX5-0017On-IN for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 23:15:51 +0200 Original-Received: from localhost ([127.0.0.1]:45036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMbtw-0005Wx-Ft for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 13:23:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMbtn-0005VY-Gb for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 13:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMbtm-00009y-H8 for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 13:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36035) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMbtm-00009M-Dg for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 13:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMbtm-0008GW-2F for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 13:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2019 17:23: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.155690417031740 (code B ref 35536); Fri, 03 May 2019 17:23:02 +0000 Original-Received: (at 35536) by debbugs.gnu.org; 3 May 2019 17:22:50 +0000 Original-Received: from localhost ([127.0.0.1]:49579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMbtZ-0008Fs-Qj for submit@debbugs.gnu.org; Fri, 03 May 2019 13:22:50 -0400 Original-Received: from mail-ed1-f50.google.com ([209.85.208.50]:32862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMbtY-0008Ff-3J for 35536@debbugs.gnu.org; Fri, 03 May 2019 13:22:48 -0400 Original-Received: by mail-ed1-f50.google.com with SMTP id n17so6878578edb.0 for <35536@debbugs.gnu.org>; Fri, 03 May 2019 10:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ON+ka8PY4rGy1ekKR+2RZdLVYdtQQm1i7ghJ0Q4BTk4=; b=FliEoVtYahEqYpy+lw/WuEhqpPV3Vx3oltbrqQayurYQYTxn3da6fyDro2PmZo1z9T YIfkNZVj+VJLiskMS939dZJnAVLfZi5uAqNKYcSvDaI1PYydVuIg7GeWLb4jAIH21sjr Dikfz99KR2A/kF3QohMGjoQUMBicjgeFFWnQxG8ilrefaNTYkvaLhvWx32BQG0vrPWuO A4IJPzfqkohLfgTMTvInRSNsYT2N0bkT+6UKVPyJ/SQxSGMP+lNby84Csv6PD9GUXc6m HKwgNoe3r4rQRdVxlm4p4DH1rU/q9zfmToSqlUbTP+AZi6ZEV97z9AYb815I+QSYJMGD Kl5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ON+ka8PY4rGy1ekKR+2RZdLVYdtQQm1i7ghJ0Q4BTk4=; b=j0FUUJDYOSWMepxrKmL6gG3eb9A+FM3UUwA2yxzHkMEj5H0HHSLdpbUf1LCa1Q3Rvg FpWtkO3gr/r2OUGrS1pEZzHifgX5q24/8UxfHk0/9mYEzIb6rp29ZkxqEtsFKV/3PfMs jvIlTxIcqUlMnY7rXrNUV4+gNot0FOodU1SNAEql7S1MCHn3qD9VlmVK8zcE6AaXz1J3 2dOx6gHKwpoemEsJ/+9icyp9ww2V8i8C+MMFJUudiEFtRtKpNm2UPjUgPEVqSd+e1nPU H7fp2Yqo2pbIoA95C2e05C+ciYnpTVsvaVlcUuUNDCXWxVgOi4kC3pKPO2gDIJ/HF0wh 581A== X-Gm-Message-State: APjAAAU0RMsSac1jPzcUlGVeY6AqpjQq9ieBBUm8HA9KmhBLT2VNDsWj Nfy1WHdkLIh7nG0FzQNMIGNQdA== X-Google-Smtp-Source: APXvYqyjk/wngfDeXwaq6/bcT0utp3G7lzHp5B8kNeAz+qbkEqrmg396kxb3+bfsboI4BgGnmviYIQ== X-Received: by 2002:a17:906:1dc5:: with SMTP id v5mr7210808ejh.66.1556904162281; Fri, 03 May 2019 10:22:42 -0700 (PDT) Original-Received: from localhost ([89.101.223.218]) by smtp.gmail.com with ESMTPSA id c15sm409405ejb.33.2019.05.03.10.22.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 03 May 2019 10:22:41 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Fri, 3 May 2019 09:38:02 -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:158694 Archived-At: Drew Adams writes: >> When asked for a list of markers between BEG and END, it makes sense to >> me to return a list which ascends from BEG to END. > ^^^^^^^^^^^^^^^^^^^^^^^ > IOW, in buffer-position order. Yes. >> If it really matters, we could either return the >> order of BUF_MARKERS unchanged, > > Unchanged from what? >From the order returned by BUF_MARKERS, i.e. the internal chain of markers pointing to the current buffer. This order presumably reflects, to an extent, the order in which markers were created/chained, but I'm not sure about this. >> or accept an additional argument which tells the >> function how to sort. > > Have not really been following this thread, and > not weighing in on whether such a function is > needed or whether users need access to markers > created by C. > > But as for the order of such a list: It's trivial > for users (any Lisp code) to sort by buffer position > or anything else, so why would the default order > be by buffer position? That is the order I would intuitively expect in any enumeration of a partially ordered set of buffer artifacts in a given region, unless otherwise stated. What other order would make sense when talking about markers within a given region? > What's _not_ available to users or Lisp code, I > think, is the order of marker creation or even the > order of last setting. I'd think that > marker-creation order (either direction) would be > a better default sort order for this, no? Perhaps when enumerating markers pointing at a single position, yes. But I think that ordering would make less sense when talking about markers within a given region. Assuming something like marker-list is deemed a useful addition (which is not yet clear), perhaps there should be two separate functions akin to overlays-in and overlays-at, with different sorting options and/or default policies. Thanks, -- Basil