forked from emacs-helm/helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helm-help.el
1295 lines (1086 loc) · 45.9 KB
/
helm-help.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; helm-help.el --- Help messages for Helm. -*- lexical-binding: t -*-
;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto <[email protected]>
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Code:
(require 'helm)
(defgroup helm-help nil
"Embedded help for `helm'."
:group 'helm)
(defface helm-helper
'((t :inherit helm-header))
"Face for helm help string in minibuffer."
:group 'helm-help)
;;; Embeded documentation.
;;
;;
;;;###autoload
(defvar helm-mode-line-string "\
\\<helm-map>\
\\[helm-help]:Help \
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"Help string displayed in mode-line in `helm'.
It can be a string or a list of two args, in this case,
first arg is a string that will be used as name for candidates number,
second arg any string to display in mode line.
If nil, use default `mode-line-format'.")
;;; Global help message - Used by `helm-help'
;;
;;
(defvar helm-help-message
(lambda ()
(concat
"\\<helm-map>"
"`helm' is an Emacs incremental completion and selection narrowing framework.
Narrow the list by typing some pattern,
Multiple patterns are allowed by splitting by space.
Select with natural Emacs operations, choose with RET.
== Basic Operations ==
C-p, Up: Previous Line
C-n, Down : Next Line
M-v, PageUp : Previous Page
C-v, PageDown : Next Page
Enter : Execute first (default) action / Select
M-< : First Line
M-> : Last Line
M-PageUp, C-M-S-v, C-M-y : Previous Page (other-window)
M-PageDown, C-M-v : Next Page (other-window)
Tab, C-i : Show action list
Left : Previous Source
Right, C-o : Next Source
C-k : Delete pattern
C-z : Persistent Action (Execute action with helm session kept)
== Shortcuts For 2nd/3rd Action ==
\\[helm-select-2nd-action-or-end-of-line] : Execute 2nd Action (if the minibuffer cursor is at end of line)
\\[helm-select-3rd-action] : Execute 3rd Action
== Visible Marks ==
Visible marks store candidate. Some actions uses marked candidates.
\\[helm-toggle-visible-mark] : Toggle Visible Mark
\\[helm-prev-visible-mark] : Previous Mark
\\[helm-next-visible-mark] : Next Mark
== Miscellaneous Commands ==
\\[helm-toggle-resplit-window] : Toggle vertical/horizontal split helm window
\\[helm-quit-and-find-file] : Drop into `find-file'
\\[helm-delete-current-selection] : Delete Selected Item (visually)
\\[helm-kill-selection-and-quit] : Set Item Into the kill-ring And Quit
\\[helm-yank-selection] : Yank Selected Item Into Pattern
\\[helm-follow-mode] : Toggle Automatical Execution Of Persistent Action
\\[helm-force-update] : Recalculate And Redisplay Candidates
== Global Commands ==
\\<global-map>\\[helm-resume] revives last `helm' session.
It is very useful, so you should bind any key."))
"Detailed help message string for `helm'.
It also accepts function or variable symbol.")
(defun helm-help-internal (bufname insert-content-fn)
"Show long message during `helm' session in BUFNAME.
INSERT-CONTENT-FN is the function that insert
text to be displayed in BUFNAME."
(let ((winconf (current-frame-configuration)))
(unwind-protect
(progn
(setq helm-suspend-update-flag t)
(switch-to-buffer (get-buffer-create bufname))
(delete-other-windows)
(erase-buffer)
(funcall insert-content-fn)
(setq cursor-type nil)
(goto-char 1)
(helm-help-event-loop))
(setq helm-suspend-update-flag nil)
(set-frame-configuration winconf))))
(defun helm-help-event-loop ()
(let ((prompt (propertize
"[SPC,C-v,down:NextPage b,M-v,up:PrevPage C-s/r:Isearch Other:Exit]"
'face 'helm-helper))
(scroll-error-top-bottom t))
(condition-case _err
(cl-loop for event = (read-key prompt) do
(cl-case event
((?\C-v ? down) (scroll-up-command helm-scroll-amount))
((?\M-v ?b up) (scroll-down-command helm-scroll-amount))
((?\C-s) (isearch-forward))
((?\C-r) (isearch-backward))
(t (cl-return))))
(beginning-of-buffer (message "Beginning of buffer"))
(end-of-buffer (message "End of Buffer")))))
;;;###autoload
(defun helm-help ()
"Help of `helm'."
(interactive)
(save-selected-window
(helm-help-internal
" *Helm Help*"
(lambda ()
(insert (substitute-command-keys
(helm-interpret-value (or (assoc-default
'help-message
(helm-get-current-source))
helm-help-message))))))))
;;; `helm-buffer-list' help
;;
;;
(defvar helm-buffer-help-message
"== Helm Buffer ==
\nTips:
Completion:
You can enter a partial name of major-mode (e.g lisp, sh) to narrow down buffers.
To specify the major-mode, prefix it with \"*\" e.g \"*lisp\".
If you want to match all buffers but the ones with a specific major-mode (negation),
prefix the major-mode with \"!\" e.g \"*!lisp\".
If you want to specify more than one major-mode, separate them with \",\",
e.g \"*!lisp,!sh,!fun\" will list all buffers but the ones in lisp-mode, sh-mode and
fundamental-mode.
Enter then a space and a pattern to narrow down to buffers matching this pattern.
If you enter a space and a pattern prefixed by \"@\" helm will search for text matching
this pattern INSIDE the buffer (i.e not in the name of buffer).
NOTE that if you enter your pattern prefixed with \"@\" but escaped, helm will search a buffer
matching \"@pattern\" but will not search inside.
e.g
if I enter in pattern prompt:
\"*lisp ^helm @moc\"
helm will narrow down the list by selecting only buffers that are in lisp mode, start by helm
and match \"moc\" in their contents.
if I enter in pattern prompt:
\"*lisp ^helm moc\"
Notice there is no \"@\" this time
helm will look for lisp mode buffers starting by \"helm\" and have \"moc\" in their name.
if I enter in pattern prompt:
\"*!lisp !helm\"
helm will narrow down to buffers that are not in \"lisp\" mode and that do not match \"helm\"
Creating buffers
When creating a new buffer use \\[universal-argument] to choose a mode for your buffer in a list.
This list is customizable, see `helm-buffers-favorite-modes'.
Meaning of colors and prefixes for buffers:
Remote buffers are prefixed with '@'.
Red => Buffer have its file modified on disk by an external process.
Indianred2 => Buffer exists but its file have been deleted.
Orange => Buffer is modified and its file not saved to disk.
Italic => A non--file buffer.
\nSpecific commands for `helm-buffers-list':
\\<helm-buffer-map>
\\[helm-buffer-run-zgrep]\t\t->Grep Buffer(s) works as zgrep too (C-u grep all buffers but non--file buffers).
\\[helm-buffers-run-multi-occur]\t\t->Multi Occur buffer or marked buffers. (C-u toggle force searching current-buffer).
\\[helm-buffer-switch-other-window]\t\t->Switch other window.
\\[helm-buffer-switch-other-frame]\t\t->Switch other frame.
\\[helm-buffer-run-query-replace-regexp]\t\t->Query replace regexp in marked buffers.
\\[helm-buffer-run-query-replace]\t\t->Query replace in marked buffers.
\\[helm-buffer-run-ediff]\t\t->Ediff current buffer with candidate. If two marked buffers ediff those buffers.
\\[helm-buffer-run-ediff-merge]\t\t->Ediff merge current buffer with candidate. If two marked buffers ediff merge those buffers.
\\[helm-buffer-diff-persistent]\t\t->Toggle Diff buffer with saved file without quitting.
\\[helm-buffer-revert-persistent]\t\t->Revert buffer without quitting.
\\[helm-buffer-save-persistent]\t\t->Save buffer without quitting.
\\[helm-buffer-run-kill-buffers]\t\t->Delete marked buffers and quit.
\\[helm-toggle-all-marks]\t\t->Toggle all marks.
\\[helm-mark-all]\t\t->Mark all.
\\[helm-toggle-buffers-details]\t\t->Toggle details.
\\[helm-buffers-toggle-show-hidden-buffers]\t\t->Show hidden buffers.
\\[helm-buffer-help]\t\t->Display this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-buffer-help ()
"Help command for helm buffers."
(interactive)
(let ((helm-help-message helm-buffer-help-message))
(helm-help)))
;;; Find files help (`helm-find-files')
;;
;;
(defvar helm-ff-help-message
"== Helm Find Files ==
\nTips:
\n- Enter `~/' at end of pattern to quickly reach home directory.
- Enter `/' at end of pattern to quickly reach root of your file system.
- Enter `./' at end of pattern to quickly reach `default-directory' (initial start of session).
- You can complete with partial basename (start on third char entered)
e.g \"fob\" or \"fbr\" will complete \"foobar\"
but \"fb\" will wait for a third char for completing.
- Use `C-u C-z' to watch an image.
- `C-z' on a filename will expand in helm-buffer to this filename.
Second hit on `C-z' will display buffer filename.
Third hit on `C-z' will kill buffer filename.
NOTE: `C-u C-z' will display buffer directly.
- To browse images directories turn on `helm-follow-mode' and navigate with arrow keys.
- When you want to delete backward characters to e.g creating a new file or directory,
autoupdate may keep updating to an existent directory
preventing you to do so, in this case just hit C-<backspace> and then <backspace>.
NOTE: On a terminal C-<backspace> may not work, use in this case C-c <backspace>.
- You can create a new directory an a new file at the same time, just write the path in prompt
and press <RET>.
e.g You can create \"~/new/newnew/newnewnew/my_newfile.txt\".
- To create a new directory, add a \"/\" at end of new name and press <RET>.
- To create a new file just write the filename not ending with \"/\".
- You can start a recursive search with Locate of Find (See commands below).
With Locate you can use a local db with a prefix arg; If the localdb doesn't already
exists, you will be prompted for its creation, if it exists and you want to refresh it,
give two prefix args.
\nSpecific commands for `helm-find-files':
\\<helm-find-files-map>
\\[helm-ff-run-locate]\t\t->Run Locate (C-u to specify locate db, M-n insert basename of candidate)
\\[helm-ff-run-find-sh-command]\t\t->Run Find shell command from this directory.
\\[helm-ff-run-grep]\t\t->Run Grep (C-u Recursive).
\\[helm-ff-run-pdfgrep]\t\t->Run Pdfgrep on marked files.
\\[helm-ff-run-zgrep]\t\t->Run zgrep (C-u Recursive).
\\[helm-ff-run-etags]\t\t->Run Etags (C-u use thing-at-point `C-u C-u' reload cache)
\\[helm-ff-run-rename-file]\t\t->Rename File (C-u Follow).
\\[helm-ff-run-copy-file]\t\t->Copy File (C-u Follow).
\\[helm-ff-run-byte-compile-file]\t\t->Byte Compile File (C-u Load).
\\[helm-ff-run-load-file]\t\t->Load File.
\\[helm-ff-run-symlink-file]\t\t->Symlink File.
\\[helm-ff-run-hardlink-file]\t\t->Hardlink file.
\\[helm-ff-run-delete-file]\t\t->Delete File.
\\[helm-ff-run-kill-buffer-persistent]\t\t->Kill buffer candidate without quitting.
\\[helm-ff-persistent-delete]\t\t->Delete file without quitting.
\\[helm-ff-run-switch-to-eshell]\t\t->Switch to Eshell.
\\[helm-ff-run-eshell-command-on-file]\t\t->Eshell command on file (C-u Apply on marked files, otherwise treat them sequentially).
\\[helm-ff-run-ediff-file]\t\t->Ediff file.
\\[helm-ff-run-ediff-merge-file]\t\t->Ediff merge file.
\\[helm-ff-run-complete-fn-at-point]\t\t->Complete file name at point.
\\[helm-ff-run-switch-other-window]\t\t->Switch other window.
\\[helm-ff-run-switch-other-frame]\t\t->Switch other frame.
\\[helm-ff-run-open-file-externally]\t\t->Open file with external program (C-u to choose).
\\[helm-ff-run-open-file-with-default-tool]\t\t->Open file externally with default tool.
\\[helm-ff-rotate-left-persistent]\t\t->Rotate Image Left.
\\[helm-ff-rotate-right-persistent]\t\t->Rotate Image Right.
\\[helm-find-files-down-one-level]\t\t->Go down precedent directory.
\\[helm-ff-run-switch-to-history]\t\t->Switch to last visited directories history.
\\[helm-ff-file-name-history]\t\t->Switch to file name history.
\\[helm-ff-properties-persistent]\t\t->Show file properties in a tooltip.
\\[helm-mark-all]\t\t->Mark all visibles candidates.
\\[helm-ff-run-toggle-auto-update]\t->Toggle auto expansion of directories.
\\[helm-unmark-all]\t\t->Unmark all candidates, visibles and invisibles.
\\[helm-ff-run-gnus-attach-files]\t\t->Gnus attach files to message buffer.
\\[helm-ff-run-print-file]\t\t->Print file, (C-u to refresh printers list).
\\[helm-enlarge-window]\t\t->Enlarge helm window.
\\[helm-narrow-window]\t\t->Narrow helm window.
\\[helm-ff-run-toggle-basename]\t\t->Toggle basename/fullpath.
\\[helm-ff-run-find-file-as-root]\t\t->Find file as root.
\\[helm-ff-run-insert-org-link]\t\t->Insert org link.
\\[helm-ff-help]\t\t->Display this help info.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-ff-help ()
"Help command for `helm-find-files'."
(interactive)
(let ((helm-help-message helm-ff-help-message))
(helm-help)))
;;; Help for `helm-read-file-name'
;;
;;
(defvar helm-read-file-name-help-message
"== Helm read file name ==\
\nTips:
\n- When you want to delete backward characters to e.g creating a new file or directory,
autoupdate may keep updating to an existent directory
preventing you to do so, in this case just hit C-<backspace> and then <backspace>.
NOTE: On a terminal C-<backspace> may not work, use in this case C-c <backspace>.
\nSpecific commands for helm-read-file-name:
\\<helm-read-file-map>
\\[helm-find-files-down-one-level]\t\t->Go down precedent directory.
\\[helm-ff-run-toggle-auto-update]\t->Toggle auto expansion of directories.
\\[helm-ff-run-toggle-basename]\t\t->Toggle basename.
\\[helm-ff-file-name-history]\t\t->File name history.
\\[helm-cr-empty-string]\t->Maybe return empty string (unless `must-match').
\\[helm-next-source]\t->Goto next source.
\\[helm-previous-source]\t->Goto previous source.
\\[helm-read-file-name-help]\t\t->Display this help info.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-read-file-name-help ()
(interactive)
(let ((helm-help-message helm-read-file-name-help-message))
(helm-help)))
;;; Generic file help - Used by locate.
;;
;;
(defvar helm-generic-file-help-message
"== Helm Generic files Map ==\
\nLocate tips:
You can add after writing search pattern any of the locate command line options.
e.g -b, -e, -n <number>...etc.
See Man locate for more infos.
Note:
Some other sources (at the moment recentf and file in current directory sources)
support the -b flag for compatibility with locate when they are used with it.
\nSpecific commands for helm locate and others files sources:
\\<helm-generic-files-map>
\\[helm-ff-run-toggle-basename]\t\t->Toggle basename.
\\[helm-ff-run-grep]\t\t->Run grep (C-u recurse).
\\[helm-ff-run-pdfgrep]\t\t->Run Pdfgrep on marked files.
\\[helm-ff-run-delete-file]\t\t->Delete file.
\\[helm-ff-run-ediff-file]\t\t->Ediff file.
\\[helm-ff-run-ediff-merge-file]\t\t->Ediff merge file.
\\[helm-ff-run-switch-other-window]\t\t->Switch other window.
\\[helm-ff-properties-persistent]\t\t->Show file properties.
\\[helm-ff-run-etags]\t\t->Run etags (C-u use tap, C-u C-u reload DB).
\\[helm-yank-text-at-point]\t\t->Yank text at point.
\\[helm-ff-run-open-file-externally]\t\t->Open file with external program (C-u to choose).
\\[helm-ff-run-open-file-with-default-tool]\t\t->Open file externally with default tool.
\\[helm-ff-run-insert-org-link]\t\t->Insert org link.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-generic-file-help ()
(interactive)
(let ((helm-help-message helm-generic-file-help-message))
(helm-help)))
;;; Grep help
;;
;;
(defvar helm-grep-help-message
"== Helm Grep Map ==\
\nHelm Grep tips:
You can start grep with a prefix arg to recurse in subdirectories.
You can use wild card when selecting files (e.g *.el)
You can grep in many differents directories by marking files or wild cards.
You can save your results in a grep-mode buffer, see below.
\nSpecific commands for Helm Grep:
\\<helm-grep-map>
\\[helm-goto-next-file]\t->Next File.
\\[helm-goto-precedent-file]\t\t->Precedent File.
\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer.
\\[helm-grep-run-other-window-action]\t\t->Jump other window.
\\[helm-grep-run-other-frame-action]\t\t->Jump other frame.
\\[helm-grep-run-persistent-action]\t\t->Run persistent action (Same as `C-z').
\\[helm-grep-run-default-action]\t\t->Run default action (Same as RET).
\\[helm-grep-run-save-buffer]\t\t->Save to a `grep-mode' enabled buffer.
\\[helm-grep-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-grep-help ()
(interactive)
(let ((helm-help-message helm-grep-help-message))
(helm-help)))
;;; Pdf grep help
;;
;;
(defvar helm-pdfgrep-help-message
"== Helm PdfGrep Map ==\
\nSpecific commands for Pdf Grep:
\\<helm-pdfgrep-map>
\\[helm-goto-next-file]\t->Next File.
\\[helm-goto-precedent-file]\t\t->Precedent File.
\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer.
\\[helm-pdfgrep-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-pdfgrep-help ()
(interactive)
(let ((helm-help-message helm-pdfgrep-help-message))
(helm-help)))
;;; Etags help
;;
;;
(defvar helm-etags-help-message
"== Helm Etags Map ==\
\nSpecific commands for Etags:
\\<helm-etags-map>
\\[helm-goto-next-file]\t->Next File.
\\[helm-goto-precedent-file]\t\t->Precedent File.
\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer.
\\[helm-etags-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-etags-help ()
"The help function for etags."
(interactive)
(let ((helm-help-message helm-etags-help-message))
(helm-help)))
;;; Ucs help
;;
;;
(defvar helm-ucs-help-message
"== Helm Ucs ==
\nSpecific commands for `helm-ucs':
\\<helm-ucs-map>
\\[helm-ucs-persistent-insert]\t->Insert char.
\\[helm-ucs-persistent-forward]\t->Forward char.
\\[helm-ucs-persistent-backward]\t->Backward char.
\\[helm-ucs-persistent-delete]\t->Delete char backward.
\\[helm-ucs-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-ucs-help ()
"Help command for `helm-ucs'."
(interactive)
(let ((helm-help-message helm-ucs-help-message))
(helm-help)))
;;; Bookmark help
;;
;;
(defvar helm-bookmark-help-message
"== Helm bookmark name Map ==\
\nSpecific commands for bookmarks:
\\<helm-bookmark-map>
\\[helm-bookmark-run-jump-other-window]\t\t->Jump other window.
\\[helm-bookmark-run-delete]\t\t->Delete bookmark.
\\[helm-bookmark-run-edit]\t\t->Edit bookmark.
\\[helm-bmkext-run-sort-by-frequency]\t\t->Sort by frequency (only for bmkext).
\\[helm-bmkext-run-sort-by-last-visit]\t\t->Sort by last visited (only for bmkext).
\\[helm-bmkext-run-sort-alphabetically]\t\t->Sort alphabetically (only for bmkext).
\\[helm-bookmark-toggle-filename]\t\t->Toggle bookmark location visibility.
\\[helm-bookmark-help]\t\t->Run this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-bookmark-help ()
"Help command for bookmarks."
(interactive)
(let ((helm-help-message helm-bookmark-help-message))
(helm-help)))
;;; Eshell command on file help
;;
;;
(defvar helm-esh-help-message
"== Helm eshell on file ==
\nTips:
- Passing extra args after filename:
Normally your command or alias will be called with file as argument.
e.g <command> 'candidate_file'
But you can also pass an argument or more after 'candidate_file' like this:
<command> %s [extra_args]\n
'candidate_file' will be inserted at '%s' and your command will look at this:
<command> 'candidate_file' [extra_args]
- Specify many files as args (marked files):
e.g <command> file1 file2 ...
Call `helm-find-files-eshell-command-on-file' with one prefix-arg
Otherwise you can pass one prefix-arg from the command selection buffer.
With two prefix-arg before starting or from the command selection buffer
the output is printed to your `current-buffer'.
With no prefix-arg or a prefix-arg value of '(16) (C-u C-u) the command
is called once for each file like this:
<command> file1 <command> file2 etc...
\nSpecific commands for `helm-find-files-eshell-command-on-file':
\\<helm-esh-on-file-map>
\\[helm-esh-help]\t\t->Display this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-esh-help ()
"Help command for `helm-find-files-eshell-command-on-file'."
(interactive)
(let ((helm-help-message helm-esh-help-message))
(helm-help)))
;;; Ido virtual buffer help
;;
;;
(defvar helm-buffers-ido-virtual-help-message
"== Helm ido virtual buffers Map ==\
\nSpecific commands for ido virtuals buffers:
\\<helm-buffers-ido-virtual-map>
\\[helm-ff-run-switch-other-window]\t\t->Switch other window.
\\[helm-ff-run-switch-other-frame]\t\t->Switch other frame.
\\[helm-ff-run-grep]\t\t->Grep file.
\\[helm-ff-run-zgrep]\t\t->Zgrep file.
\\[helm-ff-run-delete-file]\t\t->Delete file.
\\[helm-ff-run-open-file-externally]\t\t->Open file externally.
\\[helm-buffers-ido-virtual-help]\t\t->Display this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-buffers-ido-virtual-help ()
"Help command for ido virtual buffers."
(interactive)
(let ((helm-help-message helm-buffers-ido-virtual-help-message))
(helm-help)))
;;; Moccur help
;;
;;
(defvar helm-moccur-help-message
"== Helm Moccur Map ==\
\nHelm Moccur tips:
\nSpecific commands for Helm Moccur:
\\<helm-moccur-map>
\\[helm-goto-next-file]\t->Next Buffer.
\\[helm-goto-precedent-file]\t\t->Precedent Buffer.
\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer.
\\[helm-m-occur-run-goto-line-ow]\t\t->Goto line in other window.
\\[helm-m-occur-run-goto-line-of]\t\t->Goto line in new frame.
\\[helm-grep-run-save-buffer]\t\t->Save to a `grep-mode' enabled buffer.
\\[helm-moccur-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-moccur-help ()
(interactive)
(let ((helm-help-message helm-moccur-help-message))
(helm-help)))
;;; Helm Top
;;
;;
(defvar helm-top-help-message
"== Helm Top Map ==\
\nHelm Top tips:
\nSpecific commands for Helm Top:
\\<helm-top-map>
\\[helm-top-run-sort-by-com]\t->Sort by commands.
\\[helm-top-run-sort-by-cpu]\t->Sort by cpu usage.
\\[helm-top-run-sort-by-user]\t->Sort alphabetically by user.
\\[helm-top-run-sort-by-mem]\t->Sort by memory.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-top-help ()
(interactive)
(let ((helm-help-message helm-top-help-message))
(helm-help)))
;;; Helm Apt
;;
;;
(defvar helm-apt-help-message
"== Helm Apt Map ==\
\nHelm Apt tips:
\nSpecific commands for Helm Apt:
\\<helm-apt-map>
\\[helm-apt-show-all]\t->Show all packages.
\\[helm-apt-show-only-installed]\t->Show installed packages only.
\\[helm-apt-show-only-not-installed]\t->Show not installed packages only.
\\[helm-apt-show-only-deinstalled]\t-Show deinstalled (not purged yet) packages only.>
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-apt-help ()
(interactive)
(let ((helm-help-message helm-apt-help-message))
(helm-help)))
;;; Helm elisp package
;;
;;
(defvar helm-el-package-help-message
"== Helm elisp package Map ==\
\nHelm elisp package tips:
\nSpecific commands for Helm elisp package:
\\<helm-el-package-map>
\\[helm-el-package-show-all]\t->Show all packages.
\\[helm-el-package-show-installed]\t->Show installed packages only.
\\[helm-el-package-show-uninstalled]\t->Show not installed packages only.
\\[helm-el-package-help]\t->Show this help.
\n== Helm Map ==
\\{helm-map}")
;;;###autoload
(defun helm-el-package-help ()
(interactive)
(let ((helm-help-message helm-el-package-help-message))
(helm-help)))
;;; Mode line strings
;;
;;
;;;###autoload
(defvar helm-buffer-mode-line-string
'("Buffer(s)" "\
\\<helm-buffer-map>\
\\[helm-buffer-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-source-buffers-list'"))
;;;###autoload
(defvar helm-buffers-ido-virtual-mode-line-string
'("Killed Buffer(s)" "\
\\<helm-buffers-ido-virtual-map>\
\\[helm-buffers-ido-virtual-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-source-buffers-list'"))
;;;###autoload
(defvar helm-ff-mode-line-string "\
\\<helm-find-files-map>\
\\[helm-ff-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-source-find-files'")
;;;###autoload
(defvar helm-read-file-name-mode-line-string "\
\\<helm-read-file-map>\
\\[helm-read-file-name-help]:Help \
\\[helm-cr-empty-string]:Empty \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-source-find-files'.")
;;;###autoload
(defvar helm-generic-file-mode-line-string "\
\\<helm-generic-files-map>\
\\[helm-generic-file-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend"
"String displayed in mode-line in Locate.")
;;;###autoload
(defvar helm-grep-mode-line-string"\
\\<helm-grep-map>\
\\[helm-grep-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend"
"String displayed in mode-line in `helm-do-grep'.")
;;;###autoload
(defvar helm-pdfgrep-mode-line-string "\
\\<helm-pdfgrep-map>\
\\[helm-pdfgrep-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend"
"String displayed in mode-line in `helm-do-pdfgrep'.")
;;;###autoload
(defvar helm-etags-mode-line-string "\
\\<helm-etags-map>\
\\[helm-etags-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-etags-select'.")
;;;###autoload
(defvar helm-ucs-mode-line-string "\
\\<helm-ucs-map>\
\\[helm-ucs-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct"
"String displayed in mode-line in `helm-ucs'.")
;;;###autoload
(defvar helm-bookmark-mode-line-string
'("Bookmark(s)" "\
\\<helm-bookmark-map>\
\\[helm-bookmark-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct")
"String displayed in mode-line in `helm-source-buffers-list'")
;;;###autoload
(defvar helm-occur-mode-line "\
\\<helm-map>\
\\[helm-help]:Help \
\\<helm-occur-map>\
\\[helm-occur-run-query-replace-regexp]:Query replace regexp \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend")
;;;###autoload
(defvar helm-moccur-mode-line "\
\\<helm-moccur-map>\
\\[helm-moccur-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend")
;;;###autoload
(defvar helm-comp-read-mode-line "\
\\<helm-comp-read-map>\
\\[helm-cr-empty-string]:Empty \
\\<helm-map>\
\\[helm-help]:Help \
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct")
;;;###autoload
(defvar helm-top-mode-line "\
\\<helm-top-map>\
\\[helm-top-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend")
;;;###autoload
(defvar helm-apt-mode-line "\
\\<helm-apt-map>\
\\[helm-apt-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend")
;;;###autoload
(defvar helm-el-package-mode-line "\
\\<helm-el-package-map>\
\\[helm-el-package-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct \
\\[helm-toggle-suspend-update]:Tog.suspend")
;;; Attribute Documentation
;;
;;
;;;###autoload
(defun helm-describe-helm-attribute (helm-attribute)
"Display the full documentation of HELM-ATTRIBUTE.
HELM-ATTRIBUTE should be a symbol."
(interactive (list (intern
(completing-read
"Describe helm attribute: "
(mapcar 'symbol-name helm-attributes)
nil t))))
(with-output-to-temp-buffer "*Help*"
(princ (get helm-attribute 'helm-attrdoc))))
(helm-document-attribute 'name "mandatory"
" The name of the source. It is also the heading which appears
above the list of matches from the source. Must be unique.")
(helm-document-attribute 'header-name "optional"
" A function returning the display string of the header. Its
argument is the name of the source. This attribute is useful to
add an additional information with the source name.")
(helm-document-attribute 'candidates "mandatory if candidates-in-buffer attribute is not provided"
" Specifies how to retrieve candidates from the source. It can
either be a variable name, a function called with no parameters
or the actual list of candidates.
The list must be a list whose members are strings, symbols
or (DISPLAY . REAL) pairs.
In case of (DISPLAY . REAL) pairs, the DISPLAY string is shown
in the Helm buffer, but the REAL one is used as action
argument when the candidate is selected. This allows a more
readable presentation for candidates which would otherwise be,
for example, too long or have a common part shared with other
candidates which can be safely replaced with an abbreviated
string for display purposes.
Note that if the (DISPLAY . REAL) form is used then pattern
matching is done on the displayed string, not on the real
value.
If the candidates have to be retrieved asynchronously (for
example, by an external command which takes a while to run)
then the function should start the external command
asynchronously and return the associated process object.
Helm will take care of managing the process (receiving the
output from it, killing it if necessary, etc.). The process
should return candidates matching the current pattern (see
variable `helm-pattern'.)
You should use instead `candidates-process' attribute for
async processes, a warning will popup when using async process
in a `candidates' attribute.
Note that currently results from asynchronous sources appear
last in the helm buffer regardless of their position in
`helm-sources'.")
(helm-document-attribute 'candidates-process
"Same as `candidates' attributes but for process function."
" You should use this attribute when using a function involving
an async process instead of `candidates'.")
(helm-document-attribute 'action "mandatory if type attribute is not provided"
" It is a list of (DISPLAY . FUNCTION) pairs or FUNCTION.
FUNCTION is called with one parameter: the selected candidate.
An action other than the default can be chosen from this list
of actions for the currently selected candidate (by default
with TAB). The DISPLAY string is shown in the completions
buffer and the FUNCTION is invoked when an action is
selected. The first action of the list is the default.")
(helm-document-attribute 'coerce "optional"
" It's a function called with one argument: the selected
candidate.
This function is intended for type convertion. In normal case,
the selected candidate (string) is passed to action
function. If coerce function is specified, it is called just
before action function.
Example: converting string to symbol
(coerce . intern)")
(helm-document-attribute 'type "optional if action attribute is provided"
" Indicates the type of the items the source returns.
Merge attributes not specified in the source itself from
`helm-type-attributes'.
This attribute is implemented by plug-in.")
(helm-document-attribute 'init "optional"
" Function called with no parameters when helm is started. It
is useful for collecting current state information which can be
used to create the list of candidates later.
For example, if a source needs to work with the current
directory then it can store its value here, because later
helm does its job in the minibuffer and in the
`helm-buffer' and the current directory can be different
there.")
(helm-document-attribute 'delayed-init "optional"
" Function called with no parameters before candidate function
is called. It is similar with `init' attribute, but its
evaluation is deferred. It is useful to combine with ")
(helm-document-attribute 'match "optional"
" List of functions called with one parameter: a candidate. The
function should return non-nil if the candidate matches the
current pattern (see variable `helm-pattern').
This attribute allows the source to override the default
pattern matching based on `string-match'. It can be used, for
example, to implement a source for file names and do the
pattern matching on the basename of files, since it's more
likely one is typing part of the basename when searching for a
file, instead of some string anywhere else in its path.
If the list contains more than one function then the list of
matching candidates from the source is constructed by appending
the results after invoking the first function on all the
potential candidates, then the next function, and so on. The