From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ye Wenbin" Newsgroups: gmane.emacs.help Subject: how to get file postion Date: Mon, 27 Aug 2007 13:54:29 +0800 Organization: personal Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=gbk Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1188208906 9845 80.91.229.12 (27 Aug 2007 10:01:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2007 10:01:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 27 12:01:44 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IPbPj-0006bW-H3 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Aug 2007 12:01:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPbPj-0005qj-3B for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Aug 2007 06:01:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPXYk-000179-G6 for help-gnu-emacs@gnu.org; Mon, 27 Aug 2007 01:54:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPXYh-00014C-Jq for help-gnu-emacs@gnu.org; Mon, 27 Aug 2007 01:54:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPXYh-00013k-AR for help-gnu-emacs@gnu.org; Mon, 27 Aug 2007 01:54:43 -0400 Original-Received: from py-out-1112.google.com ([64.233.166.178]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IPXYg-0005tA-Oa for help-gnu-emacs@gnu.org; Mon, 27 Aug 2007 01:54:43 -0400 Original-Received: by py-out-1112.google.com with SMTP id f31so775384pyh for ; Sun, 26 Aug 2007 22:54:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:to:subject:from:organization:content-type:mime-version:content-transfer-encoding:message-id:user-agent; b=asAG/1aJ+JqHU4FH8G8FnX3jep/voYIh1F0Bg47F2R/0C1MlUd3kwZqOuBsYMG7mRXJTvszJ8Dwdalfx5B+yxrjnYDOccApRhjMxKBelWLuDT+Gq50MD5BlJgv4E3wwMTh3CBSdfm7kVmvtpUogQFffG8G6igJRta5EFHP8W9gQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:from:organization:content-type:mime-version:content-transfer-encoding:message-id:user-agent; b=BiRu4BcEEJDxv9gMWY5wjQxcOoUfy690g7+3sIQDmX614hAMlxXi/aGZKgLFpfcubv1VyR1DuELl9itxzodjR+gL5RJ7HeqY9lpy+cU4JsbE3Li/xuV6VxUc6wAlW1FVGqyLmhHMjAuNyCFGo4Vmv4KLOSMRJ8P9V0cP+98RpHE= Original-Received: by 10.114.200.2 with SMTP id x2mr5931559waf.1188194079603; Sun, 26 Aug 2007 22:54:39 -0700 (PDT) Original-Received: from tsinghua-64dc66 ( [218.17.227.212]) by mx.google.com with ESMTPS id l31sm15376886rvb.2007.08.26.22.54.36 (version=SSLv3 cipher=OTHER); Sun, 26 Aug 2007 22:54:38 -0700 (PDT) User-Agent: Opera Mail/9.20 (Win32) X-Detected-Kernel: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 27 Aug 2007 05:59:32 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46885 Archived-At: Hi, If I want to access part of a big file, so it is important to build a index of the file. But if use insert-file-contents to read the whole file, I don't know how to convert between point in the buffer to the position in the file(for unix file, point-1 is ok, but not for dos file). Although using insert-file-literally is a choice, I have to handle "\r\n" and others labor things. So I wonder whether there is a function to convert point to offset postion in the file. Thank you! -- Best regards. Ye Wenbin