From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC_?= =?UTF-8?Q?=D0=91=D0=B0=D0=B1=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Newsgroups: gmane.emacs.bugs Subject: bug#49967: 27.2; org-copy-visible copies invisible text when there is a link Date: Mon, 9 Aug 2021 20:55:09 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000af598205c92416bf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7648"; mail-complaints-to="usenet@ciao.gmane.io" To: 49967@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 09 20:09:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD9i2-0001m2-F5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 20:09:10 +0200 Original-Received: from localhost ([::1]:46660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD9i0-0004Pw-U6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 14:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD9hv-0004Pf-01 for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 14:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mD9hu-0001b3-Pr for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 14:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mD9hu-0002nM-Iw for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 14:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC_?= =?UTF-8?Q?=D0=91=D0=B0=D0=B1=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Aug 2021 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49967 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162853250910696 (code B ref -1); Mon, 09 Aug 2021 18:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Aug 2021 18:08:29 +0000 Original-Received: from localhost ([127.0.0.1]:57738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD9hM-0002mR-FF for submit@debbugs.gnu.org; Mon, 09 Aug 2021 14:08:29 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD9Ui-0002RT-Vq for submit@debbugs.gnu.org; Mon, 09 Aug 2021 13:55:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD9Ui-0002Xd-IH for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 13:55:24 -0400 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:41974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mD9Ug-0000VM-Gs for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 13:55:24 -0400 Original-Received: by mail-oi1-x231.google.com with SMTP id be20so5835106oib.8 for ; Mon, 09 Aug 2021 10:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vfFX8cIoo1D9M957F1/Q1UsHbd8jEIvJQSylBdEULNs=; b=OtVYIAP7taNcyuwY8Nh5AlytRImgM2iAJLtuZTjpmv3je7WDU/+13fAGWxXJkzRN+F KmAMJzBZ6O9RmG+OrgrqFDIE7A8KPe553p/SBdbTdY6QDAjANnL2/1XouhxrM2f4FP68 tW5NcmGqcCtobVF1Y3jqICGwkaCf7hN6lTMIaxZjrs09TsSTdD/0J38krBIi/cQ72P0A 32GkGSHNdW1r5oad9AUyd0kTHvBF+js7Pj5sdJ08BlTwfhWP41z47aFsCN9DaBDZOKUc Acny9NNuJ925J9nFFegAWGggYJv731mibz8hz/ZcULYVnlH8V/VAus9V4AsxjHLMdFoJ deKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vfFX8cIoo1D9M957F1/Q1UsHbd8jEIvJQSylBdEULNs=; b=muZvmc3YY+dmPzzF6Hq3WzIMQrz963E3yHwknrrRi5rl2cuKB+ljOXof/Jz76lRxWB fqIj8zPHtNPhvBrTAk9Y+bzq8OYxYmCOgCZbgi2GZF5r7T9dUP2gmgaxDf9AlooKqTKP TAiTPUEMMyNDxwfO09suSumLTBZ9AqEqpeFWYT14Q9RqQxqRAxFGpGLUZhMPd3JER4Fr nG9g44UUcT7yLl7BWof9Lu1XW4dcKvj1jl2t2FShmlscH/lmayx9lTc1kHP6sxRsv7Ju XNvEeBAgIIGroji73OrvjDsjiHhoKo/OhFLxqD4QE86cS/O5PJdtEZqQpvyIUUmkrEWo S/oQ== X-Gm-Message-State: AOAM531VPxdeB8DWjNnYMmi6DdJAo7pTyUmcsoDw6kqcKdcLgsrK942p /AQyIxS8fhXuc9kolpuFSMpwzYqUT6PUrMD9Zi1Z+Y2lMwU= X-Google-Smtp-Source: ABdhPJw5YUcGW+C/zulSFztOQJJDH/+nSzOJqF7HP9XH4PuYhnSoHfmoF3Vbpqr9VkifeFauXqQRaAkPiCYM2hNwrfg= X-Received: by 2002:aca:c4d0:: with SMTP id u199mr298369oif.12.1628531720140; Mon, 09 Aug 2021 10:55:20 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=maxbabushkin@gmail.com; helo=mail-oi1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 09 Aug 2021 14:08:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211458 Archived-At: --000000000000af598205c92416bf Content-Type: multipart/alternative; boundary="000000000000af598105c92416bd" --000000000000af598105c92416bd Content-Type: text/plain; charset="UTF-8" The function org-copy-visible should copy visible text only, but it copies invisible text when there is a link in a header. For example, let an org buffer contains: * header 1 [[some link]] some text * header 2 After folding the first tree it looks as * header 1 [[some link]]... * header 2 After selecting all the headers and doing M-x org-copy-visible (or C-c C-x v) in the kill-ring we have the text * header 1 some link some text * header 2 But the expected content is * header 1 some link * header 2 The function org-copy-visible works as expected when there is only one header in the region. The bug appears when the region contains at least two headers. The dribble file reproducing the bug is attached (recorded right after 'emacs -q'). In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) of 2021-03-26 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: ru_RU.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cyril-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 47281 10537) (symbols 48 6002 1) (strings 32 15528 1956) (string-bytes 1 507842) (vectors 16 10256) (vector-slots 8 132881 13054) (floats 8 19 41) (intervals 56 196 0) (buffers 1000 12)) -- Sincerely yours, M. V. Babushkin --000000000000af598105c92416bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The function org-copy-visible should copy visible tex= t only, but it
copies invisible text when there is a link in a header. F= or example, let
an org buffer contains:

* header 1 [[some link]]<= br>some text
* header 2

After folding the first tree it looks as<= br>
* header 1 [[some link]]...
* header 2

After selecting all= the headers and doing M-x org-copy-visible (or C-c
C-x v) in the kill-r= ing we have the text

* header 1 some link
some text
* header 2=

But the expected content is

* header 1 some link
* header= 2

The function org-copy-visible works as expected when there is
= only one header in the region. The bug appears when the region contains
= at least two headers.

The dribble file reproducing the bug is attach= ed (recorded right after 'emacs -q').

In GNU Emacs 27.2 (bui= ld 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
= =C2=A0of 2021-03-26 built on juergen
Windowing system distributor 'T= he X.Org Foundation', version 11.0.12013000
System Description: Arch= Linux

Recent messages:
For information about GNU Emacs and the G= NU system, type C-h C-a.

Configured using:
=C2=A0'configure -= -prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib
=C2=A0--local= statedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int
=C2= =A0--with-modules --with-cairo --with-harfbuzz 'CFLAGS=3D-march=3Dx86-6= 4
=C2=A0-mtune=3Dgeneric -O2 -pipe -fno-plt' CPPFLAGS=3D-D_FORTIFY_S= OURCE=3D2
=C2=A0LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,= now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SO= UND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE H= ARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODUL= ES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:<= br>=C2=A0 value of $LANG: ru_RU.UTF-8
=C2=A0 locale-coding-system: utf-8= -unix

Major mode: Lisp Interaction

Minor modes in effect:
= =C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode:= t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2= =A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-= mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
= =C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 au= to-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-num= ber-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
N= one found.

Features:
(shadow sort mail-extr emacsbug message rmc = puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec passwo= rd-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-= property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile c= conv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-uti= ls mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-= util mail-prsvr mail-utils
cyril-util tooltip eldoc electric uniquify ed= iff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-wi= n x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list repl= ace newcomment
text-mode elisp-mode lisp-mode prog-mode register page ta= b-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-loc= k font-lock
syntax facemenu font-core term/tty-colors frame minibuffer c= l-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai= -viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak = czech
european ethiopic indian cyrillic chinese composite charscript cha= rprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl= -preloaded nadvice loaddefs button faces cus-face macroexp files
text-pr= operties overlay sha1 md5 base64 format env code-pages mule
custom widge= t hashtable-print-readable backquote threads dbusbind
inotify lcms2 dyna= mic-setting system-font-setting font-render-setting
cairo move-toolbar g= tk x-toolkit x multi-tty make-network-process emacs)

Memory informat= ion:
((conses 16 47281 10537)
=C2=A0(symbols 48 6002 1)
=C2=A0(str= ings 32 15528 1956)
=C2=A0(string-bytes 1 507842)
=C2=A0(vectors 16 1= 0256)
=C2=A0(vector-slots 8 132881 13054)
=C2=A0(floats 8 19 41)
= =C2=A0(intervals 56 196 0)
=C2=A0(buffers 1000 12))

--
Sincerely yours,
M. V. Babushk= in
--000000000000af598105c92416bd-- --000000000000af598205c92416bf Content-Type: application/octet-stream; name=dribble-file Content-Disposition: attachment; filename=dribble-file Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ks4xh6p80 cSAweDgwMDAwNzhvcmctbW9kZTxyZXR1cm4+KiBoZWFkZXIgMSBbW3NvbWUgbGlua11dXQpzb21l IHRleHQKKiBoZWFkZXIgMhAQATx0YWI+IDB4NDAwMDAyMA4FIDB4ODAwMDA3OG9yZy1jb3B5LXZp c2libGU8cmV0dXJuPgoKGRA8dGFiPhgD --000000000000af598205c92416bf--