unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Adding a menu item for htmlfontify-buffer to File menu
@ 2010-11-12 14:04 Masatake YAMATO
  2010-11-12 15:00 ` Lennart Borgman
  2010-11-12 21:03 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Masatake YAMATO @ 2010-11-12 14:04 UTC (permalink / raw)
  To: emacs-devel

How do you think adding a menu item for htmlfontify-buffer to File menu?

html format is popular so newer user may want to know emacs has an
ability to convert the buffer display to html format.


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2010-11-09 08:00:46 +0000
+++ lisp/ChangeLog	2010-11-09 19:00:11 +0000
@@ -1,3 +1,8 @@
+2010-11-09  Masatake YAMATO  <yamato@redhat.com>
+
+	* menu-bar.el (menu-bar-file-menu): Add a new item "Convert Buffer to HTML"
+	to File menu.
+
=== modified file 'lisp/menu-bar.el'
--- lisp/menu-bar.el	2010-10-31 14:40:01 +0000
+++ lisp/menu-bar.el	2010-11-09 18:58:34 +0000
@@ -131,6 +131,11 @@
 (define-key menu-bar-file-menu [separator-window]
   menu-bar-separator)
 
+(define-key menu-bar-file-menu [htmlfontify-buffer]
+  `(menu-item ,(purecopy "Convert Buffer to HTML") htmlfontify-buffer
+	      :enable (menu-bar-menu-frame-live-and-visible-p)
+	      :help ,(purecopy "Pretty-print current buffer to a new buffer in HTML")))
+
 (define-key menu-bar-file-menu [ps-print-region]
   `(menu-item ,(purecopy "Postscript Print Region (B+W)") ps-print-region
 	      :enable mark-active



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-12 14:04 Adding a menu item for htmlfontify-buffer to File menu Masatake YAMATO
@ 2010-11-12 15:00 ` Lennart Borgman
  2010-11-14 22:11   ` Juri Linkov
  2010-11-12 21:03 ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2010-11-12 15:00 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

On Fri, Nov 12, 2010 at 3:04 PM, Masatake YAMATO <yamato@redhat.com> wrote:
> How do you think adding a menu item for htmlfontify-buffer to File menu?

Please take a look at the version of this included in nXhtml. This
uses htmlfontify-buffer and shows it in your web browser so you can
print easily if you want to.

I have attached a picture of how the menu looks when you have enabled
this in nXhtml. There are some other "print" options there too.

[-- Attachment #2: nXhtm-htmlfontify-print.png --]
[-- Type: image/png, Size: 39386 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-12 14:04 Adding a menu item for htmlfontify-buffer to File menu Masatake YAMATO
  2010-11-12 15:00 ` Lennart Borgman
@ 2010-11-12 21:03 ` Stefan Monnier
  2010-11-15 21:39   ` Drew Adams
  2010-11-15 23:36   ` Andrew W. Nosenko
  1 sibling, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2010-11-12 21:03 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

> How do you think adding a menu item for htmlfontify-buffer to File menu?

I agree that it should be reachable from the menu.  OTOH that File menu
has already too many entries to "print".

Maybe that Print subsection should be put into its own submenu, or maybe
we should have just "print buffer" and "print region" and then prompt
the user about how she wants to print (just print, to ps, to b&w ps, to
html, younameit).


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-12 15:00 ` Lennart Borgman
@ 2010-11-14 22:11   ` Juri Linkov
  0 siblings, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2010-11-14 22:11 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Masatake YAMATO, emacs-devel

>> How do you think adding a menu item for htmlfontify-buffer to File menu?
>
> I have attached a picture of how the menu looks when you have enabled
> this in nXhtml. There are some other "print" options there too.

Nice to see a separate submenu for print-related commands.
It makes the File menu much shorter.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-12 21:03 ` Stefan Monnier
@ 2010-11-15 21:39   ` Drew Adams
  2010-11-15 23:36   ` Andrew W. Nosenko
  1 sibling, 0 replies; 8+ messages in thread
From: Drew Adams @ 2010-11-15 21:39 UTC (permalink / raw)
  To: 'Stefan Monnier', 'Masatake YAMATO'; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

> > How do you think adding a menu item for htmlfontify-buffer 
> > to File menu?
> 
> I agree that it should be reachable from the menu.  OTOH that 
> File menu
> has already too many entries to "print".
> 
> Maybe that Print subsection should be put into its own 
> submenu, or maybe
> we should have just "print buffer" and "print region" and then prompt
> the user about how she wants to print (just print, to ps, to 
> b&w ps, to html, younameit).

See standard library printing.el. There should be only one Print menu. If you
like, add the HTML printing/preview stuff to what printing.el already provides.


[-- Attachment #2: throw-printing.gif --]
[-- Type: image/gif, Size: 9992 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-12 21:03 ` Stefan Monnier
  2010-11-15 21:39   ` Drew Adams
@ 2010-11-15 23:36   ` Andrew W. Nosenko
  2010-11-15 23:51     ` Miles Bader
  2010-11-16 14:20     ` Ted Zlatanov
  1 sibling, 2 replies; 8+ messages in thread
From: Andrew W. Nosenko @ 2010-11-15 23:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Masatake YAMATO, emacs-devel

On Fri, Nov 12, 2010 at 23:03, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> How do you think adding a menu item for htmlfontify-buffer to File menu?
>
> I agree that it should be reachable from the menu.  OTOH that File menu
> has already too many entries to "print".
>
> Maybe that Print subsection should be put into its own submenu, or maybe
> we should have just "print buffer" and "print region" and then prompt
> the user about how she wants to print (just print, to ps, to b&w ps, to
> html, younameit).

Excuse me, but convert to html is not a print.  It's... hmm... convert :-)
Convert to html, convert to postscript, convert to pdf...  Or export,
if you prefer that name.  But not a print.
May be in English the word "print" has some other additional sense,
unaccessible to me, but in Russian "to print" ("вывод на печать",
"напечатать") has only one sense: make a hardcopy.

-- 
Andrew W. Nosenko <andrew.w.nosenko@gmail.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-15 23:36   ` Andrew W. Nosenko
@ 2010-11-15 23:51     ` Miles Bader
  2010-11-16 14:20     ` Ted Zlatanov
  1 sibling, 0 replies; 8+ messages in thread
From: Miles Bader @ 2010-11-15 23:51 UTC (permalink / raw)
  To: Andrew W. Nosenko; +Cc: emacs-devel, Stefan Monnier, Masatake YAMATO

"Andrew W. Nosenko" <andrew.w.nosenko@gmail.com> writes:
>> Maybe that Print subsection should be put into its own submenu, or maybe
>> we should have just "print buffer" and "print region" and then prompt
>> the user about how she wants to print (just print, to ps, to b&w ps, to
>> html, younameit).
>
> Excuse me, but convert to html is not a print.  It's... hmm... convert :-)
> Convert to html, convert to postscript, convert to pdf...  Or export,
> if you prefer that name.  But not a print.
> May be in English the word "print" has some other additional sense,

It depends on what exactly it's doing...

"Printing" sort of means making a particular presentation form of the
document (usually paginated, often with headers/footers, etc).  This is
opposed to, for instance, exporting its contents in a way that maintains
semantics to some degree etc.

So for instance, "print to a file" is a different operation from "save
to a file".

"Print to html", likewise, would mean to write an html-encoded version
of the presentation-form of the document (which is not usually useful as
a way of actually saving the document's contents), and typically would
be offered alongside "Print to Postscript/PDF/whatever".  There might
_also_ be an "Export to html" operation for modes that support it; e.g.,
in an XML-mode of some sort, exporting to html might make sense...

-Miles

-- 
「すっごい」と呟いてる。「へんてこなもんばっかり」
「そんなにへんてこ?」
「へんてこへんてこ」
そう言われると見たくなってしまう。



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Adding a menu item for htmlfontify-buffer to File menu
  2010-11-15 23:36   ` Andrew W. Nosenko
  2010-11-15 23:51     ` Miles Bader
@ 2010-11-16 14:20     ` Ted Zlatanov
  1 sibling, 0 replies; 8+ messages in thread
From: Ted Zlatanov @ 2010-11-16 14:20 UTC (permalink / raw)
  To: emacs-devel

On Tue, 16 Nov 2010 01:36:59 +0200 "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com> wrote: 

AWN> On Fri, Nov 12, 2010 at 23:03, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> How do you think adding a menu item for htmlfontify-buffer to File menu?
>> 
>> I agree that it should be reachable from the menu.  OTOH that File menu
>> has already too many entries to "print".
>> 
>> Maybe that Print subsection should be put into its own submenu, or maybe
>> we should have just "print buffer" and "print region" and then prompt
>> the user about how she wants to print (just print, to ps, to b&w ps, to
>> html, younameit).

AWN> Excuse me, but convert to html is not a print.  It's... hmm... convert :-)
AWN> Convert to html, convert to postscript, convert to pdf...  Or export,
AWN> if you prefer that name.  But not a print.
AWN> May be in English the word "print" has some other additional sense,
AWN> unaccessible to me, but in Russian "to print" ("вывод на печать",
AWN> "напечатать") has only one sense: make a hardcopy.

I think the proper verb is "render" and not "convert" or "export" or
"print," because the original is not in a markup format.  If it was,
"convert" or "export" might be appropriate.

But there's strong precedent in English for "print" to mean "output" in
computers.  So it's not a terrible verb choice IMO.

Ted




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-16 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 14:04 Adding a menu item for htmlfontify-buffer to File menu Masatake YAMATO
2010-11-12 15:00 ` Lennart Borgman
2010-11-14 22:11   ` Juri Linkov
2010-11-12 21:03 ` Stefan Monnier
2010-11-15 21:39   ` Drew Adams
2010-11-15 23:36   ` Andrew W. Nosenko
2010-11-15 23:51     ` Miles Bader
2010-11-16 14:20     ` Ted Zlatanov

Code repositories for project(s) associated with this public inbox

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

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).