From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#33179: 26; Doc string of `filter-buffer-substring' Date: Sat, 27 Oct 2018 15:32:50 -0400 Message-ID: <87h8h7jicd.fsf@gmail.com> References: <08b6c241-7972-48e3-b354-95b6cb50fe52@default>> <83in1nmdae.fsf@gnu.org>> <8c1ed257-be78-4355-84a1-572cfa1d3af6@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1540668675 23064 195.159.176.226 (27 Oct 2018 19:31:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2018 19:31:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 33179@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 21:31:10 2018 Return-path: Envelope-to: geb-bug-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 1gGUIg-0005sr-5C for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 21:31:10 +0200 Original-Received: from localhost ([::1]:37589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGUKm-0001Bs-DJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 15:33:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGUKY-0001AT-H4 for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 15:33:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGUKU-0004vj-ID for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 15:33:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGUKU-0004vd-Dg for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 15:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGUKU-0007Iz-95 for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2018 19:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33179-submit@debbugs.gnu.org id=B33179.154066877928073 (code B ref 33179); Sat, 27 Oct 2018 19:33:02 +0000 Original-Received: (at 33179) by debbugs.gnu.org; 27 Oct 2018 19:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:45757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGUKR-0007Ii-Jp for submit@debbugs.gnu.org; Sat, 27 Oct 2018 15:32:59 -0400 Original-Received: from mail-io1-f47.google.com ([209.85.166.47]:33221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGUKP-0007IV-Oe for 33179@debbugs.gnu.org; Sat, 27 Oct 2018 15:32:58 -0400 Original-Received: by mail-io1-f47.google.com with SMTP id l25-v6so2726233ioj.0 for <33179@debbugs.gnu.org>; Sat, 27 Oct 2018 12:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nv1Gr9WtSPCIrYz3wMQe7SPOI/3AG7BmcSHAu2YR28I=; b=JoG+cUOYTaYVDcNalQ5aVbh8gYy4pyDmDhPN/swtM+tavxaiIiY0XVCkNBUfALzLFy 83LlUh/X2dZ03FcbvZWjgD56bgQJWS06fDNYJ7+ljvNibQH9ZkgomPMHT+I943n6sl82 mOF0XSS8za6TXtcWzXV4Ebs6s6cOufEtJdAUv9rsFCI+9AVOlZ9Q5Wx4itLVTrGsvAdH KQq8iT3VlZ0oTBAuqxtBeDp5419G/3SiwJKdu46JXEMOhTFWLxPczJn5leg+O92ms8dk feUCGheFWeYSaE4jNj2+OcwflXHcyl4pPcramUZCXL18Mg1kQQuT0eSGPMEvZqK3kX8V qleQ== 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=nv1Gr9WtSPCIrYz3wMQe7SPOI/3AG7BmcSHAu2YR28I=; b=MAr8+Qndz4vJXGGjdU3tIPPWQdqQyo2cOnNIXC0SiJled4tVXIlDXsCga3/5L2ePQe TNZE9f4WchFJ3ha5daarHjew+DFG5aJWObKuhLK9H1yYSLC2uyj3KnoNIcekxHLyR1ZM 93BPJRiL9GCOifwTpuOxYvCFo0WeEByTarzEeMX3T6nDoRZfvMRLFUNekrkNvmLJWOtg otXSAR9f8D4jQGtWn9/D7NG7ZLPzXDYrJkeW+qs/c18/09aZYhFX7HPTpraCAK41AwkS e1mos1katkZyx5L5GV6HCs3RUyZks/qJHAz6PrnJbrgz1SAAT+Y6d/6DbrqhpGW8I+VF KyKA== X-Gm-Message-State: AGRZ1gJyIzzlmxGsxRa724WDhurCwCbLZEJk6pWq7WwLMdNwRAp6Inn7 xTMeRJeUMKLaM5GflfoFf6Btm9vx X-Google-Smtp-Source: AJdET5fgoAwsINUAJLdwlWpeCUoZerFn8NiJ5OhiG4j/3DiEFTc+wOlOOS+8PnJ7Rp/82hBxfH2lIA== X-Received: by 2002:a6b:2b95:: with SMTP id r143-v6mr4621437ior.98.1540668771997; Sat, 27 Oct 2018 12:32:51 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id x67-v6sm1861777ita.3.2018.10.27.12.32.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 12:32:51 -0700 (PDT) In-Reply-To: <8c1ed257-be78-4355-84a1-572cfa1d3af6@default> (Drew Adams's message of "Sat, 27 Oct 2018 12:10:15 -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: 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:151698 Archived-At: --=-=-= Content-Type: text/plain Drew Adams writes: >> > IIUC, the meaning of "extract" in this sentence is to exclude the >> > chars from the result. >> >> No, I don't think it means that. It means "take". > > Then I don't understand the "and should not be copied > into other buffers" part. I thought that text describes > a situation where you want to return some parts, for > copying to another buffer, and you want to exclude other > parts from that copying. For what it's worth, I read it like Drew does. I also think giving "characters" as an example doesn't make much sense, because I can't really think of characters so "special to a buffer" that they "should not be copied into other buffers". Grepping the Emacs source, the only example usage I found was in org-indent.el, which uses it to exclude text properties, so I propose changing the docstring example accordingly. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-lisp-simple.el-filter-buffer-substring-Clarify-do.patch Content-Description: patch >From c0cbc1cb7d5bbb0942a76781c1ed29d1346e5644 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 27 Oct 2018 15:27:45 -0400 Subject: [PATCH v1] * lisp/simple.el (filter-buffer-substring): Clarify doc (Bug#33179). --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 29bb9cbcfb..08f622ad8e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4232,7 +4232,7 @@ filter-buffer-substring Use `filter-buffer-substring' instead of `buffer-substring', `buffer-substring-no-properties', or `delete-and-extract-region' when you want to allow filtering to take place. For example, major or minor -modes can use `filter-buffer-substring-function' to extract characters +modes can use `filter-buffer-substring-function' to exclude text properties that are special to a buffer, and should not be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) -- 2.11.0 --=-=-=--