org-mode: Agenda View doesn't show any items - org-mode

when I press c-c a a agenda view doesnt list any items, but when i press c-c a n agenda view lists week and todo items.
I have already added the org files to front.
Am I using the agenda view wrong?

Related

How to display shortcuts in Eclipse menu bar for a menuitem?

Using extension points I have created a new menu item in menubar. My requirement is to display the shortcut name along with the menu name. For example, in Help Menu I have added a menuitem as "Tutorial". But I want to display it along with the shortcut say Ctrl+Alt+T. Shortcut is working but need to display the same in the menubar.
How can I achieve this?
High level todo list. In your e4xmi file (model):
add a binding context (BC)
add a binding table (BT) for the Binding context
link your menuitem to a command
in the BT, add a Keybinding (eg M1 +T for Ctrl T), link it to the command
link the BC to your main window (add the BC to the list of Binding context in the Trimmed Window attributes ) (or the artefact where the menu bar is attached)
As the keybinding is linked to a command, everywhere you use the command (menu, toolbar etc.) the shortcut will be displayed

Emacs: How to enable toolbar mode and menubar mode only under a certain mode?

I use Emacs. However, I am not familiar with Lisp although I do know some functional programming, and hence I never really understood how to customize the init.el.
So basically, I want to be able to enable the toolbar mode and menubar mode only if I am in R-mode.
I know that to enable these mode simply requires:
(tool-bar-mode 1) and (menu-bar-mode 1)
but what if I want to do this locally, i.e. enable them only if I am in R-mode.
What should I put in the init.el ?
It's possible with this advice:
(defadvice select-window (after select-window-change-menubar activate)
(let ((yes-or-no
(if (memq major-mode '(r-mode lisp-interaction-mode))
1 -1)))
(menu-bar-mode yes-or-no)
(tool-bar-mode yes-or-no)))
I added two modes to the list for now, lisp-interaction-mode is the
mode of the *scratch* buffer, so that it's easy to test if the
advice works.
It's super-annoying, but kind of cool at the same time. I hope it's
what you want.
The features I describe here are close to what you are asking, but not an exact match. If your real need is to not have the tool bar around all the time when you don't need it, then they might help.
Library Tool-Bar+ provides two possibilities that limit when a tool bar is shown:
tool-bar-here-mode:
Enable the tool bar for specific frames only. Presences or absence of the tool bar is a frame thing, not a window or buffer/mode thing. When present, the actual contents of the tool bar (its icons) are specific to the selected window and its buffer. But whether or not the tool bar is shown has to do with the frame.
You enable showing the tool bar for the selected frame with command tool-bar-here-mode. You can add this to a mode hook, so that when a given mode is enabled so is the tool bar:
(add-hook 'info-mode (lambda () (tool-bar-here-mode 1)))
But that does not turn the mode off when the same frame no longer shows a buffer with that mode. In this regard it does not answer your question exactly.
tool-bar-popup-mode:
Hide the tool bar, and just put a Buttons entry in the menu-bar. When you click it the tool bar pops up for a single tool-bar action. So:
a. Click Buttons - the tool-bar pops up.
b. Click a tool-bar icon to effect its action - then the tool bar is hidden again.
For the toolbar, you can bind it to one of your mouse buttons or a key-sequence. For example, try this in your .emacs file:
(global-set-key [mouse-8] 'tool-bar-here-mode)
(tool-bar-pop-up-mode 1)
Depending on your mouse, you'll need to change 'mouse-8' to reflect the mouse button you wish to bind to. (Hint, click your desired mouse button while Emacs has the focus and you will see a message at the bottom like:
is undefined
Alternatively, you can bind to a key on your keyboard, like for instance:
(global-set-key (kbd "C-.") 'tool-bar-here-mode)
which will bind it to the CTRL-.

How do I remap GUI menu popup in emacs to cycle between items?

I've been trying to find the function that cycles between items whitout any success.
By default the bindings are: C-n, Down arrow for next item and C-p, Up arrow for previous item.
The GUI menu popup: menu-bar-open for example has arrows keys bindings, I would like to change them.

how to autoload the menu bar in emacs

I have installed YaSnippet in my emacs. Every time I start emacs, I have to turn on the menu bar manually by M-x menu-bar-mode, how do I load it by default ?
Also strangely the YaSnippet menu shows up the first time the menu bar comes up, however after I move to another buffer and back, I cant see the menu anymore ! How do I get it back without restarting emacs?
The menu bar is loaded by default in emacs. Therefore if you have to turn in on in every buffer it means that you have disabled it in your init file. Remove a line that would say something like (menu-bar-mode 0).
To start menu-bar-mode automatically, just put (menu-bar-mode 1) in your ~/.emacs
I'm afraid your yasnippet problem is outside of my realm of lore :(

Drop-down menu for Emacs

When I am using yasnippet for a keyword that has more than one choices it opens up a new buffer instead of dropdown menu. How do I configure emacs to display a dropdown menu? Please see this cedet example for what I mean.
put yas-dropdown-prompt (or yas-x-prompt, if you want graphical menu like on cedet screenshots) at the first position in yas-prompt-functions variable, like this:
(require 'dropdown-list) ;; this is a separate package, that needs to be installed
(setq yas-prompt-functions
'(yas-dropdown-prompt
yas-ido-prompt
yas-x-prompt
yas-completing-prompt
yas-no-prompt))