Emacs tips and tricks
Forum rules
Share your brain ;)
Share your brain ;)
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
I was searching for a (non-org/non-schedule/non-deadline) way to simply insert (today's) date as quick as possible: https://www.emacswiki.org/emacs/InsertDate
There is another way which I haven't tried: https://www.emacswiki.org/emacs/InsertingTodaysDate
Another little thing - in TTY some neat things (for example scrolling through the org calendar) don't work. There are ways to circumvent certain limitations: http://orgmode.org/manual/TTY-keys.html
There is another way which I haven't tried: https://www.emacswiki.org/emacs/InsertingTodaysDate
Another little thing - in TTY some neat things (for example scrolling through the org calendar) don't work. There are ways to circumvent certain limitations: http://orgmode.org/manual/TTY-keys.html
..gnutella..
Re: Emacs tips and tricks
I know Emacs sucks horribly when it comes to Java development. Still use it for everything else at work, but yes, it's a shame.
However, Java - unless it's Java 8 - also sucks horribly. Lucky me support for Clojure in Emacs is brilliant through the awesome CIDER.
I recently got fascinated by Scala and found out about ENSIME: https://ensime.github.io/
Here my setup: https://github.com/manuel-uberti/.emacs ... ng.el#L345
However, Java - unless it's Java 8 - also sucks horribly. Lucky me support for Clojure in Emacs is brilliant through the awesome CIDER.
I recently got fascinated by Scala and found out about ENSIME: https://ensime.github.io/
Here my setup: https://github.com/manuel-uberti/.emacs ... ng.el#L345
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
Pretty Emacsers, a question for you:
in org-mode, there's the 'org-scheule and 'org-deadline command, that opens the neat little calendar and you can shift-cursor through the dates, right? now this does only work in the GUI version, not in emacs-nox, at least not in TTY, where I use Emacs most of the time. Do you know what commands make the shift-cursor move through the calendar? I knew that there's a hook that is called after setting a date, but that's useless for me. Right now, I have F11/F12 set in the init to change the timestamp (so the timestamp that has already been selected through the calendar buffer), but I would like to replace the shift-cursor keybindings with an alternative (C-n, C-p, or C-f, C-b). Any ideas? Thanks in advance!
in org-mode, there's the 'org-scheule and 'org-deadline command, that opens the neat little calendar and you can shift-cursor through the dates, right? now this does only work in the GUI version, not in emacs-nox, at least not in TTY, where I use Emacs most of the time. Do you know what commands make the shift-cursor move through the calendar? I knew that there's a hook that is called after setting a date, but that's useless for me. Right now, I have F11/F12 set in the init to change the timestamp (so the timestamp that has already been selected through the calendar buffer), but I would like to replace the shift-cursor keybindings with an alternative (C-n, C-p, or C-f, C-b). Any ideas? Thanks in advance!
..gnutella..
Re: Emacs tips and tricks
There is org-calendar-select-mouse, but I'm not sure this is what you're looking for.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
yeah cool, with gpm it does work in TTY. Thanks, it's definitely a good alternative
..gnutella..
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
Just a note to self...
To print the output of a command directly to the point (equivalent to :r !command), for example here the output of all UUID devices:
Record a keyboard macro
To print the output of a command directly to the point (equivalent to :r !command), for example here the output of all UUID devices:
Code: Select all
C-u M-! blkid -o export | grep -w "UUID"
Code: Select all
C-x (
...do your thing
C-x )
...execute the macro
C-x e
..gnutella..
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: Emacs tips and tricks
This is specific to spacemacs (actually spacemacs-base)
Since all-the-icons package popularity is rising, and every theme started using it, I'd like to share a way for you to use it on spacemacs. It's relatively easy, as i mentioned in https://github.com/domtronn/spaceline-a ... /issues/31.
1. First, create a new spacemacs layer (you can call it whatever you want, here i named it my-spaceline)
2. Create file packages.el inside the my-spaceline dir.
3. Put this:
Result:
Since all-the-icons package popularity is rising, and every theme started using it, I'd like to share a way for you to use it on spacemacs. It's relatively easy, as i mentioned in https://github.com/domtronn/spaceline-a ... /issues/31.
1. First, create a new spacemacs layer (you can call it whatever you want, here i named it my-spaceline)
2. Create file packages.el inside the my-spaceline dir.
3. Put this:
Code: Select all
(defconst my-spaceline-packages
'(all-the-icons
spaceline ;; optional -- if you use spacemacs (not spacemacs-base)
all-the-icons-dired
spaceline-all-the-icons))
(defun my-spaceline/init-all-the-icons ()
;; optional -- add all-the-icons into neotree
(use-package all-the-icons
:config (setq neo-theme 'icons)))
(defun my-spaceline/init-spaceline ()
(use-package spaceline))
(defun my-spaceline/init-all-the-icons-dired ()
;; optional -- add all-the-icons into dired
(use-package all-the-icons-dired)
:config (add-hook 'dired-mode-hook 'all-the-icons-dired-mode))
(defun my-spaceline/init-spaceline-all-the-icons ()
(use-package spaceline-all-the-icons
:after spaceline
:init (spaceline-all-the-icons-theme)
:config (progn
(spaceline-all-the-icons--setup-git-ahead)
(setq spaceline-all-the-icons-separator-type 'slant))))
rice no more.
-
- Distrowatcher
- Posts: 1
- Joined: Mon May 29, 2017 7:45 am
Re: Emacs tips and tricks
Actually I've never had any issues coding java in emacs. Unless you're doing android (in which case you basically have to use android studio), there's a really nice package called jdee. https://github.com/jdee-emacs/jdee. So far it has had everything I've needed for Java. :)GekkoP wrote: ↑Tue Nov 01, 2016 11:26 amI know Emacs sucks horribly when it comes to Java development. Still use it for everything else at work, but yes, it's a shame.
However, Java - unless it's Java 8 - also sucks horribly. Lucky me support for Clojure in Emacs is brilliant through the awesome CIDER.
I recently got fascinated by Scala and found out about ENSIME: https://ensime.github.io/
Here my setup: https://github.com/manuel-uberti/.emacs ... ng.el#L345
Re: Emacs tips and tricks
^ Tried that. It's wasn't a smooth experience like CIDER for Clojure or ENSIME for Scala. To be fair though, I probably didn't stick with it as much as the others.
I also tried eclim, but having Eclipse around just to code Java in Emacs didn't feel quite right to me.
I also tried eclim, but having Eclipse around just to code Java in Emacs didn't feel quite right to me.
Re: Emacs tips and tricks
https://github.com/emacscollective/borg
I am giving this a try. Not that there is anything wrong with my current Emacs configuration, but curiosity is an unbearable pain.
I am giving this a try. Not that there is anything wrong with my current Emacs configuration, but curiosity is an unbearable pain.
Re: Emacs tips and tricks
^ Eventually, can't be bothered to continue the experiment, sorry.
Meanwhile, an epub reader for Emacs appeared: https://github.com/wasamasa/nov.el
Meanwhile, an epub reader for Emacs appeared: https://github.com/wasamasa/nov.el
Re: Emacs tips and tricks
On the handy syntactic-close: https://manuel-uberti.github.io/emacs/2 ... tic-close/
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: Emacs tips and tricks
^ I use parinfer https://github.com/DogLooksGood/parinfer-mode for that, because I'm a lazy person. :)
rice no more.
Re: Emacs tips and tricks
^ Interesting, although Smartparens works with non-Lisps too.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
Any ideas how I can use Evernote to sync my org files? I actually only use two devices to access my *.org files, so Evernote fits the bill: it supports sync between 2 devices in the Free plan, and the upload limit per month is 60MB (we all know that *.org files are just kilobytes in size).
Of course the most logical way would be logging in to Evernote on their web interface, moving the *.org files into a folder, then log onto the second device, sync, and pull the *.org files to the second device. Meh. Not beautiful.
Gekko to the rescue?
(Why not dropbox? Yeah, works perfectly well in countries without THE GREAT FUCKING FIREWALL)
Of course the most logical way would be logging in to Evernote on their web interface, moving the *.org files into a folder, then log onto the second device, sync, and pull the *.org files to the second device. Meh. Not beautiful.
Gekko to the rescue?
(Why not dropbox? Yeah, works perfectly well in countries without THE GREAT FUCKING FIREWALL)
..gnutella..
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: Emacs tips and tricks
^ How about nextcloud / syncthing? does that work in the great firewall of churros?
I use orgzly and nextcloud on droid phones to sync it with my other devices.
I use orgzly and nextcloud on droid phones to sync it with my other devices.
rice no more.
Re: Emacs tips and tricks
^ orgzly and nextcloud seem like the most reasonable solutions.
I found these, but never tried them honestly:
- https://github.com/avendael/emacs-geeknote
- https://github.com/pymander/evernote-mode
I found these, but never tried them honestly:
- https://github.com/avendael/emacs-geeknote
- https://github.com/pymander/evernote-mode
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Emacs tips and tricks
^ thanks, that's what I found before, too.
^^ sometimes it does, sometimes it doesn't. I guess I have to find a CLI client for yun.baidu.com or so :D
Actually, what I love about Evernote is the web clipper and the capturing via camera. If it would just have an org-mode... :D
^^ sometimes it does, sometimes it doesn't. I guess I have to find a CLI client for yun.baidu.com or so :D
Actually, what I love about Evernote is the web clipper and the capturing via camera. If it would just have an org-mode... :D
..gnutella..
- franksinistra
- Ivana Fukalot
- Posts: 1093
- Joined: Mon Jan 27, 2014 2:03 am
- Location: 印尼国
Re: Emacs tips and tricks
Olivetti mode for distraction-free writing: https://github.com/rnkn/olivetti
I've had it hooked for org-mode and when i do typing games. :) For example:
I've had it hooked for org-mode and when i do typing games. :) For example:
rice no more.