I can only see commands to delete a tasks attachments in org-mode after calling the dispatcher with C-c C-a. Is there a way to simply unattach these files (or directory) from the project or task? Thanks in advance.
org-mode's ways of attaching things is putting them in a folder
associated with the heading.
To my knowledge, there's no way to do what you ask with this system:
a file either is in a folder or it isn't.
On the other hand, you could open the attachment directory
with C-c C-a f and move this file where ever you want.
To org-mode's knowledge, it will be deleted.
Related
I'm looking for a way to open a file in a zipped file as Vim can do it with its default configuration.
Dired just shows the list of zipped files but cannot open it while vim can do.
Do you know how to make it work as Vim does? then could I get your tip, please?
It turned out that my Evil mode overrides that key-bindings which was 'archive-extract'. Well if you know how to recover this to that macro, please let me know.
I've tried with my shallow elisp knowledge but failed. Please.
I want to keep my .emacs in my Dropbox folder, to sync it between work and home.
I moved my .emacs to my dropbox folder and then (hard) linked it like:
ln ~/Dropbox/.emacs ~/.emacs
Then if I open ~/.emacs in emacs, edit and save it, it deletes the .emacs hard link and overwrites it with a fresh .emacs so the linkage is gone. I have two seperate copies, a newer ~/.emacs and an out-of-date ~/Dropbox/.emacs.
I could edit the ~/Dropbox/.emacs file instead, but sometimes emacs write something into the .emacs by itself (say customizing variables) and the issue occurs again.
How can I get emacs to not overwrite that particular file? Or is there a way to launch emacs and tell it where to read the .emacs from?
[edit SOLVED]
Some guy posted a comment about using soft-symlinks instead of hard-links. This actually works for me and solved the issue. But then the guy who posted the comment deleted it again for some reason. ~thank you who ever it was~
I would heartily recommend that you place your emacs configuration files into a GIT repository.
I have a github repository for all of my elisp file, which enables me to share the files with any computer and track changes.
I used softlinks instead, which solved the issue.
An alternative suggestion (which I use): Let ~/.emacs (or ~/.emacs.d/init.el) be different for each computer you use. Use that file to set up system-dependent paths— the location of your Dropbox directory, the path to diff, the colors that work best on that monitor, whatever. Then load (require) a common file that contains all of your usual (system-independent) configuration. Call it "leo-init" or something.
And I heartily agree with the prior suggestion to put your emacs config into a git repository (or other vcs). It's fantastic peace of mind to know that if you screw something up, you can go back to the way it was— or examine in detail what exactly you changed and when.
Im fairly new to Emacs (I'm using emacs now since 1 month) and migrated from vim. One "feature" of vim I really miss in Emacs, is the persistent history.
When I am starting vim I can easily open files I recently had open via the command history. But in Emacs when im in dired (or executing commands via M-x) and then pressing M-p I can only browse through the sessions history, and cannot open i.e. files I had opened in a previous session. So, now my question: Is it possible to store the Emacs-history persistent on my system, that when I re-open Emacs I can access my complete history?
(Btw. my Emacs Version is 24.3.1)
Thanks in regards,
Niklas
You can put (savehist-mode 1) in your .emacs to save your minibuffer history over several sessions. (You will need to restart for this to work)
For M-x specifically, look at the SMex package. It enhances M-x with a history, flex matching, better ordering, etc.
I created a TAGS file for emacs in my django project using the following command on my Linux machine
ctags -eR *
I can now jump to a symbol definition using M-. and specifying the symbol name.In my project i have py,html and css files so is there also a way i can make emacs automatically open a file, if i specify the file name ?.
Thank You
I think you are looking for project management. There are few packages to manage project directory in emacs. The best one may be ede. but Its not easy to setup. It does have some learning curve and its limitations.
Thankfully there are many easy ones. like eproject. https://github.com/jrockway/eproject/wiki
anyway you can also check out emacswiki page for more details. http://www.emacswiki.org/ProjectSettings
http://www.emacswiki.org/emacs/find-file-in-tags.el
IDO (Interactive Do) mode does this. If you activate it, C-x C-f searches for files matching what you are typing, interactively. Beware though, it may take some time to get used to it.
[edit] The search is based on files or directories you've recently visited, and you can use M-s to force a search.
From the comments, I figured that you are looking for has nothing to do with tags, you just want a better find-file that makes good automatic guesses for the path given only the file name.
For this, I use the entirely awesome ido-mode: http://emacswiki.org/emacs/InteractivelyDoThings
How can I change the initial directory on emacs? I started using it today and there are a lot of things to learn!
Right now I'm using M-X cd and then I change the directory that I use for C-x C-f, but in a daily work I'm going to heavily use one particular directory so I need to make the change permanent.
Also if you have some tips for a starter it will be nice.
To set a default directory, simply put
(cd "/default/path/")
in your ~/.emacs file.
Emacs has a steep learning curve, but with constant use the most common commands will soon become second nature. As you discover more, emacs may become your favorite text editor, file manager, and email reader :)
To learn emacs, I'd start by pressing C-h t to start plowing through the excellent tutorial. Have a pad of paper beside you and write down the commands as you learn them. You'll use the crib sheet at first, but after a while, as I mentioned before, your fingers will learn the key combinations without your brain conciously intervening.
Good luck and have fun!
Default directory is determined by:
(setq default-directory "~/")
in this case, set to the users home dir, but it could be somewhere else.
If this variable is not set, the initial load point for find-file will be the directory where the emacs executable lives.
EDIT: on windows, a global HOME environment variable can be defined (HOME=c:\path\to\user\home\directory), ensuring that Emacs translates ~ to the correct value. This makes the Emacs settings usable across platforms.
Start up emacs only after changing to that "initial directory", effectively setting the current directory for emacs.
This is a solution specific to Windows.
Create a shortcut to emacs.exe" called GNU Emacs
Open Properties on the GNU Emacs shortcut
Set Start in to %USERPROFILE%\Documents
This solution works for multi-user workstations whether they are on or off Active Directory.
This shortcut will start Emacs in the current user's Documents folder.
Print out the Gnu Emacs Reference card and keep it by the desk.