From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "ian.tegebo" Newsgroups: gmane.emacs.help Subject: Re: Listing markers in buffer Date: Fri, 29 Apr 2016 14:14:50 -0700 (PDT) Message-ID: <3b7d39b5-8fc6-4ceb-869b-691e27884cd0@googlegroups.com> References: <39ea9931-1237-48e2-ae24-a14e465a56d6@googlegroups.com> <871t5o1gp8.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1464880998 6392 80.91.229.3 (2 Jun 2016 15:23:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2016 15:23:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 02 17:23:14 2016 Return-path: Envelope-to: geh-help-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 1b8USl-00061e-Py for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 17:23:11 +0200 Original-Received: from localhost ([::1]:48003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8USk-0004H2-V3 for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jun 2016 11:23:11 -0400 X-Received: by 10.50.97.74 with SMTP id dy10mr3835122igb.9.1461964491285; Fri, 29 Apr 2016 14:14:51 -0700 (PDT) X-Received: by 10.50.60.164 with SMTP id i4mr162355igr.0.1461964491266; Fri, 29 Apr 2016 14:14:51 -0700 (PDT) Original-Path: usenet.stanford.edu!sq19no422317igc.0!news-out.google.com!k10ni46igv.0!nntp.google.com!i5no128735ige.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <871t5o1gp8.fsf@kuiper.lan.informatimago.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.6.156.163; posting-account=WTqZCgoAAAA6dyV2bUqB6QLZ3CU5AjGe Original-NNTP-Posting-Host: 24.6.156.163 User-Agent: G2/1.0 Injection-Date: Fri, 29 Apr 2016 21:14:51 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:217564 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:110167 Archived-At: On Friday, April 29, 2016 at 10:13:27 AM UTC-7, Pascal J. Bourguignon wrote= : > "ian.tegebo" writes: >=20 > > Looking at the C source, I can see that buffer to buffer_text structs > > point to a singly linked list of Lisp_marker structs [...] >=20 > Markers belong to their owners, and it would be very dangerous if you > could get them and set or reset them behind the back of their owners. Could you provide an example? Here's where I'm coming from: While writing a yas-snippet, I wanted to modify previous text depending on = some event within a field. I found that by doing so, it broke because I di= dn't understand how overlays and markers were being used [1]. Naively, I t= hought I could get a list of markers in the buffer, like one can get the te= xt properties and overlays for at least the purposes of learning/debugging. Instead, I read the code to determine exactly what was going on. In retros= pect, I might have saved myself some time if I'd have been able to see the = details of the markers in the affected region. Now, I see where the marker= s are being held in yas-snippet, so I can still get at them and muck about. When you say "dangerous", is it the same kind of danger I'm exposed to when= changing the internal state elisp libraries *in general*? Or do you mean = "danger" in a specific sense, e.g. that some monstrous GC bug is hiding beh= ind the scenes once a buffer's markers are exposed? [1]: I'm aware that this is a known no-no