]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix gnus-search-query-expand-key scratch/gnus-search
Eric Abrahamsen [Fri, 9 Oct 2020 05:58:19 +0000 (22:58 -0700)]
Fix gnus-search-query-expand-key

* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): Use the
proper built-in functions, rather than trying to replicate string
completion ourself.

3 years agoProvide completion of search keys when reading the query
Eric Abrahamsen [Fri, 9 Oct 2020 05:25:37 +0000 (22:25 -0700)]
Provide completion of search keys when reading the query

* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map): Keymap for
use in reading the query.
(gnus-search-complete-key): Completion function bound to TAB.
(gnus-search-make-specs): Use `read-from-minibuffer', with our new
keymap.

3 years agoDumb updates
Eric Abrahamsen [Fri, 9 Oct 2020 05:25:11 +0000 (22:25 -0700)]
Dumb updates

Mostly updating dates and versions, and some formatting stuff.

4 years agoWIP on gnus-search
Eric Abrahamsen [Sun, 13 Sep 2020 17:21:10 +0000 (10:21 -0700)]
WIP on gnus-search

7 years agoMissing comma in notmuch search command
Eric Abrahamsen [Tue, 15 Aug 2017 15:54:36 +0000 (08:54 -0700)]
Missing comma in notmuch search command

Thanks to George McNinch

* lisp/gnus/gnus-search.el (gnus-search-indexed-search-command):
  Missing comma in backquote template.

7 years agoMove the config-file slot to the base gnus-search-indexed class
Eric Abrahamsen [Wed, 7 Jun 2017 06:30:24 +0000 (14:30 +0800)]
Move the config-file slot to the base gnus-search-indexed class

* lisp/gnus/gnus-search.el (gnus-search-indexed): They pretty much all
  have or can have configuration files.

7 years agoFix to 7f21251a56, don't parse address key
Eric Abrahamsen [Sun, 4 Jun 2017 01:47:35 +0000 (09:47 +0800)]
Fix to 7f21251a56, don't parse address key

* lisp/gnus/gnus-search.el (gnus-search-transform-expression): There's
  no need to parenthesize those expressions. Nested parentheses
  actually raise a parsing error, which is another bug.

7 years agoRestore thread search behavior
Eric Abrahamsen [Thu, 1 Jun 2017 14:16:55 +0000 (22:16 +0800)]
Restore thread search behavior

* lisp/gnus/gnus-search.el (gnus-search-thread): Make this function
  produce an engine-agnostic search query.
  (gnus-search-prepare-query): Fix dumb error.
  (gnus-search-indexed-search-command): Edit to handle the 'thread
  key.
  (gnus-search-run-search): In thread searches, have the imap
  implementation expand Message-Id searches to include the References
  header. Also, somewhere along the way we lost the
  `gnus-search-get-active' call.
  (gnus-search-run-search): For Notmuch, add an :around method on this
  function, which does a primary search for thread-ids, then passes
  off to the secondary search for the messages themselves.
  (gnus-search-transform-expression): Forgot
  that multiple nested ORs have to be parenthesized for IMAP.
* lisp/gnus/nnselect.el (nnselect-request-thread): Alter function to
  pass in a generic thread search query; no longer calls imap-specific
  code.

7 years agoNew defsubst gnus-search-single-p
Eric Abrahamsen [Thu, 1 Jun 2017 14:08:11 +0000 (22:08 +0800)]
New defsubst gnus-search-single-p

* lisp/gnus/gnus-search.el (gnus-search-single-p): Convenience
  function for checking if a search is meant to return a single
  message: ie, the query is only (id . "<msg-id>").
  (gnus-search-run-search): Use in the imap method.
  (gnus-search-indexed-parse-output): Use in the indexed method.

7 years agoFix bug in indexed gnus-search-run-search method
Eric Abrahamsen [Thu, 1 Jun 2017 14:18:06 +0000 (22:18 +0800)]
Fix bug in indexed gnus-search-run-search method

* lisp/gnus/gnus-search.el (gnus-search-run-search): In case of error,
  this would have returned the actual process buffer for the notmuch
  process: it should return nil.

7 years agoDon't use nconc
Eric Abrahamsen [Thu, 1 Jun 2017 13:25:02 +0000 (21:25 +0800)]
Don't use nconc

* lisp/gnus/gnus-search.el (gnus-search-indexed-search-command): Use
  append instead of nconc, nconc modifies destructively and makes a
  mess.

7 years agoProvide a bit more backward-compatibility
Eric Abrahamsen [Thu, 1 Jun 2017 04:18:21 +0000 (12:18 +0800)]
Provide a bit more backward-compatibility

* lisp/gnus/gnus-search.el (nnir-method-default-engines): Note
  obsolete variable.
  (gnus-search-server-to-engine): Handle old 'nnir-search-engine
  server parameter keys. Additionally, warn when no engine can be
  found for a server.

7 years agoDon't parse the address: key
Eric Abrahamsen [Fri, 26 May 2017 06:27:56 +0000 (14:27 +0800)]
Don't parse the address: key

* lisp/gnus/gnus-search.el (gnus-search-query-parse-kv): Allow this
  key to pass unmolested. Handle it in the individual search engines.
  (gnus-search-query-parse-contact): Produce the "address" key as
  necessary.
  (gnus-search-transform-expression): Handle "address" key explicitly
  in imap, notmuch, and namazu backends.

7 years agoRestore IMAP ability to short-circuit message-id searches
Eric Abrahamsen [Fri, 26 May 2017 05:59:03 +0000 (13:59 +0800)]
Restore IMAP ability to short-circuit message-id searches

* lisp/gnus/gnus-search.el (gnus-search-run-search): When searching
  for a single message via message-id, nnir originally used a loop
  break when the message was found.  Reinstate this functionality,
  albeit through different means.

7 years agoMessed up rebase
Eric Abrahamsen [Tue, 23 May 2017 03:05:18 +0000 (11:05 +0800)]
Messed up rebase

7 years agoDo result limiting in the indexed engine process
Eric Abrahamsen [Sun, 21 May 2017 12:39:13 +0000 (20:39 +0800)]
Do result limiting in the indexed engine process

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Limit
  number of results, in case the engine didn't handle it.

7 years agoAdd gnus-search-grep abstract engine
Eric Abrahamsen [Sun, 21 May 2017 12:36:18 +0000 (20:36 +0800)]
Add gnus-search-grep abstract engine

* lisp/gnus/gnus-search.el (gnus-search-grep): New abstract mixin
  engine, providing 'grep-program and 'grep-options slots.
  (gnus-search-grep-search): Method for doing secondary grep searches
  over previous search results.
  (gnus-search-find-grep): Inherit from gnus-search-grep.
  (gnus-search-indexed): Likewise.
  (gnus-search-indexed-parse-output): Add a grep pass pas part of this.
  (gnus-search-run-search): Use the grep options in the find-grep
  engine.
  (gnus-search-prepare-query): Find the grep: key when parsing the
  query.

7 years agoFix bum namazu search command
Eric Abrahamsen [Thu, 18 May 2017 13:47:03 +0000 (21:47 +0800)]
Fix bum namazu search command

* lisp/gnus/gnus-search.el (gnus-search-indexed-search-command): Had
  named it incorrectly. Also switch to using nconc.

7 years agoRefactor parsing of indexed search engine output
Eric Abrahamsen [Thu, 18 May 2017 13:43:41 +0000 (21:43 +0800)]
Refactor parsing of indexed search engine output

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Rename
  `gnus-search-indexed-massage-output' to this. All indexed search
  engines now use this method.
  (gnus-search-index-extract): This new method is now distinct to each
  engine. All it does is extract a single search result from the
  output buffer.

Remove `gnus-search-add-result' and `gnus-search-compose-result',
these are now part of `gnus-search-indexed-parse-output'.

7 years agoSwitch base massage-output method for indexed search engines
Eric Abrahamsen [Thu, 18 May 2017 11:56:55 +0000 (19:56 +0800)]
Switch base massage-output method for indexed search engines

* lisp/gnus/gnus-search.el (gnus-search-indexed-massage-output): I had
  been using the namazu version, which was wrong -- that's very
  namazue specific. Use the notmuch version: the base method should
  handle plain lists of absolute filenames.

7 years agoMore comments, small improvements
Eric Abrahamsen [Sat, 13 May 2017 09:56:39 +0000 (17:56 +0800)]
More comments, small improvements

* lisp/gnus/gnus-search.el (gnus-search-transform-expression): Handle
  the 'body term.
  (gnus-search-transform-expression): Interpret more terms as
  "author", handle 'body.

7 years agoWIP on rebase
Eric Abrahamsen [Fri, 12 May 2017 10:05:34 +0000 (18:05 +0800)]
WIP on rebase

7 years agoDon't do any sorting at all in gnus-search
Eric Abrahamsen [Sun, 7 May 2017 04:00:46 +0000 (12:00 +0800)]
Don't do any sorting at all in gnus-search

7 years agoNotmuch query transformation improvements
Eric Abrahamsen [Thu, 4 May 2017 05:09:32 +0000 (13:09 +0800)]
Notmuch query transformation improvements

* lisp/gnus/gnus-search.el (gnus-search-transform-expression): A
  "body" keyword should just be removed. Also, strip angle brackets
  from message ids.

7 years agoFix for parsing delimited strings
Eric Abrahamsen [Thu, 4 May 2017 05:08:49 +0000 (13:08 +0800)]
Fix for parsing delimited strings

* lisp/gnus/gnus-search.el (gnus-search-query-next-symbol): Hadn't
  quite gotten this all the way over to the new definition of
  `gnus-search-query-return-string'.

7 years agoFind-grep can only search on plain strings
Eric Abrahamsen [Thu, 4 May 2017 05:08:13 +0000 (13:08 +0800)]
Find-grep can only search on plain strings

* lisp/gnus/gnus-search.el (gnus-search-indexed-massage-output): Drop
  any list expression.

7 years agoSome refactoring of gnus-search-run-query
Eric Abrahamsen [Thu, 4 May 2017 05:05:56 +0000 (13:05 +0800)]
Some refactoring of gnus-search-run-query

* lisp/gnus/gnus-search.el (gnus-search-run-query): Move results
  sorting here.
  (gnus-search-run-search): No need to sort here. Also, loop
  accept-process-output on process-live-p, apparently it doesn't
  necessarily get *all* the output.

Other formatting and variable naming fixes.

7 years agoMissing a base implementation of transform-expression for strings
Eric Abrahamsen [Thu, 4 May 2017 05:03:34 +0000 (13:03 +0800)]
Missing a base implementation of transform-expression for strings

* lisp/gnus/gnus-search.el (gnus-search-transform-expression):
  Othewise plain string searches would raise an error!

7 years agoRefactor parsing/no parsing of queries
Eric Abrahamsen [Thu, 4 May 2017 05:00:00 +0000 (13:00 +0800)]
Refactor parsing/no parsing of queries

* lisp/gnus/gnus-search.el (gnus-search-prepare-query): Only check
  `gnus-search-use-parsed-queries' here.
  (gnus-search-make-query-string): New engine method responsible for
  main final check of whether to use a parsed or raw query.

7 years agoAvoid circular import
Eric Abrahamsen [Wed, 3 May 2017 20:10:18 +0000 (13:10 -0700)]
Avoid circular import

* lisp/gnus/gnus-group.el: Don't require 'gnus-search at top
  level. Better solution for this?

7 years agoChange "no-parse" query meta-key to "raw"
Eric Abrahamsen [Wed, 3 May 2017 20:08:50 +0000 (13:08 -0700)]
Change "no-parse" query meta-key to "raw"

* lisp/gnus/gnus-search.el (gnus-search-prepare-query): Easier to
  type, and makes a little more sense.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group): Swap out
  here.

7 years agoAdd Mairix search engine
Eric Abrahamsen [Mon, 1 May 2017 20:57:46 +0000 (13:57 -0700)]
Add Mairix search engine

7 years agoWIP on documentation
Eric Abrahamsen [Mon, 1 May 2017 19:31:17 +0000 (12:31 -0700)]
WIP on documentation

7 years agoRemove Hyrex search engine
Eric Abrahamsen [Mon, 1 May 2017 21:23:22 +0000 (14:23 -0700)]
Remove Hyrex search engine

* lisp/gnus/gnus-search.el: Yank the whole engine out, it was already
  obsolete, and now seems to not exist at all.
* doc/misc/gnus.texi: Remove from docs.

7 years agoHandle regexp and wildcard search terms
Eric Abrahamsen [Tue, 2 May 2017 22:04:20 +0000 (15:04 -0700)]
Handle regexp and wildcard search terms

* lisp/gnus/gnus-search.el (gnus-search-query-return-string): Fix up
  this function to be a little more general. Quoted strings are now
  returned with quotes.
  (gnus-search-run-search): Pick up and (partially) use the FUZZY IMAP
  capability.
  (gnus-search-transform-expression): In IMAP, check for wildcards and
  turn them into FUZZY as appropriate. Drop regexps.
  (gnus-search-indexed-massage-output):
  (gnus-search-transform-expression): In Notmuch, only drop leading
  asterisks.
* test/lisp/gnus/search-tests.el (gnus-s-delimited-string): Add test
  for `gnus-search-query-return-string'.

7 years agoCreate general gnus-search-indexed-massage-output method
Eric Abrahamsen [Tue, 2 May 2017 22:05:11 +0000 (15:05 -0700)]
Create general gnus-search-indexed-massage-output method

* lisp/gnus/gnus-search.el (gnus-search-indexed-massage-output): Take
  the namazu version, and install it as general for all
  gnus-search-indexed engines. Probably they all can use the same
  method, but I haven't taken the time to test them all yet.

7 years agoMove search group creation functions to gnus-group.el
Eric Abrahamsen [Thu, 27 Apr 2017 21:00:41 +0000 (14:00 -0700)]
Move search group creation functions to gnus-group.el

* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
  gnus-group-make-permanent-search-group): These two functions live in
  gnus.group.el now.
* lisp/gnus/gnus-search.el: Remove from here.

7 years agoAdd function gnus-search-prepare-query
Eric Abrahamsen [Mon, 1 May 2017 19:31:55 +0000 (12:31 -0700)]
Add function gnus-search-prepare-query

* lisp/gnus/gnus-search.el (gnus-search-prepare-query): Check for
  "top-level" meta search keys and parse them into the query
  structure, alongside the query itself.

7 years agoMake related change to nnselect.el
Eric Abrahamsen [Wed, 26 Apr 2017 19:31:14 +0000 (12:31 -0700)]
Make related change to nnselect.el

Move *-make-search-group stuff to gnus-search.el

7 years agoRename nnir.el to gnus-search.el
Eric Abrahamsen [Wed, 26 Apr 2017 19:28:56 +0000 (12:28 -0700)]
Rename nnir.el to gnus-search.el

And everything in it.

7 years agoWIP on a generalized search query language for Gnus
Eric Abrahamsen [Wed, 29 Mar 2017 16:11:47 +0000 (09:11 -0700)]
WIP on a generalized search query language for Gnus

* lisp/gnus/nnir.el (nnir-search-parse-query, nnir-query-next-expr,
  nnir-query-next-term, nnir-query-next-symbol,
  nnir-query-peek-symbol, nnir-query-end-of-input,
  nnir-query-parse-kv, nnir-query-parse-date nnir-query-parse-mark,
  nnir-query-parse-contact): Functions for reading the generalized
  search query language and parsing it into a sexp.
  (gnus-search-engine, gnus-search-process, gnus-search-indexed): Base
  classes for creating search-engine specific engine classes.
  (nnir-run-search): Method for running one engine's search routine.
  (nnir-search-transform-top-level, nnir-search-transform-expression):
  Methods for transforming the parsed sexp query format into a
  backend-specific string.
  (nnir-search-indexed-search-command,
  nnir-search-indexed-massage-output): Methods used by indexed
  backends to retrieve their results.
* test/lisp/gnus/search-tests.el: Basic set of tests for the parsing
  routine.

7 years ago* lisp/gnus/nnir.el (nnir-make-specs): Use the current buffer.
Andrew G Cohen [Wed, 17 May 2017 02:39:57 +0000 (10:39 +0800)]
* lisp/gnus/nnir.el (nnir-make-specs): Use the current buffer.

7 years ago* lisp/gnus/gnus-srvr.el (gnus-server-mode-map): Use ephemeral group
Andrew G Cohen [Mon, 15 May 2017 02:45:45 +0000 (10:45 +0800)]
* lisp/gnus/gnus-srvr.el (gnus-server-mode-map): Use ephemeral group

7 years agoImprove search and select group creation
Andrew G Cohen [Sat, 13 May 2017 07:05:27 +0000 (15:05 +0800)]
Improve search and select group creation

* lisp/gnus/gnus-group.el (gnus-group-make-search-group): Make sure
new group is inserted into the group buffer.
* lisp/gnus/nnselect.el (nnselect-request-create-group): Improve input
of selection function.

7 years agoRedo entry functions for making search groups
Andrew G Cohen [Fri, 12 May 2017 01:40:03 +0000 (09:40 +0800)]
Redo entry functions for making search groups

* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group): Rename these functions to be
more consistent with other group creation functions, and move to
gnus-group.el.
* lisp/gnus/nnir.el (nnir-make-specs): Refactor new function to ease
search group creation.

7 years agoInline nnselect helper macros
Andrew G Cohen [Thu, 11 May 2017 02:36:40 +0000 (10:36 +0800)]
Inline nnselect helper macros

* lisp/gnus/gnus-registry.el (gnus-nnselect-group-p):
* lisp/gnus/gnus-sum.el (nnselect-article-rsv): Silence byte-compiler.
* lisp/gnus/nnselect.el (nnselect-group-server): New function.
(nnselect-artlist-length):
(nnselect-artlist-article):
(nnselect-artitem-group):
(nnselect-artitem-number):
(nnselect-artitem-rsv):
(nnselect-article-group):
(nnselect-article-number):
(nnselect-article-rsv):
(nnselect-article-id):
(nnselect-categorize):
(ids-by-group):
(numbers-by-group): Inline for speed.

7 years ago* lisp/gnus/nnselect.el (nnselect-request-rename-group): Allow it.
Andrew G Cohen [Thu, 11 May 2017 01:53:04 +0000 (09:53 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-rename-group): Allow it.

7 years ago* lisp/gnus/nnselect.el (nnselect-request-group): Don't close group.
Andrew G Cohen [Thu, 11 May 2017 01:51:40 +0000 (09:51 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-group): Don't close group.

7 years ago* lisp/gnus/nnselect.el (nnselect-server-opened): Just return t.
Andrew G Cohen [Thu, 11 May 2017 01:49:37 +0000 (09:49 +0800)]
* lisp/gnus/nnselect.el (nnselect-server-opened): Just return t.

7 years agoRestore accidentally remove gnus-summary-make-search-group
Andrew G Cohen [Tue, 9 May 2017 02:13:50 +0000 (10:13 +0800)]
Restore accidentally remove gnus-summary-make-search-group

* lisp/gnus/nnselect.el (gnus-summary-make-search-group): Restore the
function that was removed in a fit of overzealousness.

7 years agoImprove nnselect-request-article
Andrew G Cohen [Tue, 9 May 2017 02:11:47 +0000 (10:11 +0800)]
Improve nnselect-request-article

* lisp/gnus/nnselect.el (nnselect-request-article): Recode the
selection of the article server.
(nnselect-request-thread): Spelling.

7 years agoImprove group-info handling in nnselect
Andrew G Cohen [Tue, 9 May 2017 02:08:55 +0000 (10:08 +0800)]
Improve group-info handling in nnselect

* lisp/gnus/nnselect.el (nnselect-request-group):
(nnselect-push-info): Use info argument to functions or retrieve the
group info. If the info is null (for example the group might have been
killed) don't try to update it.

7 years agoRemove unnecessary listing in nnselect-categorize
Andrew G Cohen [Mon, 8 May 2017 23:51:56 +0000 (07:51 +0800)]
Remove unnecessary listing in nnselect-categorize

* lisp/gnus/nnselect.el (nnselect-categorize): Remove unneeded extra
list around a category value.
(nnselect-retrieve-headers):
(nnselect-request-expire-articles):
(nnselect-request-set-mark):
(nnselect-request-update-info):
(nnselect-request-thread):
(nnselect-push-info):
(gnus-group-make-permanent-search-group): Accommodate change to
nnselect-categorize.
* lisp/gnus/nnir.el (nnir-run-query): Accommodate change to
nnselect-categorize.

7 years agoUse gnus-newsgroup-selection instead of nnselect-artlist
Andrew G Cohen [Mon, 8 May 2017 23:44:19 +0000 (07:44 +0800)]
Use gnus-newsgroup-selection instead of nnselect-artlist

* lisp/gnus/nnselect.el (nnselect-retrieve-headers):
(nnselect-request-thread):
(nnselect-retrieve-headers):
(nnselect-close-group): Use the summary local variable
gnus-newsgroup-selection rather than the internal nnselect-artlist
variable.
(nnselect-request-group):
(nnselect-request-move-article):
(nnselect-request-expire-articles):
(nnselect-warp-to-article):
(nnselect-request-set-mark):
(nnselect-request-thread): Don't unnecessarily retrieve the
nnselect-artlist value.

7 years agoFix pushing marks on nnselect exit
Andrew G Cohen [Sat, 6 May 2017 13:24:37 +0000 (21:24 +0800)]
Fix pushing marks on nnselect exit

* lisp/gnus/nnselect.el (nnselect-push-info): Deal with scoring.
Ensure that mark lists are properly compressed before saving. Add only
the group-specific articles to the `seen' lists.

7 years agoNew gnus summary sorting functions on rsv
Andrew G Cohen [Sat, 6 May 2017 08:11:58 +0000 (16:11 +0800)]
New gnus summary sorting functions on rsv

* lisp/gnus/gnus-sum.el (gnus-article-sort-by-rsv):
(gnus-thread-sort-by-rsv): New functions to allow sorting by rsv in
nnselect groups.

7 years agoRemove obsolete variable nnselect-summary-line-format
Andrew G Cohen [Thu, 4 May 2017 06:34:42 +0000 (14:34 +0800)]
Remove obsolete variable nnselect-summary-line-format

* lisp/gnus/nnselect.el (nnselect-summary-line-format): This variable
is no longer needed.

7 years agoUse fetch-old-headers group parameter in nnselect
Andrew G Cohen [Tue, 2 May 2017 02:33:59 +0000 (10:33 +0800)]
Use fetch-old-headers group parameter in nnselect

* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Use
gnus-fetch-old-headers parameter for original article group.

7 years agoDisable nnselect-server-opened check
Andrew G Cohen [Sat, 29 Apr 2017 02:03:11 +0000 (10:03 +0800)]
Disable nnselect-server-opened check

* lisp/gnus/nnselect.el (nnselect-server-opened): Always return t for
now. This is disabled for testing purposes.
(nnselect-possibly-change-group): Eliminate unnecessary test for
server openness.

7 years agoImprove nnselect-request-article
Andrew G Cohen [Sat, 29 Apr 2017 01:50:20 +0000 (09:50 +0800)]
Improve nnselect-request-article

* lisp/gnus/nnselect.el (nnselect-request-article): Rework to prepare
for universal search language.
(nnselect-request-thread): Remove duplicate declare-function.

7 years agoRemove unnecessary check gnus-nnselect-group-p
Andrew G Cohen [Fri, 28 Apr 2017 23:49:39 +0000 (07:49 +0800)]
Remove unnecessary check gnus-nnselect-group-p

* lisp/gnus/gnus-msg.el (gnus-setup-message):
* lisp/gnus/gnus-sum.el (gnus-summary-line-format-alist): No need to
check that we are coming from an nnselect group now that we use
gnus-newsgroup-selection.

7 years agoDon't stomp on local variables in gnus-msg
Andrew G Cohen [Fri, 28 Apr 2017 23:43:54 +0000 (07:43 +0800)]
Don't stomp on local variables in gnus-msg

* lisp/gnus/gnus-msg.el (gnus-setup-message):
(gnus-msg-mail):
(gnus-group-mail):
(gnus-group-post-news):
(gnus-summary-news-other-window):
(gnus-summary-post-news): Use let rather than setq for temporary
overriding of gnus-newsgroup-name.

7 years agoIntroduce summary-local variable gnus-newsgroup-selection
Andrew G Cohen [Thu, 27 Apr 2017 07:15:24 +0000 (15:15 +0800)]
Introduce summary-local variable gnus-newsgroup-selection

* lisp/gnus/gnus-sum.el (gnus-newsgroup-selection): Introduce a new
gnus-summary-local-variable to hold an nnselect article list.
* lisp/gnus/nnselect.el: Use the summary-local variable where
appropriate.

7 years agoRestore article retrieval by message-id in nnselect
Andrew G Cohen [Tue, 25 Apr 2017 05:10:41 +0000 (13:10 +0800)]
Restore article retrieval by message-id in nnselect

* lisp/gnus/nnselect.el (nnselect-request-article): If passed a
message-id attempt to find an article by searching.

; Silence byte-compiler

* lisp/gnus/nnselect.el (nnir-run-query): declare-function to silence
byte-compiler.

7 years agoRestore article retrieval by message-id in nnselect
Andrew G Cohen [Tue, 25 Apr 2017 05:10:41 +0000 (13:10 +0800)]
Restore article retrieval by message-id in nnselect

* lisp/gnus/nnselect.el (nnselect-request-article): If passed a
message-id attempt to find an article by searching.

7 years agoFix requesting sparse articles in gnus
Andrew G Cohen [Tue, 25 Apr 2017 05:13:10 +0000 (13:13 +0800)]
Fix requesting sparse articles in gnus

* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Delete the
sparse article number from the list, not its id.

7 years agoTemporary function to ease search group creation
Andrew G Cohen [Tue, 25 Apr 2017 01:55:36 +0000 (09:55 +0800)]
Temporary function to ease search group creation

* lisp/gnus/nnselect.el (gnus-group-make-permanent-search-group):
(gnus-group-make-search-group): Allow permanent group creation.
* lisp/gnus/gnus-group.el (gnus-group-group-map): Bind it to "G g" in
the group buffer.

7 years agoDon't advertise s_client in tls.el docs
Glenn Morris [Tue, 25 Apr 2017 00:06:14 +0000 (20:06 -0400)]
Don't advertise s_client in tls.el docs

* lisp/net/tls.el (tls-end-of-info, tls-success, tls-untrusted):
Don't mention s_client in docs.
; * doc/misc/gnus.texi (Direct Functions): Comment.

7 years agoRemove s_client usage from tls.el
Rob Browning [Mon, 24 Apr 2017 23:58:45 +0000 (19:58 -0400)]
Remove s_client usage from tls.el

* lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
Ref http://bugs.debian.org/766397
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00803.html

; Backport this to Emacs 25.3, if there is one

7 years agoFurther robustify cedet bootstrap to loaddefs not yet built
Glenn Morris [Mon, 24 Apr 2017 23:51:20 +0000 (19:51 -0400)]
Further robustify cedet bootstrap to loaddefs not yet built

* lisp/cedet/semantic/util.el (semantic-something-to-tag-table):
Avoid void-function error when bootstrapping and semantic/loaddefs.el
does not yet exist.

7 years agoFix XBM colour rendering in NS port (bug#22060)
Alan Third [Mon, 24 Apr 2017 09:23:28 +0000 (10:23 +0100)]
Fix XBM colour rendering in NS port (bug#22060)

src/nsimage.m (setXBMColor): Fix calculation of xbm_fg.

7 years agoAdd support for IRCv3 message tags.
Vibhav Pant [Mon, 24 Apr 2017 06:27:46 +0000 (11:57 +0530)]
Add support for IRCv3 message tags.

* erc-backend.el:
  erc-response: Add `tags' element.
  Add (erc-parse-tags).
  (erc-parse-server-response): Use (erc-parse-tags) to parse message
  tags (if any), and store them in `erc-resopnse' struct.

* erc.el: (erc-display-message): Expose message tags with text
  properties of the corresponding message line.

7 years agoAdd image sizing tests for an image that's narrow
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:56:31 +0000 (07:56 +0200)]
Add image sizing tests for an image that's narrow

7 years agoNeedlessly refactor tests for clarity
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:47:09 +0000 (07:47 +0200)]
Needlessly refactor tests for clarity

7 years ago; Clean up parameter input for nnselect groups
Andrew G Cohen [Mon, 24 Apr 2017 02:53:07 +0000 (10:53 +0800)]
; Clean up parameter input for nnselect groups

* lisp/gnus/nnselect.el (nnselect-request-create-group): Better
argument parsing.

7 years agoMerge branch 'nnselect' into feature/gnus-select
Andrew G Cohen [Mon, 24 Apr 2017 01:28:32 +0000 (09:28 +0800)]
Merge branch 'nnselect' into feature/gnus-select

7 years agoAdd missing remappings for Ido mode
Philipp Stephani [Thu, 20 Apr 2017 13:41:15 +0000 (15:41 +0200)]
Add missing remappings for Ido mode

Among others, add a remapping for C-x 4 d, cf. Bug#26360.

* lisp/ido.el (ido-mode): Remap missing commands.
(ido-file-internal, ido-visit-buffer): Add support for new
methods.
(ido-display-buffer-other-frame)
(ido-find-alternate-file-other-window, ido-dired-other-window)
(ido-dired-other-frame): New commands.

* test/lisp/ido-tests.el (ido-tests--other-window-frame): Add unit
test for the bindings.

7 years ago; Silence byte-compiler
Andrew G Cohen [Sun, 23 Apr 2017 12:08:29 +0000 (20:08 +0800)]
; Silence byte-compiler

* lisp/gnus/nnir.el: Require gnus.
(gnus-request-list): Autoload.
* lisp/gnus/nnselect.el: Require gnus-art.
(nnselect-request-set-mark): Use cl-destructuring-bind.
(nnir-run-query): Declare function.
(nnselect-request-thread): Use cl-incf.
(nnselect-push-info): Use cl-decf.

7 years agoInitial landing of gnus nnselect backend
Andrew G Cohen [Sun, 23 Apr 2017 10:35:04 +0000 (18:35 +0800)]
Initial landing of gnus nnselect backend

This is a new virtual backend for gnus, wherein any collection of
articles can be viewed as a gnus group (permanent or ephemeral).

* lisp/gnus/nnselect.el: New file.
* lisp/gnus/nnir.el: Remove the nnir backend but leave the search
functions.
* lisp/gnus/nnimap.el: Replace nnir backend related items with
nnselect.
(gnus-refer-thread-use-search): Renamed from gnus-refer-thread-use-nnir
(nnselect-search-thread): New function.
(nnimap-request-thread): Use it.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group): New function
replacing gnus-group-make-nnir-group.
* lisp/gnus/gnus-msg.el: Replace nnir backend related items with
nnselect.
(gnus-setup-message): Pass virtual group article number to
gnus-inews-add-send-actions.
* lisp/gnus/gnus-registry.el (gnus-registry-action): Find the
originating article group when in an nnselect group.
(gnus-registry-ignore-group-p): Ignore virtual groups.
* lisp/gnus/gnus-srvr.el (gnus-group-make-search-group): Use new
function.
* lisp/gnus/gnus-sum.el (nnselect-article-): Use new nnselect backend
functions.
(gnus-summary-line-format-alist): Rework specs specific to nnselect
groups.
(nnselect-artlist):
(gnus-summary-local-variables): A new group-local variable.

7 years agoLet w32_mouse_position pick a child window only if it has a child frame
Martin Rudalics [Sun, 23 Apr 2017 08:52:56 +0000 (10:52 +0200)]
Let w32_mouse_position pick a child window only if it has a child frame

* src/w32term.c (w32_mouse_position): When using a frame found
by ChildWindowFromPoint make sure it's a child frame (Bug#26615,
maybe).

7 years agoDon't require bytecomp for running ert tests
Noam Postavsky [Wed, 5 Apr 2017 03:48:42 +0000 (23:48 -0400)]
Don't require bytecomp for running ert tests

"Fix ert-tests when running compiled" 2016-12-06 accidentally
introduced a dependency on `bytecomp' into `ert'.  As mentioned in
"Avoid ert test failures" 2017-04-18, the accidental dependency of ert
on bytecomp was masked by loading other libraries until recently.

* lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
`byte-compile-macro-environment' if it's bound.
* test/src/eval-tests.el: Add defvar for dynamic variable
`byte-compile-debug'.

7 years agoEliminate unneeded warp-to-article in gnus article referral
Andrew G Cohen [Sun, 23 Apr 2017 01:05:49 +0000 (09:05 +0800)]
Eliminate unneeded warp-to-article in gnus article referral

* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread):
(gnus-summary-refer-article): Remove gnus-warp-to article call.

7 years agoAllow limiting gnus summary buffers to a thread
Andrew G Cohen [Sun, 23 Apr 2017 00:25:02 +0000 (08:25 +0800)]
Allow limiting gnus summary buffers to a thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Include
an optional argument to allow limiting the summary buffer to just the
thread-related articles.
(gnus-refer-thread-limit-to-thread): Introduce customizable variable
to control whether thread-referral adds the thread to the summary
buffer or limits to just the thread.
(gnus-summary-refer-thread): Use the new variable.

7 years agoCorrect gnus-newsgroup-limits in gnus when including thread
Andrew G Cohen [Sun, 23 Apr 2017 00:13:09 +0000 (08:13 +0800)]
Correct gnus-newsgroup-limits in gnus when including thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Should
only add one list of thread-related articles to gnus-newsgroup-limits
rather than two.

7 years agoImprove gnus thread matching of similar subjects
Andrew G Cohen [Sun, 23 Apr 2017 00:07:22 +0000 (08:07 +0800)]
Improve gnus thread matching of similar subjects

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread):
Use the more liberal gnus-general-simplify-subject regexp to
find thread articles with similar subjects.

7 years ago; Merge: improve indent-sexp and lisp-indent-region performance
Noam Postavsky [Sat, 22 Apr 2017 18:10:58 +0000 (14:10 -0400)]
; Merge: improve indent-sexp and lisp-indent-region performance

7 years agoAdd new `lisp-indent-region' that doesn't reparse the code.
Noam Postavsky [Thu, 16 Mar 2017 02:27:27 +0000 (22:27 -0400)]
Add new `lisp-indent-region' that doesn't reparse the code.

Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss'
to get initial state, so they will no longer indent string literal
contents.

* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like
`syntax-ppss', but with a more dependable item 2.
(lisp-indent-region): New function, like `indent-region-line-by-line'
but additionally keep a running parse state to avoid reparsing the
code repeatedly.  Use `lisp-ppss' to get initial state.
(lisp-indent-line): Take optional PARSE-STATE argument, pass it to
`calculate-lisp-indent', use `lisp-ppss' if not given.
(lisp-mode-variables): Set `indent-region-function' to
`lisp-indent-region'.

7 years agoRemove ignored argument from lisp-indent-line
Noam Postavsky [Thu, 16 Mar 2017 01:59:13 +0000 (21:59 -0400)]
Remove ignored argument from lisp-indent-line

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP
argument, the behavior has long since been handled in
`indent-for-tab-command'.  Also remove redundant `beg' and `shift-amt'
variables and use `indent-line-to'.

7 years ago* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.
Noam Postavsky [Thu, 16 Mar 2017 02:35:47 +0000 (22:35 -0400)]
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.

7 years agoDon't reparse the sexp in indent-sexp (Bug#25122)
Noam Postavsky [Mon, 13 Mar 2017 03:59:19 +0000 (23:59 -0400)]
Don't reparse the sexp in indent-sexp (Bug#25122)

* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let
PARSE-START be a parse state that can be reused.
(indent-sexp): Pass the running parse state to calculate-lisp-indent
instead of the sexp beginning position.  Saving the
CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer
needed.  Don't bother stopping if we don't descend below init-depth,
since we now alway scan the whole buffer (via syntax-ppss) anyway.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank
line to test case.

7 years agoAdd cond test cases for singleton clauses.
Vibhav Pant [Sat, 22 Apr 2017 16:21:43 +0000 (21:51 +0530)]
Add cond test cases for singleton clauses.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add test cond forms where
  the default clause is a single non-nil expression.

7 years agob-c--cond-jump-table-info: Use correct body for singleton clauses
Vibhav Pant [Sat, 22 Apr 2017 15:08:53 +0000 (20:38 +0530)]
b-c--cond-jump-table-info: Use correct body for singleton clauses

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
When a clause's body consists of a single constant expression, use
that expression as the body to be compiled. This fixes switch bytecode
evaluating to nil to such clauses.

7 years agoffap: Don't switch window unless needed
Philipp Stephani [Sun, 8 Jan 2017 18:44:22 +0000 (19:44 +0100)]
ffap: Don't switch window unless needed

When using ffap-other-window, don't change the window configuration
unless a new buffer has actually been created (Bug#25352).

* lisp/ffap.el (ffap-other-frame): Don't change the window
configuration if no new buffer has been created.
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352): Add unit
test.

7 years agoFix fontification of C++ declaration with type FOO::FOO.
Alan Mackenzie [Sat, 22 Apr 2017 14:45:24 +0000 (14:45 +0000)]
Fix fontification of C++ declaration with type FOO::FOO.

* lisp/progmodes/cc-engine.el (c-find-decl-spots): Initialize
cfd-top-level properly.
(c-forward-decl-or-cast-1): On finding FOO::FOO, check it is followed by "("
before deciding it is a constructor.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Negate the
result of the c-bs-at-toplevel-p call passed to c-font-lock-declarators
(simple bug fix).

7 years agoFix usage of FRAME_Z_GROUP
Philipp Stephani [Sat, 22 Apr 2017 11:54:08 +0000 (13:54 +0200)]
Fix usage of FRAME_Z_GROUP

* src/nsterm.m (initFrameFromEmacs:): FRAME_Z_GROUP does not return a
Lisp object, cf. Bug#26597.

7 years agoFix GNUstep build
Alan Third [Sat, 22 Apr 2017 09:42:35 +0000 (10:42 +0100)]
Fix GNUstep build

* src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep
compatibility.
* src/nsmenu.m (update_frame_tool_bar): Remove unused variable.

7 years agoAdd no-accept-focus and frame-list-z-order to NS port
Alan Third [Thu, 20 Apr 2017 14:25:56 +0000 (15:25 +0100)]
Add no-accept-focus and frame-list-z-order to NS port

* lisp/frame.el (frame-list-z-order): Add NS.
* src/nsfns.m: Add x_set_no_accept_focus to handler struct.
(Fx_create_frame): Handle no-accept-focus parameter.
(ns_window_is_ancestor):
(Fns_frame_list_z_order): New functions.
* src/nsterm.m (x_set_no_accept_focus): New function.
(initFrameFromEmacs): Use EmacsWindow instead of EmacsFSWindow for
non-fullscreen windows.
(EmacsWindow:canBecomeKeyWindow): New function.

7 years agoImprove prefix handling for dash.el
Stefan Monnier [Fri, 21 Apr 2017 16:14:59 +0000 (12:14 -0400)]
Improve prefix handling for dash.el

* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
Don't drop dash's "-<letter>" prefixes.

7 years ago* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet
Stefan Monnier [Fri, 21 Apr 2017 16:12:42 +0000 (12:12 -0400)]
* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet

Revert 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (to fix bug#26325)
and use a different fix for bug#26068.
(cl--symbol-macro-key): New function.
(cl--sm-macroexpand, cl-symbol-macrolet): Use it instead of `symbol-name`.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet):
Failure is not expected any more.

7 years agoAvoid infinite loop in redisplay when header-line-format is invalid
Eli Zaretskii [Fri, 21 Apr 2017 08:10:14 +0000 (11:10 +0300)]
Avoid infinite loop in redisplay when header-line-format is invalid

* src/xdisp.c (handle_invisible_prop): Avoid inflooping when the
string has an invalid %-construct in it and is displayed as part
of mode-line or header-line.  (Bug#26586)