all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: david.reitter@gmail.com, emacs-devel@gnu.org
Subject: Re: patch: handle PS/PDF in Gnus
Date: Sun, 08 Jul 2007 06:22:27 +0300	[thread overview]
Message-ID: <ud4z3bmvg.fsf@gnu.org> (raw)
In-Reply-To: <wlabu77fia.wl%mituharu@math.s.chiba-u.ac.jp> (message from YAMAMOTO Mitsuharu on Sun, 08 Jul 2007 12:15:09 +0900)

> Date: Sun, 08 Jul 2007 12:15:09 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Cc: emacs-devel@gnu.org
> 
> As for the standard print dialogs in Carbon, I've tried an
> experimental implementation before (for Mac OS X 10.3 and later).  The
> function looks like:
> 
>   DEFUN ("mac-file-print-dialog", Fmac_file_print_dialog, Smac_file_print_dialog, 1, 3, 0,
> 	 doc: /* Print file named FILENAME using the standard print dialog.
>   The optional second argument NPAGES specifies the total number of
>   pages; it will appear as the default in the To field of the dialog.
>   The optional third argument MIME-TYPE specifies the mime type of the
>   file.  It must be either a string, nil (auto-typed) or t (synonym of
>   \"application/postscript\").  */)
>        (filename, npages, mime_type)
>        Lisp_Object filename, npages, mime_type;
> 
> and can be used as:
> 
>   (defun mac-ps-print-region (start end program
> 				    &optional delete buffer display
> 				    &rest args)
>     (let (pages file)
>       (save-excursion
> 	(goto-char start)
> 	(if (and (re-search-forward "^%%Trailer" nil end)
> 		 (re-search-forward "^%%Pages:\\s-*\\([0-9]+\\)" nil end))
> 	    (setq pages (string-to-number (match-string 1)))))
>       (setq file (make-temp-file "mac-ps-print"))
>       (write-region start end file nil 'nomessage)
>       (unwind-protect
> 	  (mac-file-print-dialog file pages t)
> 	(delete-file file))))
> 
>   (setq ps-print-region-function 'mac-ps-print-region)
> 
> Of course, we need to discuss the specification of the function so
> that it can be common to the platforms that support print dialogs (in
> particular, recent Gtk+) in order to include such a feature in Emacs.

I think we need to discuss a platform-independent interface to a
printer dialog, before we implement platform-dependent
implementations.  Carbon and Gtk+ are not the only platforms that have
such dialogs built into the OS APIs.

  reply	other threads:[~2007-07-08  3:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 15:21 patch: handle PS/PDF in Gnus Sean O'Rourke
2007-07-06 15:27 ` Sean O'Rourke
2007-07-06 15:34   ` David Kastrup
2007-07-06 15:52     ` David Reitter
2007-07-06 15:54       ` Sean O'Rourke
2007-07-06 16:31         ` David Reitter
2007-07-08  3:15           ` YAMAMOTO Mitsuharu
2007-07-08  3:22             ` Eli Zaretskii [this message]
2007-07-08 13:41               ` YAMAMOTO Mitsuharu
2007-07-08 14:31               ` Stefan Monnier
2007-07-09 10:52                 ` Jan Djärv
2007-07-09 12:39                   ` David Kastrup
2007-07-09 14:17                     ` Jan Djärv
2007-07-09 18:03                   ` YAMAMOTO Mitsuharu
2007-07-09 19:57                     ` Jan Djärv
2007-07-11 21:51                 ` Jason Rumney
2007-07-12  9:35                   ` Jan Djärv
2007-07-06 18:13       ` Stefan Monnier
2007-07-06 19:32         ` Sean O'Rourke
2007-07-08  5:13           ` Sean O'Rourke
2007-07-08 10:19             ` Jason Rumney
2007-07-08 13:03               ` Sean O'Rourke
2007-07-08 13:14                 ` Sean O'Rourke
2007-07-06 20:44         ` Jason Rumney
2007-07-08  4:52           ` Sean O'Rourke
2007-07-06 15:53     ` Sean O'Rourke

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=ud4z3bmvg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.