Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
midnightclimax
Dec 3, 2011

by XyloJW
I've started dabbling around with org-mode, and I'd like to know if it's possible to resize images inline kinda like the timg tag does within this forum. So far I've found some post saying to put #+Attr.*: width="20px" (20px is just a random number, a relative value would be optimal) before my image like
#+Attr.*: width="20px"
file:~/pic.jpg
but nothing happens, it just shows up like before.

Adbot
ADBOT LOVES YOU

midnightclimax
Dec 3, 2011

by XyloJW

Hollow Talk posted:

Is this for html export? If so, try to put an attribute in front of the link:
code:
#+ATTR_HTML: :width 100px
[[./foo.bar]]
Width takes any of the common html/css units, so you can use px, pt, em or %.

edit: On second thought, this is about inline in the buffer, isn't it? Either way, it seems (perhaps unintuitively) that the ATTR_HTML thing works regardless. Here is what the variable description for org-image-actual-width has to say:


edit2: It seems however that inline images don't work with % or em or some such. You also don't have to use ATTR_HTML, but ATTR: :width 100 works as well. Another option would be to just set a default value for org-image-actual-width, use (setq org-image-actual-width '(100)) to make org-mode take into account whatever you set in a separate case-by-case #+ATTR, and otherwise just use that size.

None of these work (yes it's primarily about inline display in the buffer). I've installed ImageMagick via MacPorts to see if that's the culprit, but I get the same behaviour as before (using the stock mac os x emacs binary).

midnightclimax
Dec 3, 2011

by XyloJW

Hollow Talk posted:

The above work on openSUSE with Emacs 24.4.1 with ImageMagick support, but I have not tried this under OS X. My strong suspicion is that the standard Emacs build does not enable ImageMagick support at compile time, which is necessary as far as I know. Do MacPorts have their own version of Emacs, by chance? :saddowns:

Yeah, I suspect as much. I'll check Macports, but right now the feature is not essential, I thought it would be just neat to have.

midnightclimax
Dec 3, 2011

by XyloJW
Anyone using mu4e as the standard mail client? Worth checking out/not worth the hassle?

midnightclimax
Dec 3, 2011

by XyloJW

aerique posted:

I have used it at work in the past and really like it. Nimble and configurable. Definitely worth checking out.

Have been planning to set it up again when there's a slow Friday afternoon at work.

How does it compare to mutt? Similar scope of abilities or more basic?

midnightclimax
Dec 3, 2011

by XyloJW
If I put (toggle-scroll-bar -1) in my .emacs on my mac, emacs starts freaking out. Files not displayed properly, a second window bar pops up in the center of the buffer, etc.
Is that function obsolete, or is it just a bug? I'm usually in org-mode, so maybe that's related, dunno.

midnightclimax
Dec 3, 2011

by XyloJW

horse mans posted:

I'm not sure about the use of that function; I'd just customize the value of scroll-bar-mode (nil for no scroll bars).

Using that I get exactly the same display errors.

midnightclimax
Dec 3, 2011

by XyloJW

Hollow Talk posted:

It might also help to enable debugging via (setq debug-on-error t), just to see whether something obviously throws an error right that moment.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Error-Debugging.html

Hmm well that didn't show anything. Unless it outputs to some file I can't find.


horse mans posted:

Then I imagine it's not the scroll-bar which is the problem. Try removing things from your init.el to see if you can narrow it down, or try remove the scrollbar after emacs -Q to see what happens with no custom packages or elisp loaded.

Ok I'll try that later.

midnightclimax
Dec 3, 2011

by XyloJW
Ok, figured it out.
(if (window-system) (set-frame-size (selected-frame) 90 50))
caused the problem, since the 50 went over the dock, only it didn't show. It looked like it stopped before the dock. So I reduced it to 45, and voila, everything works. What a dumb bug.

midnightclimax
Dec 3, 2011

by XyloJW
If I have a vertical window split, file on the left, bookmark list on the right, is it possible to navigate through the bookmarks, but only open them in the left pane?

midnightclimax
Dec 3, 2011

by XyloJW
I'm currently playing around with Icicles, which makes me wonder, are there any libraries that you would consider essential?

midnightclimax
Dec 3, 2011

by XyloJW
Ok, checked out helm. Pretty cool, shelving icicles for now.

midnightclimax
Dec 3, 2011

by XyloJW
Talking about adding things to the OP, Planet Emacsen (http://planet.emacsen.org/) is pretty cool if you're just starting out, and want to see what other people are up to.

midnightclimax
Dec 3, 2011

by XyloJW
Eh, I just opened a file and realized I must have cut a large chunk without yanking it someplace else. Guess I need to use some kind of versioning control. I'm using Emacs mostly with org to write memos, journals, etc. Do I just use vc git?

e: Learned about the way emacs does backups, and customized my .emacs accordingly.

midnightclimax fucked around with this message at 12:18 on Feb 22, 2015

midnightclimax
Dec 3, 2011

by XyloJW
Does anyone know how I can change the way "bold" looks within org? I googled this a while ago, and all I got was a statement saying that emacs function is disabled in org. But still, there must be a definition that tells org how to display "bold"? Basically I want it to look like a highlight, maybe someone knows a solution.

midnightclimax
Dec 3, 2011

by XyloJW

Mr. Fish posted:

Emacs on Windows will start supporting running daemon in version 25.1, I am pretty excited about this:
http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS#n766

I would prefer not to use Windows but when I have to it is nice to have the same sort of workflow I do on Linux.


I just tried:

Lisp code:
(require 'org)
(add-to-list 'org-emphasis-alist '("*" highlight))
in my init and it worked. So try that.

Huh. Ok, well that wasn't hard.

midnightclimax
Dec 3, 2011

by XyloJW
Another question about org mode. I realize that I can link to stuff with the #+NAME: prefix. What I'd like to know now, is it possible to create custom link targets like #+FLOWER: or #+TREES:?

midnightclimax
Dec 3, 2011

by XyloJW

pgroce posted:

I'm not sure what you're asking here. #+$X>:$Y is org-mode's keyword format. #+NAME is one keyword, specifying labeled positions in the document (which can be used as link targets). You can specify new ones like #+FLOWER and it won't break org, but you'd have to define the semantics of #+FLOWER yourself, likely with a fair amount of code. (I've never looked into it that much.)

Could you share a use case?

Well the idea is to designate the type of link (in this case flowers or tree) without the need to additionally add a tag. It would remove one step (adding a tag), and show you immediately the type of category the link target is about. The alternative would probably be to create a sub-headline for each entry. I don't know, I thought it's not that hard to create and imho would make parsing files easier.

midnightclimax
Dec 3, 2011

by XyloJW

very cool, thanks

midnightclimax
Dec 3, 2011

by XyloJW
Is there any way to use 'ace-jump to line' when visual word wrap is enabled? I did a bit of googling, and couldn't really find anything. But maybe there's another package, that allows me to do this.

(basically treat a wrapped line as separate lines, hope I didn't break someone's brain)
(not April Fool's)

midnightclimax
Dec 3, 2011

by XyloJW
Is it possible to define which frames in a desktop session are at the bottom, and which ones are at the top? Right now it seems that the top-most frame to open, is the one that was created last. Any way to change that? (to be more clear: I have frames a,b,c; and I would like a to be on top of b, c being the one at the bottom.

midnightclimax
Dec 3, 2011

by XyloJW

Deus Rex posted:

What do you mean by on top and bottom? Like, spatially, on the screen (in the Y or Z dimension)? In some queue?

Yeah, spatially on the z axis. Right now if you create a second frame and save the desktop, the second one will be in front (z-axis) of the first one (when you reload the desktop). It's just something I thought about after using a wm/Linux desktop with transparency settings.

midnightclimax fucked around with this message at 18:00 on Apr 30, 2015

midnightclimax
Dec 3, 2011

by XyloJW
I've copied my .emacs.d to a new machine, but the startup is considerably slower. Is it necessary to start with a fresh .emacs.d anyway? Maybe that's a rookie mistake.

midnightclimax
Dec 3, 2011

by XyloJW
Is there any way to desktop-save follow-mode for a specific frame? I just re-enable it after startup, but there's probably a smarter way to do it.

e: nm just putting it in .emacs does the trick. (I probably was worried it would be global or whatever)

midnightclimax fucked around with this message at 12:37 on May 30, 2015

midnightclimax
Dec 3, 2011

by XyloJW
Anyone using cider? I'm trying to set it up, but get loads of errors. I'm not sure all of that is related to the warning to use lein repl 2.7, since I can't see that stuff in other's peoples complaints about that requirement.

This is what I get when I start it up with cider-inject and hit Enter

midnightclimax
Dec 3, 2011

by XyloJW

Dessert Rose posted:

Kind of looks like you pasted the error message into the REPL input.

Does it work fine after that?

Yeah that's what I figured. Thing is, when I try to C-x C-e (cider-eval-last-expression) a line in my code, I don't get output in cider/the repl, but just error messages in the mini (?) buffer (the line at the bottom). Can't recall the exact error wording now, I'll edit that in later.

midnightclimax
Dec 3, 2011

by XyloJW
Ok, the culprit was wrong information in profiles.clj. Basically I followed a step-by-step tutorial, and it apparently hasn't been updated*. Seems to work now, although I'm not a fan of cider changing focus and content of a frame, every time I eval something buggy.


* looking at you, braveclojure.com

midnightclimax
Dec 3, 2011

by XyloJW
Anyone been messing around with EXWM? Sounds crazy. Basically emacs is now a tiling window manager, and every window becomes a buffer.

https://github.com/ch11ng/exwm/wiki

midnightclimax
Dec 3, 2011

by XyloJW
I don't know why my deft files don't get included with my org-agenda search. Here's my setup:

code:
(setq org-directory "G:\\_DOC\\") 
(setq org-agenda-files (list "G:\\_DOC\\" "G:\\_DOC\\.deft\\"))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'")

(when (require 'deft nil 'noerror) 
   (setq
      deft-extension "org"
      deft-directory "G:\\_DOC\\.deft\\"
      deft-text-mode 'org-mode)
   (global-set-key (kbd "<f9>") 'deft))
(require 'deft)
Maybe because the deft config comes after the agenda-files declaration?

midnightclimax
Dec 3, 2011

by XyloJW
Hmm I replaced my text with yours, and I get something like

Lisp code:
(wrong-type-argument stringp ("G:\\_DOC\\" "G:\\_DOC\\.deft\\"))
when trying to agenda search for keywords. I'm already using use-package to call org.

midnightclimax fucked around with this message at 14:12 on Sep 28, 2015

Adbot
ADBOT LOVES YOU

midnightclimax
Dec 3, 2011

by XyloJW

pgroce posted:

Oops, sorry for being late to this, and sorry for not testing my code. Instead of (add-to-list 'org-agenda-files ...), try this:

Lisp code:
(mapc (lambda (i) (add-to-list 'org-agenda-files i)) '("G:\\_DOC\\" "G:\\_DOC\\.deft\\"))

I'll test this once I figure out why deft stopped working, guh

  • Locked thread