I have tried M-x org-toggle-limage-in-org, org-display-inline-images,iimage-mode. However, all these cannot display my images. See attached screen shot.
I have added the
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
in my init.el.
Maybe because Emacs needs something to show the images?
[
Thank you so much for your help!
Related
I am new to Emacs and presently I am using it heavily for LaTeXing.
Please help me out with the following customizations:
How to scroll continuously in doc-view-mode? I have
(setq doc-view-continuous t)
in my .emacs file. This enables scrolling through the pages, however, the pages "jump" to the next one. I do not like reading to the bottom of the screen. Is it possible to resolve it?
I invoke doc-view using C-c C-c and the PDF loads into a new window. Is it possible to load it in a new frame?
I have used
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
in my .emacs file. This works fine. However, the first line is just below the top screen. Can I create some margin ONLY on top?
How do I copy/paste from Emacs to other application, like a browser? I couldn't copy the code above using C-w in Emacs and then Ctrl-v in Iceweasel (browser). I had to use Kate, sadly. (This I realized while typing this question!)
Regards,
Saurav Agarwal
You should be able to scroll "line by line" with C-n and C-p.
I do not know that mode (I use tex-mode), but what you probably want is to find out how C-c C-c is invoking doc-view and use it with other-window, for example:
(defun new-frame-dvi-file ()
(interactive)
(split-window-right)
(other-window 1)
(tex-view))
I could not find anything that sets a top margin ONLY, but found this:
(set-frame-parameter nil 'internal-border-width 10)
You can share clipboards with this:
(setq x-select-enable-clipboard t)
Anyway, even if it sounds really boring, sometimes it is really useful to take a look at the manual. Sometimes you don't need to read it all and you can find the answer quickly ;-)
Hope it helps!
I am using Emacs 24, console (8 colors) with the Solarized theme.
I want to make the comments less intrusive using:
(set-face-foreground 'font-lock-comment-delimiter-face "black")
(set-face-foreground 'font-lock-comment-face "black")
That way the comments would be colored with the same color as the hl-line face we can see on the picture. However, when moving to a line containing comments, I would like them to be inverted (black background from the hl-line, normal foreground instead of black) so I can still read them.
As an alternative, you can also temporarily hide comments. See command hide/show-comments-toggle in library hide-comnt.el. Bind it to a handy key --- pretty simple.
Please see the code in the attached link: Emacs colors. why it is gray on current line? zenburn theme
How to automatically enable Zen Coding mode (zencoding-mode) everytime I open an HTML file in Emacs?
I don't actually use any of these, but something like this ought to do the trick:
(add-hook 'html-mode-hook (lambda () (zencoding-mode 1)))
[edited to promote phils's comment to the answer]
I'm trying to use emacs in fullscreen mode with a decent font. I have an nvidia-based laptop running Ubuntu. When it first loads, the font is huge think 16pt font. I used the menu options to set a decent font (8pt).
Now when I run emacs in fullscreen mode, it adjusts the window sort of for the huge font then loads my 8pt font. Now half of my screen is the minibuffer. How do I correctly set the font so that I can use fullscreen mode.
I have tried specifying displaysize in my x config and X does not start. I hear theres something else you need to do for nvidia drivers... but not sure how that works.
I use the following (from http://www.emacswiki.org/emacs/FullScreen) in my .emacs:
(defun toggle-fullscreen (&optional f)
(interactive)
(let ((current-value (frame-parameter nil 'fullscreen)))
(set-frame-parameter nil 'fullscreen
(if (equal 'fullboth current-value)
(if (boundp 'old-fullscreen) old-fullscreen nil)
(progn (setq old-fullscreen current-value)
'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)
;; Make new frames fullscreen by default. Note: this hook doesn't do
;; anything to the initial frame if it's in your .emacs, since that file is
;; read _after_ the initial frame is created.
(add-hook 'after-make-frame-functions 'toggle-fullscreen)
Then F11 will toggle fullscreen on/off.
This is tough since I can't replicate the problem on my machine. I just add -fs and it seems to work. If you just want more real estate... do these work for you:
ditch the menu/toolbar
add (menu-bar-mode 0) and (tool-bar-mode 0) to .emacs
start up and maximze
you should just have the regular DE frame but nothing else
toggle from emacs using M-x menu-bar-mode and M-x tool-bar-mode as needed
manually fullscreen emacs
I can just start emacs, right click the window bar and choose fullscreen from xfce
I have F11 set to do this, but it doesn't seem to work from emacs (emacs seems to try and interpret it as a key binding rather than passing the key to the DE)
if this works, perhaps find a binding in your DE that emacs doesn't care about and just maximize normally
combine the two
I start emacs regularly (/usr/bin/emacs)
I disabled both tool-bar-mode and menu-bar-mode disabled
I manually fullscreen with a right mouse click on the window bar
I get THIS
that's the entire screen, not just a shot of the window contents
What do you think of those ideas? Sorry I can't help more with Ubuntu and/or nvidia. No experience and tough if one can't replicate the problem! Maybe if emacs starts regularly for you the above can help achieve close (or fully) what you're hoping for.
I use emacs to edit a number of file types, and would like an easy visual queue to tell .c files from .vhd or .py files, for instance. How can I add a custom background color to the major mode for that language?
You can do this via hooks. Among other things you can hook is when a new major mode starts. Put something like this into your .emacs file, and emacs will set your background color to purple every time you go into Python mode.
(add-hook 'python-mode-hook
(lambda ()
(set-background-color "purple")))
Resetting the background color to the default in the case that you switch back to a mode that doesn't have an explicit set-background hook for it is left as an exercise for the reader.
You can also manually set the background color with M-x set-background-color
For posterity, as this thread is 4 years old, it is now possible in Emacs 24.4+ to change faces on a buffer local level. Simply define a face and use (face-remap-add-relative) to swap out whatever face you want with it.
Define a defface:
(defface my-special-face '((t :background "aqua")))
Then add a hook to the mode of your choice:
(add-hook 'python-mode-hook
(lambda ()
(face-remap-add-relative 'default 'my-special-face)))
You cannot set the background color on a buffer-by-buffer basis. See the SU question How can I change the background colour of a single emacs buffer?.
The first answer there shows how you can change the background for a single Emacs frame, which might work for you if you have one frame per file (or per mode).