From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: BUG 20703 further evidence Date: Thu, 14 Jan 2016 00:50:52 +0300 Message-ID: <5696C6BC.6060609@yandex.ru> References: <5ab4af6b-5b7d-40f9-b49f-2d8cc6926e9f@googlegroups.com> <5a73d376-ec6e-4ad3-8575-667629306d55@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1452721881 29134 80.91.229.3 (13 Jan 2016 21:51:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2016 21:51:21 +0000 (UTC) To: Sam Halliday , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 13 22:51:13 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aJTJw-0001gp-Bh for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jan 2016 22:51:12 +0100 Original-Received: from localhost ([::1]:39322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJTJv-0003bO-DY for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jan 2016 16:51:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJTJk-0003bI-7l for help-gnu-emacs@gnu.org; Wed, 13 Jan 2016 16:51:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJTJf-0008Ic-5n for help-gnu-emacs@gnu.org; Wed, 13 Jan 2016 16:51:00 -0500 Original-Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:36293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJTJe-0008Hb-QQ for help-gnu-emacs@gnu.org; Wed, 13 Jan 2016 16:50:55 -0500 Original-Received: by mail-lb0-x22a.google.com with SMTP id oh2so299094762lbb.3 for ; Wed, 13 Jan 2016 13:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=YEJ2akpWBb02xQeNLjrnkk+hz/CJ1EFZRVT7PnphcTc=; b=i5L64cI3S83Y8oMBlm9/ZrY0i6uoHqYmTCK3+9FvdVuXHaA5bG798qT/80OyDU8u2q U9RJYoc1hMHnsLWNOFClvlhwt7J7IHrxrx0ivy4Pd30VC7tSt6p38hDsYF6mGi5ygmKR +z/2N2P1Wu5Jcc7LMwQuXPkzcEnRFArNwuBHVGp+uNeV8/dMvDHO0vmgjLzZNOON6Ykp Qi9hX+N7EvSWRE+90MN6aLx9ZsCt5/QVn4Ri0FQ3IV9rrtVQy5QhcSuulPGKRbC6oyKT 2702ODiXnD6e7/1/sfMqj+y8RQaCoG5kJBCHUFDhw9KDoG+owl5JcBOcsSiLrIS89Zc6 oxkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=YEJ2akpWBb02xQeNLjrnkk+hz/CJ1EFZRVT7PnphcTc=; b=NZxEZcrMGsJIHAB0Pd3nNQtlpqn19OtH5SnVyg0W7IWknegOPapVRb24macVcXpESo JFrs+IkTShPiKFiO5GD4eB08YuC7tDXnKfLOD/2wFcjLLC6OMCsl4PHN3XannDzIlvQm 0DF4eelurxRi0l6wY7Ctvlwmae0vZcPkwV2UVNXYZXfPXHkmj6vIiV1RmBivPyNnRTND w4u7ot0IQDbcvfDGkfS8is8xR0+F5lcRUN+0nazLs96KYgUPg/8DhtCgn7Y+nJDsUE6Q SKXE2EJL9xuFz5MKkY0Ec4dLnVBuyUX79rD6oU7np7oEJRDNpx8bPYbUkJj0cNIoggUz /9Jg== X-Gm-Message-State: ALoCoQk3kOBgAQe4egmsckGVyxdmjpfxjldRtv6ENnN9fd+grIog98NOMiBykdcXRI67ywW+cHG3PvjXDgG8sPVAA8SJXFd/4A== X-Received: by 10.112.209.2 with SMTP id mi2mr134607lbc.139.1452721853753; Wed, 13 Jan 2016 13:50:53 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id nv8sm389381lbb.7.2016.01.13.13.50.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jan 2016 13:50:52 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 In-Reply-To: <5a73d376-ec6e-4ad3-8575-667629306d55@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22a X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108721 Archived-At: On 01/14/2016 12:36 AM, Sam Halliday wrote: > The approach that sounds most sensible for my use case sounds like just excluding that one file from indexing, because I can do that from my .ctags. I actually hadn't thought of it until you mentioned it! I've suggested it before, in a comment to the bug in question: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20703#26 > I was thinking along the lines of a function that deletes all the long lines from a TAGS file, part of a validation / cleanup phase. If you have a recipe in mind for that, it would be pretty useful. That code still has to be written. Maybe after 25.1? > Could you please copy out your proposed changes in full? I won't be applying them against their sources, I'll just put them in my scratch and execute in the running instance. Try replacing these definitions: (defvar etags--table-line-limit 500) (defun etags-tags-completion-table () ; Doc string? (let (table (progress-reporter (make-progress-reporter (format "Making tags completion table for %s..." buffer-file-name) (point-min) (point-max)))) (save-excursion (goto-char (point-min)) ;; This regexp matches an explicit tag name or the place where ;; it would start. (while (not (eobp)) (if (not (re-search-forward "[\f\t\n\r()=,; ]?\177\\\(?:\\([^\n\001]+\\)\001\\)?" ;; Avoid lines that are too long (bug#20703). (+ (point) etags--table-line-limit) t)) (forward-line 1) (push (prog1 (if (match-beginning 1) ;; There is an explicit tag name. (buffer-substring (match-beginning 1) (match-end 1)) ;; No explicit tag name. Backtrack a little, ;; and look for the implicit one. (goto-char (match-beginning 0)) (skip-chars-backward "^\f\t\n\r()=,; ") (prog1 (buffer-substring (point) (match-beginning 0)) (goto-char (match-end 0)))) (progress-reporter-update progress-reporter (point))) table)))) table)) (defun tags-completion-table () "Build `tags-completion-table' on demand. The tags included in the completion table are those in the current tags table and its (recursively) included tags tables." (or tags-completion-table ;; No cached value for this buffer. (condition-case () (let (current-table combined-table) (message "Making tags completion table for %s..." buffer-file-name) (save-excursion ;; Iterate over the current list of tags tables. (while (visit-tags-table-buffer (and combined-table t)) ;; Find possible completions in this table. (setq current-table (funcall tags-completion-table-function)) ;; Merge this buffer's completions into the combined table. (if combined-table (mapatoms (lambda (sym) (intern (symbol-name sym) combined-table)) current-table) (setq combined-table current-table)))) (message "Making tags completion table for %s...done" buffer-file-name) ;; Cache the result in a buffer-local variable. (setq tags-completion-table combined-table)) (quit (message "Tags completion table construction aborted.") (setq tags-completion-table nil)))))