Subject: bug#12787: closed (Re: bug#12787: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 24 Nov 2012 18:52:02 +0000

Your bug report

#12787: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
12787: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12787
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#12787: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sat, 24 Nov 2012 13:50:11 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Since nobody else has spoken up in favour of bringing these two icons back,
I am closing this. Do feel free to reply with more info though.

Glenn Morris wrote:

> Could you name some applications that have it there by default?
> If I start up eg "gedit" it is not there, and I see no way to add it
> (I don't normally use gedit though). The gedit toolbar looks much the
> same as Emacs 24's. I imagine this consistency with other applications
> was the motivation for the changes.
>
> The "help" button seems pointless to me. It just does exactly the same
> as clicking the "help" menu, which is a few pixels away. I don't expect
> a significant number of people to have tool-bar on and menu-bar off.
> Every other tool-bar button in Emacs 23 is for an action that does not
> correspond to simply selecting a top-level menu.

Subject: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available
From: [email-masked]
To: [email-masked]
Cc: [email-masked]
Date: Fri, 02 Nov 2012 12:29:17 -0500 (CDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

The "Save As" and "Help" buttons from the tool bar are no longer available in Emacs 24. This change was not identified in the News.

My attempts to replace them fail.

I make the following changes in tool-bar.el:
-------------------------------------------------------------- 
(defun tool-bar-setup ()
  (setq tool-bar-separator-image-expression
    (tool-bar--image-expression "separator"))
(tool-bar-add-item-from-menu 'find-file "new" nil :label "New File"
     :vert-only t)
(tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil
     :label "Open" :vert-only t)
(tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t)
(tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t)
(tool-bar-add-item-from-menu 'save-buffer "save" nil
     :label "Save")

;; ---> I add the ?Save As? button here:
(tool-bar-add-item-from-menu 'write-file "saveas" nil
     :label "Save as")

(define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator)
(tool-bar-add-item-from-menu 'undo "undo" nil)
(define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
     "cut" nil :vert-only t)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy])
     "copy" nil :vert-only t)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste])
     "paste" nil :vert-only t)
(define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator)
(tool-bar-add-item-from-menu 'isearch-forward "search"
     nil :label "Search" :vert-only t)
;;(tool-bar-add-item-from-menu 'ispell-buffer "spell")
;; There's no icon appropriate for News and we need a command rather
;; than a lambda for Read Mail.
;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")

;; ---> I uncomment the help button here:
;; Help button on a tool bar is rather non-standard...
(let ((tool-bar-map (default-value 'tool-bar-map)))
     (tool-bar-add-item "help" (lambda ()
     (interactive)
     (popup-menu menu-bar-help-menu))
          'help
         :help "Pop up the Help menu"))
)
-------------------------------------------------------------- 
I save tool-bar.el, compile it to tool-bar.elc and then restart Emacs, but the buttons are not there.

I can evaluate portions of tool-bar.el to make the button appear during one session, but they will not appear at start-up.

Thank you,

Drew Ames