From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bernhard Koenig" Newsgroups: gmane.emacs.devel Subject: Re: enhancement/wish Date: Tue, 28 Oct 2008 16:40:16 -0400 Message-ID: References: <4906BF50.40709@swipnet.se> <49074040.7060102@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1225226451 5970 80.91.229.12 (28 Oct 2008 20:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 20:40:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: "=?ISO-8859-1?Q?Jan_Dj=E4rv?=" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 28 21:41:53 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KuvNv-0002C3-4P for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2008 21:41:51 +0100 Original-Received: from localhost ([127.0.0.1]:41893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuvMo-0002Sp-Es for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2008 16:40:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuvMb-0002IZ-E2 for emacs-devel@gnu.org; Tue, 28 Oct 2008 16:40:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuvMW-0002Di-EW for emacs-devel@gnu.org; Tue, 28 Oct 2008 16:40:28 -0400 Original-Received: from [199.232.76.173] (port=38507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuvMW-0002DQ-52 for emacs-devel@gnu.org; Tue, 28 Oct 2008 16:40:24 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.169]:8778) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KuvMV-0001mg-5n for emacs-devel@gnu.org; Tue, 28 Oct 2008 16:40:24 -0400 Original-Received: by ug-out-1314.google.com with SMTP id 36so435706uga.17 for ; Tue, 28 Oct 2008 13:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=TZWLSLzqdjH4QtTPgpdsKNoRHs6y7+hnEPBhjw5nxg0=; b=eDxnPAosh1Bl+8aNj0Ou5ZDdmDdF0VMC6aGNIXODQF8Wzs47xuJqNKR0Uj7HkWblZr 4/AQZbFc90qyU2DcnNRkStxaBprPmwR0krePd+n9GW9GjEKsBzir1h+f7zAJVj14s8n9 UI01TQ0bwS9JQutXZ3FXpNFgy/8Va1xVBhjus= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dUaGyP3yq9jZAo/tL5JoP1RjHX2f8o+uHlOIKt47eS4t6jsAD3KRyFjO+/tfyXtVp/ xaWkLshH9BpWEB3S1Iw8fRhZF+xu8PEKQND0tC1kgk74CkTumf/dwOCd90YFZZySJB2s e5G7Pfp0H7EmwRSJTrHryLxqB4NN/j/Rq+1QI= Original-Received: by 10.67.115.12 with SMTP id s12mr167130ugm.51.1225226416366; Tue, 28 Oct 2008 13:40:16 -0700 (PDT) Original-Received: by 10.67.31.19 with HTTP; Tue, 28 Oct 2008 13:40:16 -0700 (PDT) In-Reply-To: <49074040.7060102@swipnet.se> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105110 Archived-At: OK, I see that there is a command tool-bar-local-item but it's not listed in http://www.gnu.org/software/emacs/elisp/html_node/Tool-Bar.html I guess the syopsis is tool-bar-local-item icon def key map &rest props but what is "map" in the case of "LaTeX-mode-hook"? Or in case of the info = mode? Best, Bernhard On Tue, Oct 28, 2008 at 12:39 PM, Jan Dj=E4rv wrote: > > > Bernhard Koenig skrev: >> >> Thanks Jan, that worked. Can I make it global? (It's currently showing >> up in things like .zshrc, .emacs even in M-x shell but not in the >> Latex environment.) >> > > I guess your latex environment has its own tool bar map. You must find s= ome > hook for when that environment starts so you then can add your item to th= at > tool bar map. Normally the variable tool-bar-map should be made buffer > local if some mode installs its own tool map. See for example how > lisp/progmodes/grep.el does it. > > Jan D. > >> Bernhard >> >> >> On Tue, Oct 28, 2008 at 3:29 AM, Jan D. wrote: >>> >>> Bernhard Koenig skrev: >>>> >>>> Yes, I did restart. I found a thread with a similar problem but I >>>> don't know how to resolve it: >>>> http://www.nabble.com/Ciao-on-Intel-Mac-td15000558.html >>>> >>>> In this thread they define a new function ciao-setup-tool-bar-helper, >>>> but I don't understand the syntax. The patch below gives me >>>> (wrong-type-argument listp "Recent"), the same problem from the url. >>>> >>> The syntax below is wrong. '("history" . "Recent") shall be replaced wi= th >>> a >>> name of an icon file to use, such as "open". See etc/images for >>> available >>> images. You can of course add your own. >>> >>> Also note that you must have recentf-mode on to see the tool bar item. >>> >>> Jan D. >>> >>>> Bernhard >>>> >>>> >>>> On Tue, Oct 28, 2008 at 12:12 AM, Eli Zaretskii wrote: >>>>>> >>>>>> Date: Mon, 27 Oct 2008 19:38:29 -0400 >>>>>> From: "Bernhard Koenig" >>>>>> Cc: emacs-devel@gnu.org >>>>>> >>>>>>> (tool-bar-add-item '("history" . "Recent") (lambda () >>>>>>> (interactive) >>>>>>> (popup-menu (easy-menu-filter-return >>>>>>> (recentf-make-menu-items) >>>>>>> "Open Recent"))) >>>>>>> 'recent-files >>>>>>> :visible '(and (boundp 'recentf-mode) recentf-mod= e) >>>>>>> :help "Pop up the Recent Files menu") >>>>>> >>>>>> Sorry for being a noob here but how do I integrate this into .emacs? >>>>>> "tool-bar-add-item" is not an interactive command so just adding it = to >>>>>> .emacs does nothing. >>>>> >>>>> ??? .emacs is not only for interactive commands. If adding this to i= t >>>>> does nothing, then something is wrong. >>>>> >>>>> You did restart Emacs after adding this, did you? >>>>> >>>> >>> >