I want to practice drawing pictures in DrRacket. I have read online:
first, I copy #lang slideshow in the definition area
then I click RUN
then It should be okay with pictures.
But my result is: after clicking RUN, I get: read-syntax: #lang not enabled
I don't know how to fix this. I use advanced student language.
In the lower, left corner of DrRacket you will need to switch to
"Determine language from source".
The slideshow language is not a teaching language,
so that explains, why you can't run it with your
current language setting.
I'd like to implement a function to show a file I want in a specific window and I also would like to change the file to an another one in that window in case I want to. But I couldn't find any appropriate API.
Could you give me some advices to write this sort of functions, please?
I can get an window id from (split-window-xxx) but I can't imagine what elisp API can have it displayed the file I want to.
Please give me some advice.
You can try
(with-selected-window window
(find-file f))
or if you want to load a buffer
(with-selected-window window
(switch-to-buffer buf))
The lower-level control you might be looking for are find-file-noselect which opens a file and returns the buffer without displaying it, and set-window-buffer which lets you change the buffer displayed by a particular window.
I have problem with drag-n-drop from outside to gnu emacs.
To investigate the cause,
I wrote and executed these code:
(defun dnd-handler (event &optional new-frame)
(interactive "e")
(message "Got dnd signal"))
(global-set-key [drag-n-drop] 'dnd-handler)
No message appeared, when I dragged a file from desktop to emacs.
Emacs documentation states:
(drag-n-drop position files)
This kind of event is generated when a
group of files is selected in an application outside of Emacs, and
then dragged and dropped onto an Emacs frame. The element position is
a list describing the position of the event, in the same format as
used in a mouse-click event (see Click Events), and files is the list
of file names that were dragged and dropped. The usual way to handle
this event is by visiting these files.
This kind of event is generated, at present, only on some kinds of systems.
Does it mean my system is not supported?
My system consists of
GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
of 2013-03-18 on MARVIN
Window 7 Enterprise 64Bit.
Any advice is welcome. Thanks.
Make sure you're not running Emacs with elevated security, as this can block drag and drop operations from other processes not on the same level.
If you're launching Emacs from a shortcut (.lnk file), right click on it, Properties, Advanced, turn off Run as Administrator.
The same thing can happen if you launch Emacs from a console with elevated security.
The emacs tabbar.el package adds (buffer)tabs to each window and comes standard with aquamacs and can be added to emacs23 with the emacs-goodies-el package.
Are any of you hardcore emacs users actually using tabbar? I'm sort of used to having tabs, but I would like to know if working without them could be more productive, and if there are other ways besides checking your bufferlist (C-x C-b) to get an overview of your current project files.
As a side note, I really like textmate's project drawer (and tabs), but anything similar in emacs looks just plain hideous.
I've tried using it, but I felt it constraint my workflow rather than improve it. There are a lot of excellent Emacs modes to help with the organization of many buffers and I simply don't feel mapping buffers to tabs is one of those ways.
Just think about the most basic scenario - a lot of tabs. How different programs deal with it - limit the maximum tabs(IntelliJ IDEA); enable tabs bar scrolling(Firefox); infinitely reducing the tabs size(Google Chrome); creating rows of tabs(IntelliJ IDEA)... None of this solutions is that great and by not having tabs in Emacs we have one less problem to worry about. At least this is my subjective opinion - others will most certainly disagree... I personally need nothing more than ido and and iswitchb.
A video of ido in action: http://www.youtube.com/watch?v=lsgPNVIMkIE
Ya, I use tabbar, along with sr-speedbar.
I customize tabbar to show files in specific groups, and mod some keybindings to make navigating the files easier.
FWIW, here's the relevant section from my ~/.emacs:
(require 'tabbar)
; turn on the tabbar
(tabbar-mode t)
; define all tabs to be one of 3 possible groups: “Emacs Buffer”, “Dired”,
;“User Buffer”.
(defun tabbar-buffer-groups ()
"Return the list of group names the current buffer belongs to.
This function is a custom function for tabbar-mode's tabbar-buffer-groups.
This function group all buffers into 3 groups:
Those Dired, those user buffer, and those emacs buffer.
Emacs buffer are those starting with “*”."
(list
(cond
((string-equal "*" (substring (buffer-name) 0 1))
"Emacs Buffer"
)
((eq major-mode 'dired-mode)
"Dired"
)
(t
"User Buffer"
)
)))
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
(global-set-key [M-s-left] 'tabbar-backward)
(global-set-key [M-s-right] 'tabbar-forward)
There's lot's of other tips on emacswiki:
http://www.emacswiki.org/emacs/TabBarMode
no.
I use iswitch-b
C-x b "first few letters of buffer", then C-s to rotate to the specific file I want takes me under 2 seconds without me having to move hand to mouse.
No. I could possibly be convinced to try it again with the right customisation, but by default it's pretty useless for me, as I habitually have in excess of 100 buffers open. ibuffer with its filtering and grouping is the best way for managing large numbers of buffers that I've tried.
I like to use speedbar for quick buffer navigation. I have in my .emacs
(speedbar-change-initial-expansion-list "buffers")
(global-set-key [f8] 'speedbar-get-focus)
so when I hit F8, a new frame pops up with a list of open buffers, there you can move point over the buffer you want to select and to activate it. One more F8 goes back to the main frame.
tabs are not reserved for mouse users. look at vim possible workflow: gt to go next tab, or gT to go previous. Say you've one dedicated window for vim: you might easily switch from one buffer to another. Yes, tabs are probably for users with few buffers. if you have hundreds, this won't work.
Quite frankly, you'll find better editors than emacs when speaking of tabs, menus and toolbar. Emacs clearly encourages you to use your keyboard and leave your mouse asleep.
Tabbar or any other tab management tool will have difficulties when you'll have lots of buffers opened. You also don't want to show all your buffers in tabs. Having to remove your hand from the keyboard to grasp the mouse and click on a tab and then remove your hand from the mouse and put it onto the keyboard is clearly a waste of time when a simple keystroke could be used instead.
The best thing you could do to your emacs and to you is to have the following configuration in your .emacs :
(menu-bar-mode -1) ;hide menu-bar
(scroll-bar-mode -1) ;hide scroll-bar
(tool-bar-mode -1) ;hide tool-bar
That will force you to forget the old way of doing things using a mouse (like using tabbar, or menus...), and to use your fingers instead.
Up until now, I haven't tried it, but before I switched back to GNU Emacs from XEmacs, I used the XEmacs tabs very heavily. I found that when I had many source files open, it was one of the fastest ways to jump to the correct file.
Now that I know about tabbar, I am trying it; and so far, I like it.
John
Tabs are really only useful if you use the mouse, and one of the main benefits (to me) of Emacs is that I can avoid the mouse.
So, no, tabbar isn't useful in general.
I did find the tabs useful when I was browsing web pages (using w3m), but I was using the mouse in that case...
Tabbar looks like it is godforsaken
So what about elscreen?
Can be found via http://melpa.milkbox.net/#/elscreen - or installed emacs-elpa (or melpa).
Elscreen is very useful for me.
C-x b<RET> always gives you the last edited buffer. And what do you do with tabs ? Mostly switch back & forth between two files. There you go.
How can I get a tabbed interface in carbon emacs which corresponds to one-tab-per-buffer similar to Aquaemacs(http://aquamacs.org/)?
In fact you can take tabbar.el from Aquaemacs. It is not guaranteed to work with any other emacs variant but I'm lucky for Windows and Mac (Carbon and Cocoa). So it should work for you too.
You can read more at EmacsWiki .
My configuration is simply:
(require 'tabbar)
(tabbar-mode 1)
Additionally I've got some colors modifications. Please read EmacsWiki for more details. (search for tabbar)