GNU bug report logs - #64178
replace-regexp ignoring value of org-search-invisible

Previous Next

Package: emacs;

Reported by: bobf32 <at> gmail.com

Date: Mon, 19 Jun 2023 20:17:01 UTC

Severity: normal

Full log


Message #26 received at 64178 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: bobf32 <at> gmail.com
Cc: 64178 <at> debbugs.gnu.org
Subject: Re: bug#64178: replace-regexp ignoring value of org-search-invisible
Date: Wed, 21 Jun 2023 10:21:44 +0000
bobf32 <at> gmail.com writes:

> Of course. My use case is that I wish specifically to append some text to
> some lines. The way I normally do this would be to search for the regex
> end-of-line ($) and replace with some text. E.g. in order to append the
> word foo to the end of a line I would do one of:
>
> :s/$/ foo/ <RET>
> M-x regexp-replace RET $ RET  foo

Ok. Then, it is not an Org mode bug.

Steps to reproduce:

1. emacs -Q /path/to/new/file.el
2. Insert

(defun test ()
  "This is test")

(defun test2 ()
  "This is test2")

3. M-x outline-minor-mode
4. M-x outline-cycle-buffer
5. Observe

(defun test ()...
(defun test2 ()...

6. M-: (setq search-invisible nil)
7. M-x replace-regexp <RET> $ <RET> foo <RET>
8. M-x outline-show-all
9. Observe

(defun test ()foo
  "This is test")foo
foo
(defun test2 ()foo
  "This is test2")foo

Expect:

(defun test ()foo
  "This is test")

(defun test2 ()foo
  "This is test2")

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.