Michael Albinus [Sun, 27 Dec 2015 15:24:47 +0000 (16:24 +0100)]
Retrieve debbugs data in several chunks, sequentially
* packages/debbugs/debbugs-gnu.el (top): Do not require widgets
and wid-edit. Remove debbugs-gnu-widgets, debbugs-gnu-widget-map
and debbugs-gnu-current-widget.
(debbugs-gnu-default-hits-per-page): Make it a defconst, value is 500.
(debbugs-gnu-current-suppress): New defvar.
(debbugs-gnu, debbugs-gnu-print-entry, debbugs-gnu-rescan)
(debbugs-gnu-toggle-suppress, debbugs-gnu-current-query):
Remove widget code.
(debbugs-gnu-show-reports): Remove widget code. Retrieve bug data
in chunks of 500.
(debbugs-gnu-print-entry, debbugs-gnu-usertags): Use `highlight'
as mouse-face.
Michael Albinus [Sun, 27 Dec 2015 11:17:57 +0000 (12:17 +0100)]
debbugs code cleanup
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-archived): Move down.
(debbugs-read-emacs-bug-with-gnus): New defun, extracted from
`debbugs-gnu-select-report'.
(debbugs-gnu-select-report): Use it.
Lars Ingebrigtsen [Thu, 24 Dec 2015 21:39:24 +0000 (22:39 +0100)]
Increase the default number of hits
* debbugs-gnu.el (debbugs-gnu-default-hits-per-page): Increase the
default number of hits, because it doesn't make much sense to look
at partial bug lists when doing triage.
Oleh Krehel [Fri, 4 Dec 2015 07:30:17 +0000 (08:30 +0100)]
swiper.el (swiper--update-input-ivy): Add a work-around for "M-j"
When `ivy-yank-word' is called, don't move to the line of the current
candidate. We're already there anyway. And not moving helps when there
are multiple occurrences of the current input on the current line.
Stefan Monnier [Mon, 30 Nov 2015 18:31:14 +0000 (13:31 -0500)]
* packages/seq: Don't define it as a :core package
Revert the removal of packages/seq/seq.el since it's different from
the one in lisp/emacs-lisp.
* .gitignore: Remove packages/seq.
* externals-list: Remove "seq" entry.
Stefan Monnier [Mon, 30 Nov 2015 15:20:46 +0000 (10:20 -0500)]
* packages/sm-c-mode: Add imenu/which-func/add-log support
(sm-c--comment-regexp): New var.
(sm-c--defun-regexp): New var, extracted from sm-c-font-lock-keywords.
Also recognize macro definitions.
(sm-c-font-lock-keywords): Use it.
(sm-c--def-regexp): New var.
(sm-c-mode): Use it for add-log and imenu.
Stefan Monnier [Mon, 30 Nov 2015 13:50:12 +0000 (08:50 -0500)]
* admin/archive-contents.el: Make :core handling optional
(archive--sync-emacs-repo): Drop support for $EMACS_CLONE_REFERENCE and
don't auto-use ../emacs/master if present.
(archive--insert-repolinks): Mark arg as unused.
(archive--metadata): Remove unused var `pv'.
Oleh Krehel [Sun, 29 Nov 2015 16:01:35 +0000 (17:01 +0100)]
Fix due to visual-line-mode weirdness
* swiper.el (swiper--candidates): Under a specific random condition,
(line-move 1) from the beginning of line doesn't move to the beginning
of the next visual line.
This change fixes it, but will result in an even slower startup when
`visual-line-mode' is active.
Oleh Krehel [Sun, 29 Nov 2015 10:15:17 +0000 (11:15 +0100)]
Fix ivy-resume issue caused by the recursive calls change
* ivy.el (ivy-read): recursive-ivy-last is only set if there's an active
minibuffer window. If this check isn't made, it causes the previous
`ivy-last' to be reset after the current one, so `ivy-resume' would
resume not the last command.
Oleh Krehel [Sun, 29 Nov 2015 10:13:45 +0000 (11:13 +0100)]
Fix the preselect for (swiper "one") again
* ivy.el (ivy--reset-state): Take into account :preselect being integer.
This means that it's void once the candidates are filtered over
:initial-input.
Thomas Fitzsimmons [Fri, 27 Nov 2015 06:27:00 +0000 (01:27 -0500)]
Make externals directory removal safer
* admin/archive-contents.el (archive--find-non-trivial-file): New
function.
(archive--cleanup-packages): Check result of
archive--find-non-trivial-file before deleting untracked package.
Thomas Fitzsimmons [Mon, 16 Nov 2015 02:25:04 +0000 (21:25 -0500)]
Use symbolic links for core packages
* admin/archive-contents.el (archive--process-simple-package):
Copy file if it is a symlink to prevent deletion of target source
file.
(archive--core-package-link-file): Rename from
archive--core-package-copy-file. Create symbolic links for core
files.
(archive--core-package-link-directory): Rename from
archive--core-package-copy-directory. Call
archive--core-package-link-file.
(archive--core-package-sync): Change message to indicate linking.
Call archive--core-package-link-file.
Oleh Krehel [Thu, 26 Nov 2015 11:52:34 +0000 (12:52 +0100)]
Ease production of functions like ivy-format-function-default
* ivy.el (ivy--format-function-generic): New defun.
(ivy-format-function-default):
(ivy-format-function-arrow):
(ivy-format-function-line): Use `ivy--format-function-generic'.
* counsel.el (counsel--M-x-transformer): Add an extra space to simplify
the logic.
Stephen Whipple [Thu, 26 Nov 2015 07:07:16 +0000 (00:07 -0700)]
Convert ivy formatting functions to dotted pairs.
`ivy-format-function' now expects to operate on dotted pairs
representing (stub . extra), where `stub' is the original
candidate and `extra' is any extra information that has been
added by counsel or other libraries.
The format function can differentiate between the original stub
and extra information and choose how to display the result to
the user.
Oleh Krehel [Wed, 25 Nov 2015 14:24:58 +0000 (15:24 +0100)]
Add counsel-grep
* ivy.el (ivy--reset-state): Don't push preselect onto collection for
:dynamic-collection.
(ivy-recompute-index-swiper-async): New defun. It's useful for
re-anchoring on collections produced async processes. The major
difference from `ivy-recompute-index-swiper' is using `equal' instead of `eq'.
* counsel.el (counsel--async-sentinel): Add index recomputing logic.
When `ivy--old-cands' are null, recompute the index according to
:preselect, otherwise try `ivy--recompute-index'.
(counsel-grep): New command. Very similar to `swiper', except calls an
external process for each key update. Should be much faster for very
large files, both for startup and for matching. For smaller files, it's
less convenient.
(counsel-grep-function): New defun.
(counsel-grep-action): New defun.
Stefan Monnier [Tue, 24 Nov 2015 21:06:06 +0000 (16:06 -0500)]
* sm-c-mode: Improve indentation of struct; plus bug fixes
* packages/sm-c-mode/GNUmakefile: New file.
* packages/sm-c-mode/sm-c-mode-test.c: Add some "struct" tests.
Plus a #include.
* packages/sm-c-mode/sm-c-mode.el (sm-c-syntax-propertize): Mark the <...>
of #include as a string.
(sm-c-smie--*-token): Try not to look too far back.
(sm-c-smie-rules): Indent the {...} of struct and enum definitions.
(sm-c--bs-realign-1): Fix behavior at EOB.
(sm-c--cpp-is-not-really-a-comment): New function.
(comment-only-p): Use it.
* sm-c-mode/sm-c-mode.el: Auto-align backslashes. Improve indent rules.
(sm-c--cpp-indent-comment-inside): New function.
(sm-c--cpp-smie-indent-functions): Use it.
(sm-c--cpp-smie-indent): Handle indentation within comments-within-cpp.
(sm-c-smie-grammar): Manually tweak precedence of ":label".
(sm-c-smie-operator-regexp): Parentheses aren't operators.
(sm-c--boi): Add `inner' arg.
(sm-c--boe): Complete the code.
(sm-c-smie--*-token): Refine.
(sm-c-smie-rules): Various tweaks based on tests on src/eval.c and
src/xdisp.c.
(sm-c--bs-changed): New var.
(sm-c--bs-after-change, sm-c--bs-realign, sm-c--bs-realign-1):
New functions.
(sm-c-mode): Use them.
* sm-c-mode/sm-c-mode-test.c: Add a few more cases.
Oleh Krehel [Tue, 24 Nov 2015 11:09:37 +0000 (12:09 +0100)]
Fix broken candidate index in ivy-resume
* ivy.el (ivy--reset-state): When given initial-input, call
`ivy--preselect-index' on candidates filtered by initial-input. This
is important for `ivy-resume'.