From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40859 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.gnus.general Subject: Re: request feedback on new function gnus-dired-attach Date: Sat, 15 Dec 2001 01:39:27 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: <2ny9k52erz.fsf@zsh.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176346 3131 80.91.224.250 (21 Oct 2002 04:59:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:59:06 +0000 (UTC) Return-Path: Original-Received: (qmail 12748 invoked from network); 15 Dec 2001 06:40:06 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 15 Dec 2001 06:40:06 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16F8U5-00023K-00; Sat, 15 Dec 2001 00:39:45 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 15 Dec 2001 00:39:33 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id AAA21593 for ; Sat, 15 Dec 2001 00:39:21 -0600 (CST) Original-Received: (qmail 12732 invoked by alias); 15 Dec 2001 06:39:28 -0000 Original-Received: (qmail 12727 invoked from network); 15 Dec 2001 06:39:28 -0000 Original-Received: from mail.cis.ohio-state.edu (HELO cis.ohio-state.edu) (root@164.107.115.5) by gnus.org with SMTP; 15 Dec 2001 06:39:28 -0000 Original-Received: from eta.cis.ohio-state.edu (rutt@eta.cis.ohio-state.edu [164.107.112.62]) by cis.ohio-state.edu (8.9.1/8.9.1) with ESMTP id BAA28055 for ; Sat, 15 Dec 2001 01:39:28 -0500 (EST) Original-Received: (from rutt@localhost) by eta.cis.ohio-state.edu (8.9.1/8.9.1) id BAA05073; Sat, 15 Dec 2001 01:39:27 -0500 (EST) X-Authentication-Warning: eta.cis.ohio-state.edu: rutt set sender to rutt@cis.ohio-state.edu using -f Original-Sender: Benjamin Rutt Original-To: ding@gnus.org X-Face: (&zE&hBC"G~kYNV6dt5#[X'%{!h5@/oUyc`CRNn#d6e2qi%~4N.?_ys_bQ3&7.* (ShengHuo ZHU's message of "Sat, 15 Dec 2001 01:12:00 -0500") Original-Lines: 53 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (sparc-sun-solaris2.6) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40859 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40859 ShengHuo ZHU writes: >> (define-key dired-mode-map [(control c) (control a)] 'gnus-dired-attach) >> >> is somewhat ugly, since we are defining a dired keymap in another >> area of code. Paul Jarc, on the above g.e.g thread, suggested that >> we define a gnus-dired minor mode which can contain the keymap. >> But I'm not sure if that's better, since ultimately we're still >> stealing a possible future dired keybinding (C-c C-a currently >> isn't defined in dired-mode). Maybe that last line should simply >> go in users ~/.gnus so the users control the keybinding override? > > Why not do both? We can steal a special (or customizable) prefix for > gnus-dired minor mode. Users still can set C-c C-a in dired-mode-map > to the function. This would be less intrusive. OK, I'll work on defining a gnus-dired minor mode. >> 3) whether you think this should exist as a separate file that isn't >> included in gnus. > > It is better to add a separate file, say gnus-dired.el, for gnus-dired > minor mode. If you'd like to add your code to Gnus package, you'd > better send an assignment form to FSF (unless you've signed the form). > I can send you the request form. Yes, I'd like it to be included with gnus. I will be happy to sign the assignment request form for the FSF, just let me know what I need to do to get that accomplished. > In addition, I have a piece of code to open file (in dired-mode) > according to mailcap. I'd like to include it too. Sure, please send your code to me and I will integrate it into the new file gnus-dired.el. The file can then be used for any purpose where gnus and dired meet. > How about use files-to-attach as an argument? So the function can be > called from other codes too. > > (defun gnus-dired-attach (files-to-attach) > "Attach dired's marked files to a gnus message composition." > (interactive > (list > (delq nil > (mapcar > (lambda (f) (if (file-directory-p f) nil f)) > (nreverse (dired-map-over-marks (dired-get-filename) nil)))))) > ...) That looks very nice, I will make that change. Thanks, -- Benjamin