* Put hide-ifdef on menu-bar?
@ 2008-01-05 7:17 Nick Roberts
2008-01-05 9:14 ` Dan Nicolaescu
0 siblings, 1 reply; 17+ messages in thread
From: Nick Roberts @ 2008-01-05 7:17 UTC (permalink / raw)
To: emacs-devel
Howa about adding the hide-ifdef commands to the menu bar for mortals,
like myself who can't remember the key bindings?
--
Nick http://www.inet.net.nz/~nickrob
2008-01-05 Nick Roberts <nickrob@snap.net.nz>
* progmodes/hideif.el (hide-ifdef-mode-menu): Put hide-ifdef commands
on menu bar.
*** hideif.el.~1.57.~ 2007-07-27 09:22:52.000000000 +1200
--- hideif.el 2008-01-05 20:02:11.000000000 +1300
***************
*** 143,148 ****
--- 143,162 ----
map)
"Keymap used with `hide-ifdef-mode'.")
+ (easy-menu-define hide-ifdef-mode-menu hide-ifdef-mode-map
+ "Menu for `hide-ifdef-mode'."
+ '("Hide-Ifdef"
+ ["Hide some ifdefs" hide-ifdefs t]
+ ["Show all ifdefs" show-ifdefs t]
+ ["Hide ifdef block" hide-ifdef-block t]
+ ["Show ifdef block" show-ifdef-block t]
+ ["Define a variable" hide-ifdef-define t]
+ ["Define an alist" hide-ifdef-set-define-alist t]
+ ["Use an alist" hide-ifdef-use-define-alist t]
+ ["Undefine a variable" hide-ifdef-undef t]
+ ["Toggle read only" hide-ifdef-toggle-read-only
+ :style toggle :selected hide-ifdef-read-only]))
+
(defvar hide-ifdef-hiding nil
"Non-nil when text may be hidden.")
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-05 7:17 Put hide-ifdef on menu-bar? Nick Roberts
@ 2008-01-05 9:14 ` Dan Nicolaescu
2008-01-05 9:58 ` Nick Roberts
2008-01-05 10:06 ` martin rudalics
0 siblings, 2 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2008-01-05 9:14 UTC (permalink / raw)
To: Nick Roberts; +Cc: emacs-devel
Nick Roberts <nickrob@snap.net.nz> writes:
> Howa about adding the hide-ifdef commands to the menu bar for mortals,
> like myself who can't remember the key bindings?
Good idea. IMHO all major modes should have a menu, and all the minor
modes that have a significant number of key bindings should have one
too. It makes it easier for users to discover the functionality.
Now in the case of hide-ifdef, it would be good if there was a menu
entry in the cc-mode menu to turn on this mode. That would make this
feature more discoverable for potential users.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-05 9:14 ` Dan Nicolaescu
@ 2008-01-05 9:58 ` Nick Roberts
2008-01-06 1:11 ` Dan Nicolaescu
2008-01-05 10:06 ` martin rudalics
1 sibling, 1 reply; 17+ messages in thread
From: Nick Roberts @ 2008-01-05 9:58 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
> Now in the case of hide-ifdef, it would be good if there was a menu
> entry in the cc-mode menu to turn on this mode. That would make this
> feature more discoverable for potential users.
I agree. On emacs-pretest-bug (Tue, 27 Feb 2007) I previously said:
| Subject: Move hide-ifdef-mode toggle button
| I'm not likely to want to toggle hide-ifdef-mode when browsing info, so
| how about moving it off the list in the pop up menu on the mode line?
[minor mode list]
| Although it's not part of cc-mode it could be moved to the Toggle...
| menu-item on the C menu.
but got no reply. Is hide-ifdef useful for other languages?
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-05 9:14 ` Dan Nicolaescu
2008-01-05 9:58 ` Nick Roberts
@ 2008-01-05 10:06 ` martin rudalics
2008-01-06 1:08 ` Dan Nicolaescu
1 sibling, 1 reply; 17+ messages in thread
From: martin rudalics @ 2008-01-05 10:06 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Nick Roberts, emacs-devel
> Good idea. IMHO all major modes should have a menu, and all the minor
> modes that have a significant number of key bindings should have one
> too. It makes it easier for users to discover the functionality.
Seconded.
> Now in the case of hide-ifdef, it would be good if there was a menu
> entry in the cc-mode menu to turn on this mode. That would make this
> feature more discoverable for potential users.
BTW, in
http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg01503.html
I proposed a patch to optionally shadow such text rather than hide it
which would "make this feature less intimidating for potential users".
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-05 10:06 ` martin rudalics
@ 2008-01-06 1:08 ` Dan Nicolaescu
2008-01-06 1:11 ` Tom Tromey
0 siblings, 1 reply; 17+ messages in thread
From: Dan Nicolaescu @ 2008-01-06 1:08 UTC (permalink / raw)
To: martin rudalics; +Cc: Nick Roberts, emacs-devel
martin rudalics <rudalics@gmx.at> writes:
> > Now in the case of hide-ifdef, it would be good if there was a menu
> > entry in the cc-mode menu to turn on this mode. That would make this
> > feature more discoverable for potential users.
>
> BTW, in
>
> http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg01503.html
>
> I proposed a patch to optionally shadow such text rather than hide it
> which would "make this feature less intimidating for potential users".
Seems like a good idea. What keeps this from being checked in?
As a further enhancement it might be a good idea to put in mouse face on
the #if lines, then the users can click on the item and say
"hide/show". This would make it the feature more obvious.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 1:08 ` Dan Nicolaescu
@ 2008-01-06 1:11 ` Tom Tromey
2008-01-06 10:42 ` Dan Nicolaescu
2008-01-06 21:21 ` Nick Roberts
0 siblings, 2 replies; 17+ messages in thread
From: Tom Tromey @ 2008-01-06 1:11 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: martin rudalics, Nick Roberts, emacs-devel
>>>>> "Dan" == Dan Nicolaescu <dann@ics.uci.edu> writes:
Dan> As a further enhancement it might be a good idea to put in mouse face on
Dan> the #if lines, then the users can click on the item and say
Dan> "hide/show". This would make it the feature more obvious.
Eclipse puts folding controls into the fringe... seems like a nice
idea. The control is a little arrow that points in different
directions depending on whether the code is folded.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-05 9:58 ` Nick Roberts
@ 2008-01-06 1:11 ` Dan Nicolaescu
0 siblings, 0 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2008-01-06 1:11 UTC (permalink / raw)
To: Nick Roberts; +Cc: emacs-devel
Nick Roberts <nickrob@snap.net.nz> writes:
> > Now in the case of hide-ifdef, it would be good if there was a menu
> > entry in the cc-mode menu to turn on this mode. That would make this
> > feature more discoverable for potential users.
>
> I agree. On emacs-pretest-bug (Tue, 27 Feb 2007) I previously said:
>
>
> | Subject: Move hide-ifdef-mode toggle button
>
> | I'm not likely to want to toggle hide-ifdef-mode when browsing info, so
> | how about moving it off the list in the pop up menu on the mode line?
> [minor mode list]
> | Although it's not part of cc-mode it could be moved to the Toggle...
> | menu-item on the C menu.
>
> but got no reply.
Hmm, maybe post this again and if there are not objections check it in.
> Is hide-ifdef useful for other languages?
It should be useful to all languages that use the C preprocessor: asm
and I think also Fortran.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 1:11 ` Tom Tromey
@ 2008-01-06 10:42 ` Dan Nicolaescu
2008-01-06 20:32 ` Stefan Monnier
2008-01-06 21:21 ` Nick Roberts
1 sibling, 1 reply; 17+ messages in thread
From: Dan Nicolaescu @ 2008-01-06 10:42 UTC (permalink / raw)
To: Tom Tromey; +Cc: martin rudalics, Nick Roberts, emacs-devel
Tom Tromey <tromey@redhat.com> writes:
> >>>>> "Dan" == Dan Nicolaescu <dann@ics.uci.edu> writes:
>
> Dan> As a further enhancement it might be a good idea to put in mouse face on
> Dan> the #if lines, then the users can click on the item and say
> Dan> "hide/show". This would make it the feature more obvious.
>
> Eclipse puts folding controls into the fringe... seems like a nice
> idea. The control is a little arrow that points in different
> directions depending on whether the code is folded.
IMHO we should have such arrows in the fringe for all modes that do some
hiding. It would be a good visual indication for the user that something
is hidden and would provide an easy way to un-hide.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 10:42 ` Dan Nicolaescu
@ 2008-01-06 20:32 ` Stefan Monnier
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2008-01-06 20:32 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: Tom Tromey, martin rudalics, Nick Roberts, emacs-devel
>> Eclipse puts folding controls into the fringe... seems like a nice
>> idea. The control is a little arrow that points in different
>> directions depending on whether the code is folded.
> IMHO we should have such arrows in the fringe for all modes that do some
> hiding.
It's probably not applicable to hideshow since hs-minor-mode doesn't
hide things on a line-by-line basis.
But it'd probably be a good extension for outline-minor-mode, indeed.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 1:11 ` Tom Tromey
2008-01-06 10:42 ` Dan Nicolaescu
@ 2008-01-06 21:21 ` Nick Roberts
2008-01-06 22:45 ` Tom Tromey
2008-01-07 11:31 ` Richard Stallman
1 sibling, 2 replies; 17+ messages in thread
From: Nick Roberts @ 2008-01-06 21:21 UTC (permalink / raw)
To: Tom Tromey; +Cc: martin rudalics, Dan Nicolaescu, emacs-devel
Tom Tromey writes:
> >>>>> "Dan" == Dan Nicolaescu <dann@ics.uci.edu> writes:
>
> Dan> As a further enhancement it might be a good idea to put in mouse face on
> Dan> the #if lines, then the users can click on the item and say
> Dan> "hide/show". This would make it the feature more obvious.
>
> Eclipse puts folding controls into the fringe... seems like a nice
> idea. The control is a little arrow that points in different
> directions depending on whether the code is folded.
Eclipse places many different markers in the fringe: compilation error,
bookmarks, TODO markers, etc. We could do the same in Emacs but that reminds
me that it's currently not possible to add a tooltip to such markers. Perhaps
this should be put in TODO.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 21:21 ` Nick Roberts
@ 2008-01-06 22:45 ` Tom Tromey
2008-01-07 1:34 ` Stefan Monnier
2008-01-07 11:31 ` Richard Stallman
2008-01-07 11:31 ` Richard Stallman
1 sibling, 2 replies; 17+ messages in thread
From: Tom Tromey @ 2008-01-06 22:45 UTC (permalink / raw)
To: Nick Roberts; +Cc: martin rudalics, Dan Nicolaescu, emacs-devel
>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
Nick> Eclipse places many different markers in the fringe: compilation
Nick> error, bookmarks, TODO markers, etc. We could do the same in
Nick> Emacs but that reminds me that it's currently not possible to
Nick> add a tooltip to such markers. Perhaps this should be put in
Nick> TODO.
Also, Eclipse allows fringe elements which do not scroll with the
window contents. This turns out to be pretty handy.
For instance you could show the user the visible area of the current
buffer (relative to the size of the whole buffer) as a different
background color. In Eclipse you can see little blocks in the
right-hand fringe which represent errors, problems, etc, and you can
click them to jump to the corresponding point.
I don't think there is a way to do this in Emacs yet, either.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 22:45 ` Tom Tromey
@ 2008-01-07 1:34 ` Stefan Monnier
2008-01-07 1:36 ` Tom Tromey
2008-01-07 11:31 ` Richard Stallman
1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-01-07 1:34 UTC (permalink / raw)
To: Tom Tromey; +Cc: martin rudalics, Nick Roberts, Dan Nicolaescu, emacs-devel
Nick> Eclipse places many different markers in the fringe: compilation
Nick> error, bookmarks, TODO markers, etc. We could do the same in
Nick> Emacs but that reminds me that it's currently not possible to
Nick> add a tooltip to such markers. Perhaps this should be put in
Nick> TODO.
> Also, Eclipse allows fringe elements which do not scroll with the
> window contents. This turns out to be pretty handy.
> For instance you could show the user the visible area of the current
> buffer (relative to the size of the whole buffer) as a different
> background color. In Eclipse you can see little blocks in the
> right-hand fringe which represent errors, problems, etc, and you can
> click them to jump to the corresponding point.
> I don't think there is a way to do this in Emacs yet, either.
Those things should be put in the scrollbar, don't you think?
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-07 1:34 ` Stefan Monnier
@ 2008-01-07 1:36 ` Tom Tromey
0 siblings, 0 replies; 17+ messages in thread
From: Tom Tromey @ 2008-01-07 1:36 UTC (permalink / raw)
To: Stefan Monnier; +Cc: martin rudalics, Nick Roberts, Dan Nicolaescu, emacs-devel
>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> For instance you could show the user the visible area of the current
>> buffer (relative to the size of the whole buffer) as a different
>> background color. In Eclipse you can see little blocks in the
>> right-hand fringe which represent errors, problems, etc, and you can
>> click them to jump to the corresponding point.
>> I don't think there is a way to do this in Emacs yet, either.
Stefan> Those things should be put in the scrollbar, don't you think?
Not me, but then I disable the scrollbars but not the fringe.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 21:21 ` Nick Roberts
2008-01-06 22:45 ` Tom Tromey
@ 2008-01-07 11:31 ` Richard Stallman
1 sibling, 0 replies; 17+ messages in thread
From: Richard Stallman @ 2008-01-07 11:31 UTC (permalink / raw)
To: Nick Roberts; +Cc: tromey, rudalics, dann, emacs-devel
Eclipse places many different markers in the fringe: compilation error,
bookmarks, TODO markers, etc. We could do the same in Emacs but that reminds
me that it's currently not possible to add a tooltip to such markers. Perhaps
this should be put in TODO.
Please do. Also, would someone like to work on implementing that
tooltip feature?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-06 22:45 ` Tom Tromey
2008-01-07 1:34 ` Stefan Monnier
@ 2008-01-07 11:31 ` Richard Stallman
2008-01-07 12:27 ` David Kastrup
1 sibling, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2008-01-07 11:31 UTC (permalink / raw)
To: Tom Tromey; +Cc: rudalics, nickrob, dann, emacs-devel
Also, Eclipse allows fringe elements which do not scroll with the
window contents. This turns out to be pretty handy.
I do not understand what that means.
For instance you could show the user the visible area of the current
buffer (relative to the size of the whole buffer) as a different
background color.
That sounds like a scroll bar. We have scroll bars.
Or perhaps I simply don't understand.
In Eclipse you can see little blocks in the
right-hand fringe which represent errors, problems, etc, and you can
click them to jump to the corresponding point.
I do not understand why you want these not to scroll with the text
they apply to.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-07 11:31 ` Richard Stallman
@ 2008-01-07 12:27 ` David Kastrup
2008-01-08 19:06 ` Richard Stallman
0 siblings, 1 reply; 17+ messages in thread
From: David Kastrup @ 2008-01-07 12:27 UTC (permalink / raw)
To: rms; +Cc: Tom Tromey, rudalics, nickrob, dann, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Also, Eclipse allows fringe elements which do not scroll with the
> window contents. This turns out to be pretty handy.
>
> I do not understand what that means.
>
> For instance you could show the user the visible area of the current
> buffer (relative to the size of the whole buffer) as a different
> background color.
>
> That sounds like a scroll bar. We have scroll bars.
But the scroll bar area can't have error markers.
> In Eclipse you can see little blocks in the right-hand fringe
> which represent errors, problems, etc, and you can click them to
> jump to the corresponding point.
>
> I do not understand why you want these not to scroll with the text
> they apply to.
Because then they would be off-screen most of the time. The idea is to
have all errors in the current buffer visibly indicated and quickly
reachable. By distributing them in a scroll-bar like area corresponding
to the whole buffer, that becomes possible.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Put hide-ifdef on menu-bar?
2008-01-07 12:27 ` David Kastrup
@ 2008-01-08 19:06 ` Richard Stallman
0 siblings, 0 replies; 17+ messages in thread
From: Richard Stallman @ 2008-01-08 19:06 UTC (permalink / raw)
To: David Kastrup; +Cc: tromey, rudalics, nickrob, dann, emacs-devel
But the scroll bar area can't have error markers.
Maybe we should put them there. If the idea is that we want a
vertical strip of screen that corresponds to the whole length of the
buffer, that seems like the way to do it.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-01-08 19:06 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-05 7:17 Put hide-ifdef on menu-bar? Nick Roberts
2008-01-05 9:14 ` Dan Nicolaescu
2008-01-05 9:58 ` Nick Roberts
2008-01-06 1:11 ` Dan Nicolaescu
2008-01-05 10:06 ` martin rudalics
2008-01-06 1:08 ` Dan Nicolaescu
2008-01-06 1:11 ` Tom Tromey
2008-01-06 10:42 ` Dan Nicolaescu
2008-01-06 20:32 ` Stefan Monnier
2008-01-06 21:21 ` Nick Roberts
2008-01-06 22:45 ` Tom Tromey
2008-01-07 1:34 ` Stefan Monnier
2008-01-07 1:36 ` Tom Tromey
2008-01-07 11:31 ` Richard Stallman
2008-01-07 12:27 ` David Kastrup
2008-01-08 19:06 ` Richard Stallman
2008-01-07 11:31 ` Richard Stallman
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).