From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "St/\\n_P/\\rm/\\n" Newsgroups: gmane.emacs.bugs Subject: append-to-file & write-region from kbd-macro Date: Fri, 1 Feb 2008 17:15:27 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201944731 9082 80.91.229.12 (2 Feb 2008 09:32:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2008 09:32:11 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 02 10:32:32 2008 Return-path: Envelope-to: geb-bug-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 1JLEjd-0002XY-2N for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2008 10:32:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLEjB-00064D-B1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2008 04:32:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL4AV-0001Uz-6Y for bug-gnu-emacs@gnu.org; Fri, 01 Feb 2008 17:15:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL4AU-0001UX-8j for bug-gnu-emacs@gnu.org; Fri, 01 Feb 2008 17:15:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL4AU-0001US-3y for bug-gnu-emacs@gnu.org; Fri, 01 Feb 2008 17:15:30 -0500 Original-Received: from wr-out-0506.google.com ([64.233.184.239]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JL4AT-0002zD-RD for bug-gnu-emacs@gnu.org; Fri, 01 Feb 2008 17:15:29 -0500 Original-Received: by wr-out-0506.google.com with SMTP id 58so1309619wri.10 for ; Fri, 01 Feb 2008 14:15:27 -0800 (PST) Original-Received: by 10.150.51.6 with SMTP id y6mr1546732yby.46.1201904127219; Fri, 01 Feb 2008 14:15:27 -0800 (PST) Original-Received: by 10.150.91.2 with HTTP; Fri, 1 Feb 2008 14:15:27 -0800 (PST) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 (Google crawlbot) X-Mailman-Approved-At: Sat, 02 Feb 2008 04:31:47 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17448 Archived-At: append-to-file and write-region seems to have a bug in that: 1) (append-to-file START END FILENAME) The command can be called with M-x append-to-file when defining a keyboard macro and it will then pass the region to the file /some/foo/appendedfile *Edit Macro* buffer shows this: Command: append-a-region Key: C-x C-k 2 Counter: 0 Format: "%d" Macro: <> ;; append-to-file appendedfile ;; self-insert-command * 17 RET ;; newline and the insert-kbd-macro output (fset 'append-a-region [?\M-x ?a ?p ?p ?e ?n ?d ?- ?t ?o ?- ?f ?i ?l ?e ?\C-m ?a ?p ?p ?e ?n ?d ?e ?d ?f ?i ?l ?e ?\C-m]) So... it DOES appear that append-to-file can be called from within an interactive keyboard macro definition. However; 2) write-region can not have START passed a string from the mini-buffer and no new functionality is extended to the Command write-region (at least from within a kbd macro definition) despite what appear to be claims by the manual otherwise, e.g.: --- The GNU Emacs Lisp Reference Manual rev 2.9 April '07 Chapter 25 p. 441 states: Command: append-to-file start end filename ..... ..... When called from Lisp, this function is completely equivalent to: (write-region start end filename t) Command: write-region start end filename &optional append visit lockname mustbenew .... .... .... ''if START is a string, then that string is written to the file, instead of any buffer contents, and END is ignored." ---- How does one pass the START of a string to the command? This ?bug? is identified by another user in the the thread below @: http://lists.gnu.org/archive/html/help-gnu-emacs/2007-10/msg00704.html --- As the manual would indicate, it seems relevant for one to be able to pass a string to a file as a discrete step within certain routinely automated tasks commonly encapsulated within kbd macros. Are we missing something? --- This ?bug? was encountered using: GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE