From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: searching for links [8.3.3 (8.3.3-17-gce80a0-elpaplus @ c:/USR/FJM/APP/.emacs.d/elpa/org-20160118/)] Date: Mon, 01 Feb 2016 16:07:59 -0500 Message-ID: <87bn80gmvk.fsf@alphaville.usersys.redhat.com> References: <56AA8D33.4040408@juno.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQLi0-0006n9-8E for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 16:08:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQLhw-0005v1-5Z for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 16:08:28 -0500 Received: from plane.gmane.org ([80.91.229.3]:46911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQLhv-0005ud-UN for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 16:08:24 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aQLhl-0003L9-K6 for emacs-orgmode@gnu.org; Mon, 01 Feb 2016 22:08:13 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Feb 2016 22:08:13 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Feb 2016 22:08:13 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org "Francis J. Monari, Esquire" writes: > Due to file relocation on the server, I have a number of broken links in > an org document. (problem: broken links.) > > How can I / Is it possible to search and replace on links? > (expectation: I would like to use search and replace to fix the links.) > > I have tried search and replace, but emacs advises me that links have > been filtered out. (issue: emacs reports that results from the search > are filtered-out.) > > The answer might be a "works as expected". I would like to remain > within the org framework (but using standard search and replace) and > accomplish this task. > Nevertheless, one-time global changes, like this, are best handled by using tools other than an interactive editor. One of the strengths of org-mode is that org files are plain-text and can therefore be manipulated by many tools: I would suggest a simple sed script (sed is available even on Windows through cygwin I think) - something like this sed 's/old/new/g' infile > outfile It is even more advantageous if you have more than one file to change. Emacs has mechanisms for doing something to many files, but none of them beats a simple shell loop: for x in file1 file2 file3 ;do sed 's/old/new/g' $x > $x.new done -- Nick