Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
anybody authored and tarsius committed Dec 23, 2010
1 parent 406f30e commit d94f548
Show file tree
Hide file tree
Showing 26 changed files with 938 additions and 189 deletions.
80 changes: 61 additions & 19 deletions AnythingProposals
Expand Up @@ -94,24 +94,48 @@ Great - I added a very basic Getting Started section at the top now, because I f
A few extra functions for visible marks:

<pre>
(defun anything-unmark-all ()
"Unmark all marked candidates."
(interactive)
(with-anything-window
(defun anything-unmark-all (arg)
"With no prefix arg (or if ARG is nil when called from a function), unmark all candidates.
With a single prefix arg (or a value of 4 for ARG), unmark all visible candidates.
With a double prefix arg (or a value of 16 for ARG), unmark all non-visible candidates."
(interactive "p")
(with-anything-window
(save-excursion
(goto-char (point-min))
(anything-next-line)
(let ((maxline (1- (line-number-at-pos (point-max)))))
(while (< (current-line) maxline)
(anything-aif (anything-this-visible-mark)
(anything-delete-visible-mark it))
(anything-next-line))
(anything-aif (anything-this-visible-mark)
(anything-delete-visible-mark it))))
(anything-mark-current-line)))
(cond ((eq arg 1) ; unmark all candidates
(setq anything-visible-mark-overlays nil)
(setq anything-c-marked-candidate-list nil)
(setq anything-marked-candidates nil))
((> arg 3) ; unmark all visible/non-visible candidates
(goto-char (point-min))
(anything-next-line)
(if (not (anything-this-visible-mark))
(anything-next-visible-mark))
(let* ((pnts (remove nil (mapcar 'overlay-start anything-visible-mark-overlays)))
(maxpoint (if pnts (eval `(max ,@pnts)) 0))
temp-overlays temp-candidates temp-c-candidates)
(while (<= (point) maxpoint)
(anything-aif (anything-this-visible-mark)
(if (eq arg 4) ; unmark visible candidates if single prefix
(anything-delete-visible-mark it)
;; else add to temp vars to replace marked candidates
;; (thus unmarking non-visible candidates)
(progn (add-to-list 'temp-overlays it)
(add-to-list 'temp-candidates
(cons (anything-get-current-source)
(anything-get-selection)))
(add-to-list 'temp-c-candidates
(anything-current-line-contents)))))
(if (< (point) maxpoint) (anything-next-visible-mark)
(setq maxpoint (1- maxpoint))))))))
(anything-mark-current-line))
(if (< arg 5)
(anything-force-update)))


(defun anything-mark-all ()
"Mark all unmarked candidates."
"Mark all unmarked candidates.
NOTE: this will not affect candidates that are not visible. To do that you need to
redisplay all candidates first (e.g. by pressing C-k)."
(interactive)
(with-anything-window
(save-excursion
Expand All @@ -127,7 +151,9 @@ A few extra functions for visible marks:
(anything-mark-current-line)))

(defun anything-toggle-all-marks ()
"Toggle marks of all candidates."
"Toggle marks of all visible candidates.
NOTE: this will not affect candidates that are not visible. To do that you need to
redisplay all candidates first (e.g. by pressing C-k)."
(interactive)
(with-anything-window
(save-excursion
Expand All @@ -140,9 +166,11 @@ A few extra functions for visible marks:
(anything-mark-current-line)))

(defun anything-kill-marked-candidates ()
"Store each marked candidate to the kill-ring (as seperate items),
or if no candidates are marked, store the current candidate.
This function does not quit anything when it has finished."
"Store each marked visible candidate to the kill-ring (as seperate items),
or if no visible candidates are marked, store the current candidate.
This function does not quit anything when it has finished.
NOTE: this will not affect candidates that are not visible. To do that you need to
redisplay all candidates first (e.g. by pressing C-k)."
(interactive)
(with-anything-window
(save-excursion
Expand Down Expand Up @@ -175,6 +203,16 @@ With anything-find-files for example, the display change at each time you change

-- ThierryVolpiatto

[new] I have changed `anything-unmark-all' so that you can choose whether to unmark all, all visible, or all non-visible marked candidates. I think the behaviour for `anything-toggle-all-marks', `anything-mark-all' and `anything-kill-marked-candidates' is OK since in these cases you probably only want to affect the visible candidates, and you can always redisplay all candidates (by deleting minibuffer contents) if you need to affect all candidates.
What do you think?

-- JoeBloggs
[new] You should always unmark all, no need to unmark only visibles or non--visibles. If you have more than one source, your code will mark all candidates of all sources,
you should act only on current source.
BTW i have created a new google group at https://groups.google.com/group/emacs-anything?hl=fr where it's easier to communicate that here.

-- ThierryVolpiatto

----

== Proposals for anything-config.el ==
Expand Down Expand Up @@ -286,6 +324,10 @@ I have another request though; the value of `anything-mp-highlight-delay' is not

An emacs-anything mailing list would be great.

[new] I have created a google group at https://groups.google.com/group/emacs-anything?hl=fr

-- ThierryVolpiatto

=== anything-etag request ===

It would be nice if the file name were shown with the matching tag. eg in rails if I search on `show` it brings up a bunch of matches but no way of knowing
Expand Down
2 changes: 1 addition & 1 deletion BabarZafar
@@ -1,4 +1,4 @@
Emacs user for about 4 years now and as expected I'm slowly becoming more and more sheltered inside Emacs.
I am [::bkz], an Emacs user for about 4 years now and as expected I'm slowly becoming more and more sheltered inside Emacs.

I think of my Emacs setup as my own customized OSAL (Operating System Abstraction Layer) which allows me to work on Windows, OSX/FreeBSD and Linux without too much headache. If only we could have WebKit integrated into Emacs somehow...

Expand Down
4 changes: 2 additions & 2 deletions boorad → BradAnderson
@@ -1,6 +1,6 @@
Brad Anderson <brad | sankatygroup | com>

----
CategoryHomepage
[::boorad]

----
CategoryHomepage
5 changes: 2 additions & 3 deletions CategoryEditing
Expand Up @@ -15,7 +15,7 @@ This category is about editing, not modes. See CategoryModes, instead.
** Motion/kill do-what-I-mean -- [[cursor]] movement and [[kill|killing]] [[DWIM]] functions. Lisp:motion-and-kill-dwim.el
** duplicate-previous/next-line lets you replace current line with a neighboring one by cycling through them like you can with history in Bash. I bind them to M-n and M-p. Lisp:duplicate-line.el
** [[Anything]] -- `M-x anything-show-kill-ring' narrows the kill-ring by multiple patterns.

** See also CategoryRegion
* [[register|Registers]]:
** RegAdhoc -- automatically add [[register]]s and show their destinations
** BetterRegisters -- [[register]] enhancements, [[keyboard macro]]s
Expand Down Expand Up @@ -55,6 +55,7 @@ This category is about editing, not modes. See CategoryModes, instead.
** RotateWordCapitalization -- rotate the capitalization of the current word
** SimplerWordCapitalization -- make `upcase-word' (M-u), `downcase-word' (M-l), and `capitalize-word' (M-c) work on [[region]]s too.
** [[Multiverse]] -- manage multiple versions of [[buffer]]s in an Emacs session
** See also EmacsNiftyTricks
* [[line|Lines]]:
** LineCommands
** RunCommandOverLines -- execute a command for several lines, like in `ed' (TheTruePath)
Expand All @@ -67,5 +68,3 @@ This category is about editing, not modes. See CategoryModes, instead.
** BreadcrumbForEmacs -- Leave breadcrumb bookmarks in the buffers, and jump back to them quickly.
** [[Icicles - Tripping]] -- Jump around among various sets of things (projects, files, [[bookmark]]s, [[buffer]]s, [[marker]]s, [[Info]] pages, search hits, [[window]]s, [[frame]]s,...).
** FastNav -- Multiple commands to support quick jump to, replace at, kill at, etc. the next/previous occurences of characters.

See also EmacsNiftyTricks.
47 changes: 14 additions & 33 deletions CategoryRegion
Expand Up @@ -2,66 +2,47 @@ This page is about Emacs regions and the different operations and commands for m

Click on the heading above to list '''all''' pages related to ''regions''.

=The Emacs Region=
== Standard Region ==

The [[region]], [[point]], and [[mark]].

The [[active region]] is essentially what some other programs call the "selection".

== Emacs Region Vanilla Usage ==
The text between [[point]] and [[mark]] is the [[region]]. The [[active region]] is essentially what some other programs call the "selection". The [[SecondarySelection|secondary selection]] is similar to the region, but it is more persistent.

* BasicNarrowing -- Isolates the region, so you can limit operations to region text. See also [[Narrowing]].
* CopyAndPaste -- Alternatives to default KillingAndYanking for copying, killing, and yanking.
* CopyWithoutSelection -- Simply copy current line, current word and current paragraph to the kill-ring without select to each line, each word or each paragraph
* CopyingWholeLines -- Different ways of copying an entire line to the kill-ring.
* CuaMode -- Use key bindings compatible with the Common User Access (CUA) system
* DeleteSelectionMode -- Replaces the region with what you type. Backspace (DEL) deletes the region.
* KillingAndYanking -- The default Emacs behavior for copying, killing (cutting), and yanking (pasting).
* TransientMarkMode -- Highlights the region whenever it is active (you can activate it using `C-x C-x').
* PcSelectionMode -- Treats the region like MS Windows and Motif.
* ShiftSelectMode -- Expand regions with Shift and a navigation command.



===Emacs Has a Second Selection ===

Yes, Virginia, there is a ''second'' selection. The SecondarySelection is like the region, but is less
ephemeral. Learn to use it.
* EmacsIdeasApplyRegionFunctionOnMultipleRegions
** ApplyFunctionOnMultipleRegions -- Applies a function to several regions at the same time.



===Rectangles - Regions with a Twist===
* RectangleCommands -- Operate on the column of text between point and mark.
** RectangleMark -- Highlights rectangular areas instead of a continuous stretches of text.
** RectangleAdd -- Adds the numbers in a rectangle.
* ShiftSelectMode -- Expand regions with Shift and a navigation command.
* TransientMarkMode -- Highlights the region whenever it is active (you can activate it using `C-x C-x').

== Region Extensions ==


== Extensions of Vanilla Region Handling ==

* ApplyFunctionOnMultipleRegions -- Applies a function to several regions at the same time.
* AnchoredTranspose -- Transposes a phrase around an anchor phrase. In other words it swaps 2 regions.
* [[Anything|anything-show-kill-ring]] -- Narrow `kill-ring' using multiple patterns.
* AutoMark -- Push a mark after selected commands
* [[Bookmark+]] -- ''Name'' regions and make them ''persistent''. Revisit bookmark to visit and activate region.
* ChangingCursorDynamically -- Find the region easily by making the [[cursor]] more visible when Emacs is idle.
* CuaMode -- Use key bindings compatible with the Common User Access (CUA) system
* EevMode -- `M-x eev' saves region to a temporary script. Later we can execute it.
* EevMode -- `M-x eev' saves region to a temporary script. Later you can execute the script.
* FastNav -- Set mark quickly at the next/previous nth occurence of a character while [[point]] is kept.
* HideRegion -- Hide and show multiple regions.
* HighlightTemporarily -- Highlight a region (includes marker pens etc.).
* [[Icicles]] -- Persistent, multiple regions as [[bookmark]]s. Select a bookmarked region, search one, etc. -- [[Icicles - Bookmark Enhancements]]
* [[IndirectBuffers#IndirectRegion]] -- Edit a region of text in a different mode.
* MarkLines -- Keyboard emulation of triple-click line selection. (Incompatible with CUAMode.)
* ModeLinePosition -- Show the size of the region in the mode-line, whenever region is active in TransientMarkMode.
* MousePlus -- Highlight the yank position while you press `mouse-2', so you hit the right spot.
* Move region -- MoveLine, MoveLineRegion, MoveRegion, MoveText.
* MarkLines -- Keyboard emulation of triple-click line selection. (Incompatible with CuaMode.)
* ModeLinePosition -- Show the size of the region in the mode-line, whenever the region is active (TransientMarkMode).
* [[Mouse+]] -- Highlight the [[yank]] position while you press `mouse-2', so you hit the right spot.
* MoveLine, MoveRegion, MoveText -- Move lines or region.
* MultipleNarrowings -- Use `##C-x n x x x...##' to cycle a ring of narrowings (buffer restrictions).
* SelectiveUndo -- Undo changes within the region.
* [[Subedit]] -- Edit part of a buffer in a new buffer.
* SwapRegions -- Swap two regions.
* <tt>[[trans-regions.el]]</tt> -- Transpose regions.
* VisibleMark -- Make the mark position visible

== See Also ==

* HighlightTemporarily -- Highlight a region (includes marker pens etc.).
See also CategoryEditing.
93 changes: 93 additions & 0 deletions ChmouelBoudjnah
@@ -0,0 +1,93 @@
== Information ==
My name is Chmouel Boudjnah ([::chmouel]) and I am a French living in Sydney, Australia.

I use EmacsForDOS, and EmacsOnGnuLinux at work and at home since a couple of years (7).

* [http://www.emacswiki.org/cgi-bin/wiki?action=rc&all=1&showedit=1&from=1&rcuseronly=chmouel Contributions to the Wiki]

* [http://www.chmouel.com/ Web Page]

* Email: [mailto:chmouel@chmouel.com chmouel@chmouel.com]

* Emacs Blog: http://www.chmouel.com/blog/category/emacs/

== Code ==

Some of my code i like to keep (got to put somewhere in the wiki but i hardfly find where) :

<pre>
;; Search Google at point:
(defun my-search-google (w)
"Launch google on the Word at Point"
(interactive
(list (let* ((word (thing-at-point 'symbol))
(input (read-string (format "Google%s: "
(if (not word) "" (format " (default %s)" word))))))
(if (string= input "") (if (not word)
(error "No keyword to search given") word) input) ;sinon input
)))
(browse-url (format "http:/www.google.com/search?q=%s" w))
)
(global-set-key (read-kbd-macro "C-c j") 'my-search-google)
</pre>

<pre>
;;Compilation Frame (i should really use special-display-regexps instead)
(defvar my-compilation-frame 'nil)
(defun my-compilation-frame ( )
(interactive)
(if (not (frame-live-p my-compilation-frame))
(progn
(select-frame (or (and (frame-live-p my-compilation-frame) my-compilation-frame)
(setq my-compilation-frame
(make-frame '((name . "*Compilation*")(minibuffer . t)
(width . 100)(height . 15)
)) )))
(switch-to-buffer "*compilation*")
(modify-frame-parameters my-compilation-frame (list (cons 'menu-bar-lines 0)))
(buffer-disable-undo)
(setq buffer-read-only t)
(set-visited-file-name "")
)
(progn
(if (eq (selected-frame) my-compilation-frame)
(delete-frame my-compilation-frame)
(select-frame-set-input-focus my-compilation-frame)))
)
)
(global-set-key '[(f6)] 'my-compilation-frame)
</pre>

<pre>
;; Fast from switches (i know there is posting-styles personalities and such but i just need that mostly
(defvar my-email-adresses
'(("chmouel@chmouel.com") ("chmouel@squiz.net")("chmouel@yahoo.fr"))
)
(defun my-email-adress-switch ()
(interactive)
(save-excursion
(let* ((completion-ignore-case t)
(item (assoc-ignore-case
(completing-read "Email adress: " my-email-adresses nil t)
my-email-adresses))
(email-adress (car item)))
(beginning-of-buffer)
(if (re-search-forward "^From:" nil t)
(delete-region (point) (progn (end-of-line)(point)))
(insert "From:"))
(insert (concat " " user-full-name " <" email-adress ">"))
(if (not (eolp))(insert "\n"))
))
)

</pre>

== Talk ==

Welcome to the wiki! -- PierreGaston

[new]
The way I usually set up a page alias involves PermanentAnchors. Thus, the permanent anchor [[kensanata]] can be linked to like any other page, but it points to a place on my page. -- AlexSchroeder

----
CategoryHomePage
29 changes: 29 additions & 0 deletions ControlTABbufferCycling
Expand Up @@ -42,6 +42,35 @@ Features:
* Uses custom: easy to configure.
* AdrianKubala would be happy to add your favorite feature. :)

LeWang
* The download link above isn't working, so I've uploaded my version of it to the wiki: Lisp:buffer-stack.el.
* I've also uploaded my supplemental library Lisp:buffer-stack-suppl.el for only switching amongst buffers of the current major-mode.
* Here is a snipplet of my emacs.el. I use f9-f10-f11 for same major-mode switching and *shift* commands for switching amongst all buffers.

<pre>
;;;;;;;;;;;;;;;;;
; buffer-stack ;;
;;;;;;;;;;;;;;;;;

(setq buffer-stack-show-position 'buffer-stack-show-position-buffers)

(autoload 'buffer-stack-down "buffer-stack" nil t)
(autoload 'buffer-stack-up "buffer-stack" nil t)
(autoload 'buffer-stack-bury-and-kill "buffer-stack" nil t)
(autoload 'buffer-stack-bury "buffer-stack" nil t)
(eval-after-load "buffer-stack" '(require 'buffer-stack-suppl))

(global-set-key [(f10)] 'buffer-stack-bury)
(global-set-key [(control f10)] 'buffer-stack-bury-and-kill)
(global-set-key [(f9)] 'buffer-stack-down)
(global-set-key [(f11)] 'buffer-stack-up)
(global-set-key [(shift f10)] 'buffer-stack-bury-thru-all)
(global-set-key [(shift f9)] 'buffer-stack-down-thru-all)
(global-set-key [(shift f11)] 'buffer-stack-up-thru-all)

</pre>


[:PcBufsw]
= PC-BufSw =

Expand Down
17 changes: 16 additions & 1 deletion DaveAbrahams
@@ -1 +1,16 @@
Also known occasionally on this Wiki as [[dabrahams]]
Also known occasionally on this Wiki as '''[::dabrahams]'''.




[new:DrewAdams:2010-12-22 15:16 UTC]
Welcome to the wiki. -- DrewAdams







----
CategoryHomepage
2 changes: 1 addition & 1 deletion DoveYoung
@@ -1,6 +1,6 @@
==I love Emacs==

[mailto:dove.young@gmail.com dove.young@gmail.com]
[mailto:dove.young@gmail.com dove.young@gmail.com] [::dove.young]

* CopyWithoutSelection -- simply copy current line, current word and current paragraph to the kill-ring without select to each line, each word or each paragraph
* NavigatingParentheses -- navigating between paretheses
Expand Down

0 comments on commit d94f548

Please sign in to comment.