Is there a package that allows me to have multiple Occur result buffer for the same buffer (like grep-a-lot: http://www.emacswiki.org/emacs/grep-a-lot.el).
I run into this issue when analyzing log files for multiple keywords (say to see what different but related threads were doing).
You don't need an additional package. C-ur will rename the current occur buffer to an unique name. You can add occur-rename-buffer to occur-hook to make it automatic (see the documentation of occur-rename-buffer which mentions this, too).
Related
What's the best way to associate file extensions with my own customizations? For example, when I open a .py file the frame would be bigger and split into 2 windows, but when a .tex file is opened the frame would be smaller with just one window. Should I split my .emacs and write all configurations associated with python in a .el file (key bindings, python shell = ipython, etc ...) and for latex in another .el file (load auctex, pdf mode = default, etc ...)? How would I "call" the files and make them work appropriately (if that'a possible and good solution)?
(First, +1 to #phils's comment. You will get better help if you are more specific about what you need/want.)
Depending on just what you need/want, see also variable (not option) file-name-handler-alist. You might not need it, but you might.
You can make use of it if you intend all or particular operations on the files to involve additional actions (such as those you describe). For any operations where you do not need special treatment, just provide the default behavior. For the others, provide the default behavior plus the extra behavior (in whichever order is appropriate).
See (elisp) Magic File Names for more information.
I update from ELPA/MELPA regularly. Unfortunately, the files the Emacs package manager manipulates show up in my recentf list, basically making it useless since it's always full from whatever files were updated, and not files that I actually care about. How can I fix this?
See user options recentf-exclude, recentf-keep, recentf-auto-cleanup, and command recentf-cleanup.
The first two options let you exclude and include files that satisfy certain predicates or whose names match certain patterns, respectively.
I'm using ECB with Cedet - and semantic search engine stores tags about the files I visit in its cache files.
I'm also using ECB's left-symboldef layout - which shows definition of the tag the cursor is on. In order to do that semantic opens the file where the tag was defined.
The problem is - semantic opens almost all of my python scripts all the time - since I have parser defined in all of them - when I parse command line arguments with argparse... So I'd rather stop semantic caching my files automatically, and do it manually with C-c , , on my libs only.
So my question is - how do I prevent semantic from storing cache? I should still be able to use the existing database (which I'll collect manually).
To prevent the automatic parsing of other files in idle time, you can set:
(setq semantic-idle-work-parse-neighboring-files-flag nil)
and if it is pulling them in via includes, you can do this:
(setq semantic-idle-work-update-headers-flag nil)
This is actually the default, and it gets set to true if you use one of the canned configuration options for regular or gaudy code helpers.
In order to not parse all the files, but still let ECB find tag definitions, you will probably need to use a GNU Global database. See semanticdb-enable-gnu-global-databases for more.
I was wondering if there's a way to allow a buffer to edit multiple files at once.
Recently, I got vim working with eclim. But now I was wondering if I could edit multiple files at once in one buffer. For example, say I have an interface and a class file where I need to update a method signature is there a way I can load both of them into the same buffer and edit them simultaneously. Narrow region for multiple file regions. It would also be awesome to remember my settings but that could be a future iteration.
I saw this solution but it seems inconvenient to create a separate file to handle this interaction.
You can open all files as split windows (so you see all of them together), and :windo, :bufdo, :argdo allow you to perform mass-operations (like a :substitute) on all of them at once. There's usually no need for such artificial concatenation schemes, and as the linked article shows, it has its downsides over keeping the files separate.
I have an org-mode task list that I keep in version control. I would like to press a key and turn the current position into a bookmark target that I will be able to access anywhere I have the list checked out, regardless of other changes that have been made to the document. This is why (bookmark-set) will not work.
Additionally I would like to ensure that this target only occurs once in the file. If I put the target at a different position I want the original target to go away.
Essentially, I want to combine features of Emacs bookmarks (the singleton aspect), and org-mode links (more robust persistence). What's the best way to do this?
You want to read up about Markers:
M-: (info "(elisp) Markers") RET
This feature is what allows the mark ring to retain its relative locations regardless of buffer changes, for example.
If you want the marker to be stored within the file itself, then you might want to include it as a local variable in the file itself, and use before-save-hook to update that to the current value.
The local variable may need to be an integer, in which case you would need to translate it on loading and saving.
(This is a little speculative, but I suspect it will do the trick.)
The best solution I've been able to come up with is to use the text <<<BOOKMARK>>>, and to search for it when necessary. At some point I might write some functions that place this bookmark and delete it from elsewhere.