From: xma at gnu.org (Xavier Maillard)
Subject: [Howm-eng 52] Re: C-c C-c: save and kill buffer ?
Date: Wed, 9 Apr 2008 02:00:09 +0200 [thread overview]
Message-ID: <200804090000.m39009F1004703@localhost.localdomain> (raw)
In-Reply-To: <m33apwl4ps.wl@id.domain> (khi@users.sourceforge.jp)
> I do not know why but I am used to press C-c C-c in almost all
> the modes I use. What it does ? Simply save the buffer and bury
> or kill it.
How about this quick solution?
(from http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?SaveAndKillBuffer)
Yes thank you.
I even found something more "consistent" in elscreen-howm:
;; From elscreen-howm
(defun howm-save-and-kill-buffer ()
(interactive)
(let* ((file-name (buffer-file-name)))
(when (and file-name (string-match "\\.howm" file-name))
(if (save-excursion
(goto-char (point-min))
(re-search-forward "[^ \t\r\n]" nil t))
(howm-save-buffer)
(set-buffer-modified-p nil)
(when (file-exists-p file-name)
(delete-file file-name)
(message "(Deleted %s)" (file-name-nondirectory file-name))))
(kill-buffer nil))))
(eval-after-load "howm-mode"
'(progn
(define-key howm-mode-map
"\C-c\C-c" 'howm-save-and-kill-buffer)))
I modified it a little bit to get rid of the elscreen part which
I do not use.
Why not put this in the howm code ?
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
next prev parent reply other threads:[~2008-04-09 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-08 6:29 [Howm-eng 50] " xma
2008-04-08 15:57 ` [Howm-eng 51] " khi
2008-04-09 0:00 ` xma [this message]
2008-04-09 13:22 ` [Howm-eng 57] " khi
2008-04-12 0:00 ` [Howm-eng 65] " xma
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200804090000.m39009F1004703@localhost.localdomain \
--to=howm-eng@lists.osdn.me \
/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 NNTP newsgroup(s).