unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: <francis@devrx.org>
Subject: Positioning point after insert in another buffer
Date: Thu,  9 Dec 2004 19:28:01 +0100	[thread overview]
Message-ID: <27122796$110261648141b897a1b59d68.86352374@config18.schlund.de> (raw)


I am internationalising an application, and am trying to write a simple
emacs lisp function to kill the current region, insert a message into a
resource file in another buffer and then insert code to retrieve and
display the message.

The problem I have is that after I have executed my function the point
in the resource file is at the beginning of the inserted message. I
want it to be at the end, so when I run my function several times the
messages appear in the resource file in the order I created them. How
can I do this?

Here's the function:

(defvar fjdjava-message-buffer-name "ApplicationResources.properties")
(defun fjdjava-region-to-message (key)
  "Converts the region into a message in the buffer named
`fjdjava-message-buffer-name'"
  (interactive "sMessage key: \n")
  (kill-region (point) (mark))
  (save-excursion
    (set-buffer fjdjava-message-buffer-name)
    (insert key " = ")
    (yank)
    (insert "\n"))
  (insert "<bean:message key=\"" key "\" />"))

Thanks,

Francis.

             reply	other threads:[~2004-12-09 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-09 18:28 francis [this message]
     [not found] <mailman.4795.1102617658.27204.help-gnu-emacs@gnu.org>
2004-12-09 18:52 ` Positioning point after insert in another buffer Thien-Thi Nguyen
2004-12-10  3:50 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='27122796$110261648141b897a1b59d68.86352374@config18.schlund.de' \
    --to=francis@devrx.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).