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
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
I've been watching random emacs / vim usage videos on youtube and I've had a bunch of "oh, whoa, that mode is awesome" moments. I don't tend to think of youtube for these kinds of things, so just a heads up to anyone else out there.

Adbot
ADBOT LOVES YOU

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





yeah I was curious about elisp, and found a video of someone using it to write tic-tac-toe. pretty cool.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
https://www.youtube.com/watch?v=jNa3axo40qM
:eyepop: 1:55

tazjin
Jul 24, 2015


mike12345 posted:

Anyone know if it's possible to create a custom start-up view for org? I know about overview and content, but ideally I'd like to define a view that only shows e.g. the first two headline levels, while leaving everything else folded.

If you can write an Elisp function that does that you could add it to the startup hooks for org-mode, that's generally the way to set startup settings for modes that aren't part of the config.

edit: look at me replying to posts from old tabs

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you
I just discovered Conkeror and I can feel myself falling ever deeper down the rabbit hole of emacs. It's like Firefox but Emacs.

bigperm
Jul 10, 2001
some obscure reference
I recently watched some youtube videos about emacs and became enamored with org mode and am trying to figure it all out now and there are a few hurdles I can't seem to overcome.

First, I am on windows 7 and emacs uses %appdata% for the .emacs file and... home directory. This is driving me crazy because I think there is a disconnect between what windows considers 'user space' and what emacs wants is totally different and I can't seem to wrap my head around what I need to do. I know I can change where the home directory is - but where should it be and what needs to be there? Does the actual emacs program (/bin and all that) need to be there too?

I (think) I installed a minor mode (darkroom) and yet M-x darkroom-mode gives me a 'not found' error. I can't get flyspell to work either.

Basically, I need to know where to put stuff so I can find it. Should I just make a c:\emac\ and put everything there? Or in dropbox (where I want to actually write/save the files I want to work on?)

neonnoodle
Mar 20, 2008

by exmarx
What I did was add my Dropbox emacs folder to the list of home directories. I have my config in there which is tangled elisp and orgmode in a structured document. It uses use-package to keep the plugins synced between my home and work machines. If you want I will pastebin my .emacs file so you can see how that works.

On each PC (Win10/Linux at home, Win7 at work) I have emacs in the default path. I start it up, it assembles itself and loads all the necessary stuff. :feelsgood:

bigperm
Jul 10, 2001
some obscure reference
Please pastebin your .emacs but be forewarned I am going to have questions because not all of that made sense to me. I will try my best to work it out first though.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

bigperm posted:

First, I am on windows 7 and emacs uses %appdata% for the .emacs file and... home directory. This is driving me crazy because I think there is a disconnect between what windows considers 'user space' and what emacs wants is totally different and I can't seem to wrap my head around what I need to do.

Set your HOME env var: https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows-HOME.html

neonnoodle
Mar 20, 2008

by exmarx

bigperm posted:

Please pastebin your .emacs but be forewarned I am going to have questions because not all of that made sense to me. I will try my best to work it out first though.

No problem. I'm a relative beginner myself, and the settings file is commented but I'll answer questions where/whenever possible after posting.

Stick Insect
Oct 24, 2010

My enemies are many.

My equals are none.
25.1 came out this weekend. Big changelog: https://www.masteringemacs.org/article/whats-new-in-emacs-25-1

There is a lot, and I have no idea what most of it does, but this one stood out:

quote:

You can now browse web pages with webkit inside Emacs. The feature – having played with it a lot – is in the very early stages still. I would consider it alpha quality, but with it integrated into Emacs progress is likely to be swift.

Xik
Mar 10, 2011

Dinosaur Gum
Cool for the dozen folks that use emacs as their WM.

(Comment mostly in jest. Sort of hopeful this can be used to render HTML emails in the future...)

neonnoodle
Mar 20, 2008

by exmarx

changelog posted:

code:
New input methods: 'tamil-dvorak'
:stare:

neonnoodle
Mar 20, 2008

by exmarx

bigperm posted:

Please pastebin your .emacs but be forewarned I am going to have questions because not all of that made sense to me. I will try my best to work it out first though.

https://github.com/neonnoodle/emacs_crap

So there are 2 files in there. The init.el lives in the Appdata folder but it has very little in it -- all it does is point Emacs to the REAL setup file which lives in Dropbox. That file is settings.org. When Emacs gets a hold of that file, it executes the elisp inside it. The extra org formatting stuff is essentially just elaborate code commenting and outlining to make it easier to browse through and move stuff around. It's also easy to enable/disable aspects of the setup by removing the org-babel markup from around the elisp.

pgroce
Oct 24, 2002
FWIW, you can also tell org not to put a given code block in the output lisp file. I think the magic is "tangle: no" or something. (Sorry, phone posting.)

bigperm
Jul 10, 2001
some obscure reference
I think I'm giving up on emacs.

I installed the darkroom extension from within emacs... it says it's installed but when I do M-x darkroom-mode I get 'not found'.

Then added the stuff for MELPA to my .emacs and when I M-x packages-list-packages I just get 'failed to download melpa'.

Am I missing something fundamental or am I just not smart enough to do this? I assume it's both.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Post your .emacs and we can take a look. If I had to guess, you hosed up the syntax somewhere and your .emacs isn't being executed.

bigperm
Jul 10, 2001
some obscure reference
It's literally the default .emacs with the MELPA stuff pasted in.

code:
;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)


(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" "#8cc4ff" "#eeeeec"])
 '(custom-enabled-themes (quote (wheatgrass)))
 '(package-selected-packages (quote (darkroom))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Try http://melpa.org/packages/ instead of https. See this bug.

There are surely better ways than not using HTTPS, but since you probably don't want to debug SSL issues right now, using HTTP should be simpler.

e: Updated link to a more-relevant bug report.

Avenging Dentist fucked around with this message at 02:17 on Sep 22, 2016

bigperm
Jul 10, 2001
some obscure reference
Ok, thanks. That worked. I installed olivetti-mode, which was a must have for me and it actually works. Amazing. Darkroom-mode still doesn't work but I think I can work around that.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
After reading the bug report some more, it seems like this might be resolved in emacs 25 on Windows, so if you're on 24, you could try upgrading if you want to use the HTTPS link for MELPA.

I don't use darkroom-mode, so I can't help you much there.

bigperm
Jul 10, 2001
some obscure reference
I'm on 25.1 :(

neonnoodle
Mar 20, 2008

by exmarx
I just set up company mode for prose editing. Dear God, I wish I had had emacs when I was an audio transcriptionist. :stare:

If I ever do transcription again, it's gonna be 100% emacs. I used to use LibreOffice Writer because it supports word auto completion, but it's so awful in so many other ways. Emacs, ispell, company, markdown, pandoc. Boom, done.

Beef
Jul 26, 2004
M-/ simple word completion based on all the open buffers is such a simple but stupidly useful feature, I do not understand why few other editors have it.

comedyblissoption
Mar 15, 2006

other editors typically want to give you rsi by making basic text navigation and editing require constantly moving your hands to another part of the keyboard or your mouse so it's no surprise

bigperm
Jul 10, 2001
some obscure reference
Thanks Neonnoodle again for posting your setup. I mostly got it working the way I want now. I have a few keys to bind yet but I figure that will be an ongoing thing anyway.

I think I almost have the TLS thing figured out too... I am using the 64bit version of 25.1 on Windows and it needs DLLs to do all that. The ones I tried (I just found out) were the 32bit versions and they of course don't work. If I can get that running then I will have the same emacs set up on my laptop (xubuntu) and my Win 7 desktop.

I also found that setting scroll-margin to a non nil (I used 20) keeps you from writing at the bottom of the screen all the time. Very useful if like me you despise that.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





When I left click a link in org that points to a headline (in the same document), it jumps to that headline, but also visually selects everything in-between (because evil, is my guess).

How do I change that behaviour, so it just jumps without selecting?

Weekend Bridges
Apr 8, 2015

by Smythe
as someone who does everything in emacs, i have no idea how i went so long without turning on sticky keys. it's so good

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
is there a secret to using any of the built in terminals effectively? it's the only thing preventing me from moving to gui emacs, but it just cant offer me a terminal experience close to having a tmux split with emacs. unfortunately, the experience of using the built ins really sucks, and I almost feel like I'm missing something because they don't even get close to feeling productive for me.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





Anyone had a chance to look at the new org? I looked at the feature list, and half the updates were for things I didn't know existed in the first place. It's such a bottomless well of a user experience.

pgroce
Oct 24, 2002

MALE SHOEGAZE posted:

is there a secret to using any of the built in terminals effectively? it's the only thing preventing me from moving to gui emacs, but it just cant offer me a terminal experience close to having a tmux split with emacs. unfortunately, the experience of using the built ins really sucks, and I almost feel like I'm missing something because they don't even get close to feeling productive for me.

Just to be clear: Are you using "terminal" the way the Emacs documentation does (to refer to various windowing environments Emacs runs in, like Windows or "NextStep"/Mac)? Or are you talking about terminal emulation in an Emacs instance? I'll assume you're talking about the first thing.

I'm phone posting right now, but I use GUI Emacs and prefer it to emacs in a console window. There's one single hook where all terminal customization is supposed to go, and you're supposed to figure out what you need from some combination of OS and window-system-specific variables, which is a giant pain in the rear end. I wrote some code to run window-system-specific hooks instead that I'll post when I get back to my computer.

Once you've figured that out, each window system has its own special-snowflake functions to customize the windows. This isn't as bad as you might think, because the window systems themselves (GTK? Windows? Mac?) are pretty different, so you probably don't want complete abstraction over them anyway. Some functions, though, are abstract, though, and...eh, it's a mess.

Like I said, I'll post some of the Elisp I've written to deal with it, and let you decide if you want to give a poo poo.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

pgroce posted:

Just to be clear: Are you using "terminal" the way the Emacs documentation does (to refer to various windowing environments Emacs runs in, like Windows or "NextStep"/Mac)? Or are you talking about terminal emulation in an Emacs instance? I'll assume you're talking about the first thing.

I'm phone posting right now, but I use GUI Emacs and prefer it to emacs in a console window. There's one single hook where all terminal customization is supposed to go, and you're supposed to figure out what you need from some combination of OS and window-system-specific variables, which is a giant pain in the rear end. I wrote some code to run window-system-specific hooks instead that I'll post when I get back to my computer.

Once you've figured that out, each window system has its own special-snowflake functions to customize the windows. This isn't as bad as you might think, because the window systems themselves (GTK? Windows? Mac?) are pretty different, so you probably don't want complete abstraction over them anyway. Some functions, though, are abstract, though, and...eh, it's a mess.

Like I said, I'll post some of the Elisp I've written to deal with it, and let you decide if you want to give a poo poo.

Sorry for being really unclear:

I ran emacs within a tmux pane inside of gnome-terminal. This allowed me to jump between emacs another tmux split, giving me a very nice terminal just one keystroke away from emacs.

I'd like to switch to the GUI version, running within a windowing environment, because as you've pointed out, it generally works better. But I really dislike the terminal emulators built into emacs.

Anyhow, all of this was meant to support an absolutely insane workflow that I'd slowly built myself into, so I've done the sane thing and removed all the bizarre constraints from my environment and now I don't have a problem.

Stick Insect
Oct 24, 2010

My enemies are many.

My equals are none.
Alt-tab?

Dunno what OS you're on, you could try one of those terminals that come to the foreground with the same hotkey every time, like

http://guake-project.org/
https://yakuake.kde.org/
http://tilda.sourceforge.net/tildaabout.php

MALE SHOEGAZE posted:

absolutely insane workflow that I'd slowly built myself into

Isn't that why we're using Emacs? :v:

Crank it up a notch and make an emacs window behave like guake: https://cosmosimple.blogspot.nl/2011/12/use-emacs-as-widget.html :spergin:

Nude
Nov 16, 2014

I have no idea what I'm doing.
So new to emacs here, but I really like the idea that it pitches. I'm kind of curious if emacs could support this pipe-dream I've had. Which is a workspace that acts like a "library" or "database". By that I mean I have a collection of books/images that I use for reference, for example an anatomy book, or an image that focuses on lips, and I been searching for a program that would support this. The essential feature I need is to be able to grab a group of items based on some key term, and be able to log info about the book/image.

So I've stumble across org-mode that seems to support all of this, and more. I suppose my question is should I be using emacs for this kind of thing? The only reason why I'm doubting org-mode is because I need way more then 26 tags, (or perhaps I'm using org mode wrong) because ideally would wanna search for stuff like "Book" + "Anatomy", or "3/4" + "Head", "Building" + "Sky" + "People", "Landscape" + "Painting", etc. So I end up tagging one image like so:

* Random City Photo :Building:People:City:Sunset:Orange:Ocean:Store:

Which kind of looks ugly. But maybe I just need to customize this file in a certain way to hide tags or something. Also I would just like to hear some first hand experience on emacs file browser support, do you guys like using it, can it replace Apple's in terms of speed/searching? Just need a little push I guess to continue on this journey haha. Not trying to request a tutorial/how to do this in emacs more just asking your opinion if emacs seems like the ideal workspace for this stuff.

Nude fucked around with this message at 07:22 on Nov 16, 2016

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





https://github.com/vkazanov/toy-orgfuse

quote:

Orgfuse is a small Python utility allowing to mount org-mode files as FUSE filesystems.

Long story short: the outline tree becomes a tree of directories, text sections become files within the directory tree, etc.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."





Nude posted:

So new to emacs here, but I really like the idea that it pitches. I'm kind of curious if emacs could support this pipe-dream I've had. Which is a workspace that acts like a "library" or "database". By that I mean I have a collection of books/images that I use for reference, for example an anatomy book, or an image that focuses on lips, and I been searching for a program that would support this. The essential feature I need is to be able to grab a group of items based on some key term, and be able to log info about the book/image.

So I've stumble across org-mode that seems to support all of this, and more. I suppose my question is should I be using emacs for this kind of thing? The only reason why I'm doubting org-mode is because I need way more then 26 tags, (or perhaps I'm using org mode wrong) because ideally would wanna search for stuff like "Book" + "Anatomy", or "3/4" + "Head", "Building" + "Sky" + "People", "Landscape" + "Painting", etc. So I end up tagging one image like so:

* Random City Photo :Building:People:City:Sunset:Orange:Ocean:Store:

Which kind of looks ugly. But maybe I just need to customize this file in a certain way to hide tags or something. Also I would just like to hear some first hand experience on emacs file browser support, do you guys like using it, can it replace Apple's in terms of speed/searching? Just need a little push I guess to continue on this journey haha. Not trying to request a tutorial/how to do this in emacs more just asking your opinion if emacs seems like the ideal workspace for this stuff.

look into creating custom properties? http://orgmode.org/manual/Property-syntax.html#Property-syntax

also re: emacs file browser - there are a couple of addons that turn dired into midnight commander or ranger, but I'm not really happy with them and usually try to avoid using it. I usually just use helm-swoop or silver searcher for helm to swipe files for strings.

Nude
Nov 16, 2014

I have no idea what I'm doing.

mike12345 posted:

look into creating custom properties? http://orgmode.org/manual/Property-syntax.html#Property-syntax

also re: emacs file browser - there are a couple of addons that turn dired into midnight commander or ranger, but I'm not really happy with them and usually try to avoid using it. I usually just use helm-swoop or silver searcher for helm to swipe files for strings.

Hey thanks for the help, I just installed smex too. Even with properties I'm still debating whether emacs is what I want but I'm probably still going to use it for a bunch of other stuff (coding especially and org mode tables are awesome!).

I'm also delighted that some of the cursor hotkeys are built into the mac too, C-a, C-e, C-k, and the directional C-p/n/b/f, along with C-option-b/f for each word. Jaw dropped when I accidentally used them in various text applications/browser.

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you
I remember reading once that Jobs was an Emacs person, that's probably why

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Love Stole the Day posted:

I remember reading once that Jobs was an Emacs person, that's probably why

SJ was a GUI person, the emacs functionality is there because NeXT folks were largely emacs people.

Also back then vi wasn't fetishized the same way it is today, people used it because it was ubiquitous and small and fast, not because they thought modal editing was somehow more efficient for their use. Remember, eight megs and constantly swapping was a meaningful criticism of emacs once upon a time.

eschaton fucked around with this message at 11:42 on Dec 12, 2016

Adbot
ADBOT LOVES YOU

Neon Noodle
Nov 11, 2016

there's nothing wrong here in montana
Well they got rid of the Escape key on the new Macbook so gently caress vi, obviously.

  • Locked thread