From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Proposal to change cursor appearance to indicate region activation Date: Fri, 23 Jan 2015 11:40:55 +0000 Message-ID: References: <83iofxu7za.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422013328 1846 80.91.229.3 (23 Jan 2015 11:42:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 11:42:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 23 12:42:08 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YEcco-00086K-8O for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 12:42:06 +0100 Original-Received: from localhost ([::1]:58250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEccn-0006Ca-F6 for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 06:42:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEccj-0006CL-V9 for emacs-devel@gnu.org; Fri, 23 Jan 2015 06:42:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEccj-0007fp-2m for emacs-devel@gnu.org; Fri, 23 Jan 2015 06:42:01 -0500 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:49260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcce-0007fH-DM; Fri, 23 Jan 2015 06:41:56 -0500 Original-Received: from mfilter13-d.gandi.net (mfilter13-d.gandi.net [217.70.178.141]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 6E619FB8C7; Fri, 23 Jan 2015 12:41:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter13-d.gandi.net Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter13-d.gandi.net (mfilter13-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id GMZfMvcBqX0n; Fri, 23 Jan 2015 12:41:54 +0100 (CET) X-Originating-IP: 66.220.3.179 Original-Received: from localhost (gm179.geneticmail.com [66.220.3.179]) (Authenticated sender: kelly@prtime.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DE00CFB8CA; Fri, 23 Jan 2015 12:41:52 +0100 (CET) In-reply-to: <83iofxu7za.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4b98:c:538::198 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181662 Archived-At: Eli Zaretskii wrote: >> +(add-hook 'emacs-startup-hook #'maybe-disable--dynamic-cursor) > > Isn't there a way to do this that avoids using hooks? I think using > hooks in standard features should be avoided. Hooks are for > customizing Emacs. I don't know, but there's already a bunch of stuff in Emacs that uses emacs-startup-hook and after-init-hook, so I assumed that's the way I'm supposed to do it. But Stefan and I agree that maybe-disable--dynamic-cursor in particular is ugly, and I recommend not using it. I just wrote it to satisfy a requirement he gave (avoiding trampling on the user's setting of cursor-type in his init file) if dynamic-cursor defaults to t. I recommend defaulting dynamic-cursor to nil, which avoids the need for maybe-disable--dynamic-cursor, because the latter doesn't solve the general problem (the user might set cursor-type even after startup) and Emacs provides no way to solve it. I originally recommended defaulting dynamic-cursor to t, because I missed the problem (the trampling) that he pointed out.