From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Buchs, Kevin" Newsgroups: gmane.emacs.help Subject: RE: emacs for beginners (copy and paste) Date: Fri, 12 Apr 2013 18:28:13 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1365809319 25918 80.91.229.3 (12 Apr 2013 23:28:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2013 23:28:39 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 13 01:28:43 2013 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 1UQnOd-0006jM-0G for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Apr 2013 01:28:43 +0200 Original-Received: from localhost ([::1]:37994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnOc-0008El-KO for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Apr 2013 19:28:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnON-0008EY-En for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 19:28:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQnOD-0005f3-Ny for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 19:28:27 -0400 Original-Received: from mail10.mayo.edu ([129.176.212.47]:26043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnOD-0005YW-GY for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 19:28:17 -0400 Original-Received: from roedlp004a.mayo.edu (HELO mail10.mayo.edu) ([129.176.158.14]) by ironport10-dlp.mayo.edu with ESMTP; 12 Apr 2013 18:28:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAEaXaFGBsNQ1/2dsb2JhbABNA4MGNsFkgQwWdIIhBTAKUQEIIgYYB1cBBBMIiAybSJgHiRGOZiEoBYJKYQOJA41/kRGDKQ Original-Received: from mhro1a.mayo.edu ([129.176.212.53]) by ironport10.mayo.edu with ESMTP; 12 Apr 2013 18:28:14 -0500 Original-Received: from smtprelay4.mayo.edu (smtprelay4.mayo.edu [129.176.212.59]) by mhro1a.mayo.edu with ESMTP id BT-MMP-664643 for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 18:28:14 -0500 Original-Received: from essexhb.mayo.edu (HELO MACE.mayo.edu) ([172.31.128.12]) by smtprelay4.mayo.edu with ESMTP; 12 Apr 2013 18:28:14 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: emacs for beginners (copy and paste) Thread-Index: Ac4303LScVfgSzPURLqADUUIFDFxAg== X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 129.176.212.47 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90138 Archived-At: Welcome to emacs. You haven't said what you would like to do with the values. One option might be that you want the numbers to be a list of one number per line. Or, maybe you want the numbers with commas separating them. In either of these cases, I would suggest you use a couple of regular expression replacements to transform your given contents. Position your cursor ("point") before the range. Then enter M-x (usually that is Alt key held down while you press the x key), followed by typing: replace-regexp. Press enter. Next you can type this (carefully match it): delta_ref: [0-9]+ delta_eff:=20 Note there is a trailing blank at the end of that line. Next press enter. Again press enter. Now, repeat this in a similar fashion, starting with M-x replace-regexp. Enter and gamma_ref: [0-9]+ gamma_eff:=20 Note trailing blank. Press enter twice. Now, one more time, this being a bit more complicated: M-x replace-regexp, enter and: -+ MOUVEMENT M[0-9]+ -+ Then press Control-q followed by Control-j. Then continue to type: alpha_ref: [0-9]+ alpha_eff:=20 Note there is a trailing blank at the end of that line. Now press enter twice. Now you should have something like: 11 04 00 15 00 01 ... If you make a mistake at some point, press Control-g to abort. Then you can also press Control-x followed by Control-u to undo the last change. Repeat C-x and C-u to undo further back. Kevin Buchs | Senior Engineer | SPPDG | 507-538-5459 | buchs.kevin@mayo.edu Mayo Clinic | 200 First Street SW | Rochester, MN 55905 | http://www.mayo.edu