From unknown Thu Jun 19 14:06:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63438 <63438@debbugs.gnu.org> To: bug#63438 <63438@debbugs.gnu.org> Subject: Status: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Reply-To: bug#63438 <63438@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:06:03 +0000 retitle 63438 30.0.50; abbrev mode wrongly capitalizes with mixed capitaliz= ed words reassign 63438 emacs submitter 63438 Daniel Fleischer severity 63438 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 03:11:00 2023 Received: (at submit) by debbugs.gnu.org; 11 May 2023 07:11:00 +0000 Received: from localhost ([127.0.0.1]:49581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px0S4-0003wO-39 for submit@debbugs.gnu.org; Thu, 11 May 2023 03:11:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:53560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px0S1-0003wF-7L for submit@debbugs.gnu.org; Thu, 11 May 2023 03:10:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px0Rx-00036c-JN for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 03:10:53 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px0Rw-0008Vp-8X for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 03:10:53 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1px0Rr-0004vD-Q8 for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 09:10:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Daniel Fleischer Subject: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 10:10:40 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:a+zmpaO4FXgsH8iVA1M/igBCYl0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Recipe for recreating: - Add some abbrev definition with mixed capitalization, e.g. "abc" should expand to "aBC". - Enable abbrev-mode. - Write "aBC". - Upon pressing space, abbrev-mode converts it into "ABC". There is a code section in `abbrev-insert' that explicitly capitalizes the first letter; I'm sure it's there for a reason but I think the behavior I showed is unexpected. As for the example "aBC", there are real use cases, just to mention one "iPhone". -- Daniel Fleischer From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 04:29:03 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 08:29:03 +0000 Received: from localhost ([127.0.0.1]:49670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px1fb-0006Lk-AO for submit@debbugs.gnu.org; Thu, 11 May 2023 04:29:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px1fV-0006LB-AX; Thu, 11 May 2023 04:29:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px1fQ-00060y-1D; Thu, 11 May 2023 04:28:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=l/A2YVHkJgLvYEkWR91W7+8YiW8wJi6wDQ74DEaYN3g=; b=ODUUgMcBKc+1 TQ2VmC0gY5sgKrTi6Wahhu+oEUh0fpJ9fwp3BNaj7zql3ShiAfYNF2d4Av6Z6EJmRrDsMfU0JGdXs 4CK18FJNOwUFEdl5uagcLYVyM6LySiVbY+kPRvOuW4zhDqB57rLNqdWnibuTLr5f5djOcGqEIjXA4 GjBORnqQ492zcE2z0ikkjAliZ9bdFsAShH6mVzmsOgjNcgL/pVBjuAPxcEePq+q2ZuI66osZVzVAH BaiGBY+2QSxSwQ33gqeYJ9zLVjYcmrgseeaCLPE+CZQOWptaGGaDRG1PnyVxyI3ME9vZrOX9ZihFs g+xaDfOTJEE2nyTwKUdn4A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px1fP-00037Z-H1; Thu, 11 May 2023 04:28:51 -0400 Date: Thu, 11 May 2023 11:29:59 +0300 Message-Id: <83sfc35kzc.fsf@gnu.org> From: Eli Zaretskii To: Daniel Fleischer In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 10:10:40 +0300) Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 63438 wishlist thanks > From: Daniel Fleischer > Date: Thu, 11 May 2023 10:10:40 +0300 > > Recipe for recreating: > > - Add some abbrev definition with mixed capitalization, e.g. "abc" > should expand to "aBC". > - Enable abbrev-mode. > - Write "aBC". > - Upon pressing space, abbrev-mode converts it into "ABC". > > There is a code section in `abbrev-insert' that explicitly capitalizes > the first letter; I'm sure it's there for a reason but I think the > behavior I showed is unexpected. As for the example "aBC", there are > real use cases, just to mention one "iPhone". What you see is the documented behavior: by default, if the abbrev was triggered by a word that has some upper-case letters in it, Emacs capitalizes the first letter of every word in the expansion (you can optionally set abbrev-all-caps non-nil to up-case all the letters in the expansion). In your case, capitalizing the first letter of "aBC" yields "ABC", and that's what you see. What did you expect to happen instead? From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 05:10:44 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 09:10:44 +0000 Received: from localhost ([127.0.0.1]:49717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px2Jv-00040e-OC for submit@debbugs.gnu.org; Thu, 11 May 2023 05:10:44 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:55560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px2Jp-00040K-ID for 63438@debbugs.gnu.org; Thu, 11 May 2023 05:10:42 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3063433fa66so5404532f8f.3 for <63438@debbugs.gnu.org>; Thu, 11 May 2023 02:10:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683796231; x=1686388231; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=SENvFjFLMOeDMFwstHYqpK4l8lMe0J0VlClm0uJnQHU=; b=qsR/xqVRNgy/m5ipwBrf5FOXczJBBoVHiGrNymRM07KvN6qklO6VQ+4WKiYhUk4Nno t7F/q7PkfgYt4BFXlzZfsuOHfK2rPrrKDfk2suxDOvS4Fq4klLmleohdGfsl7ePAJXeD h84B0rngdfEMN1S9vnD6HrxROH4+2nivp7jAsn9UxSODJyV/h31kRv2oqIllkE9OxyfX 69y0UZD41mRpYRtcmpkP+APc5zZ7vg3vFv4xV/Obx3Wti2xGo7ZnawS4iH+XJ3ln9kQX 4mucLDjHZEbFLQKqEzIF76qZnJT9/2URysPqmswE2vgQnQ31/AQbyYE7XA59amwSFy6W SRig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683796231; x=1686388231; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SENvFjFLMOeDMFwstHYqpK4l8lMe0J0VlClm0uJnQHU=; b=elWH9A9p0pDSl+niDEX6WmWcYSovptjmhvFaKaJ8yULOq4OE/43HJ8dJg4PMJrptPm D5QdDFSzDhHbm1xZevec65kbo+bW31IEIv4xi1q3DZLe5lmsuLBHlpYu3zlcvznfYVPm 0oihPOO5/89QyL8egPwUb4qyyZCgnYQQwGLRYtujI22mimCyn0Cj2tyPilYoLPwh+a8N XzYv9UspW/agFz6wYBh1EIBqAOWfRBpW47F7RP5coY8NYAVkwCvi/lK4Hmc6SaDFeqjr 7hMVv/+H9KKQYUdXyUnSsjxV7zRw8Z2WrGzqwWqLwu3TLhIL3Wl1xV/fPeL0KgANocC2 H0eg== X-Gm-Message-State: AC+VfDxPDh61OFUnitR6W53MSXN4sAXBcaUkY9i+E0kxOxns7/pSCWrc muCn4I1Byb2g+wdc9rvJLuuUtuNq+VatwQ== X-Google-Smtp-Source: ACHHUZ6L+VV3T99na/+PhAMKV5TFCYGgi9gkkYgDh2WgZsk+Oh2UocUUe+srULgTVCjZvzLd64raoA== X-Received: by 2002:adf:e948:0:b0:2fe:e137:dbad with SMTP id m8-20020adfe948000000b002fee137dbadmr12686785wrn.51.1683796231396; Thu, 11 May 2023 02:10:31 -0700 (PDT) Received: from Home-Mac ([141.226.162.146]) by smtp.gmail.com with ESMTPSA id e1-20020adfdbc1000000b0030795249ffasm12295577wrj.92.2023.05.11.02.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 02:10:30 -0700 (PDT) References: <83sfc35kzc.fsf@gnu.org> User-agent: mu4e 1.11.4; emacs 30.0.50 From: Daniel Fleischer To: Eli Zaretskii Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 12:00:39 +0300 In-reply-to: <83sfc35kzc.fsf@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii [2023-05-11 Thu 11:29] wrote: > What you see is the documented behavior: by default, if the > abbrev was > triggered by a word that has some upper-case letters in it, > Emacs > capitalizes the first letter of every word in the expansion (you > can > optionally set abbrev-all-caps non-nil to up-case all the > letters in > the expansion). In your case, capitalizing the first letter of > "aBC" > yields "ABC", and that's what you see. > > What did you expect to happen instead? I would expect *nothing* to happen; abbrev is key-value mapping; you write a key and it replaces it with a value. If you write a word that is not a key, you expect nothing to happen. In this case, the word is one of the values, and suddenly something happens, unexpectedly. I know realize that words are compared with keys ignoring the case, but using the case in the expansion. Still, if a user writes a word identical to one the abbrev "keys", I would expect abbrev to leave it as is. Thanks, Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 06:38:53 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 10:38:53 +0000 Received: from localhost ([127.0.0.1]:49797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px3hE-0006fS-Lv for submit@debbugs.gnu.org; Thu, 11 May 2023 06:38:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px3hA-0006fE-RV for 63438@debbugs.gnu.org; Thu, 11 May 2023 06:38:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px3h4-0008DE-Ad; Thu, 11 May 2023 06:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CzDJ+OScJqaMBi624SKNxzQVnaUidoRh1YPtU8YVM5w=; b=jjtGUkN6wnN0 Cd1KlrXDCTKUu01PLg3pE4hcjTxBi9HAe0n58814wCV42NA53EdzwHJgbMieick87x6mQ4yxqL+9L OONuWxDtk8xgxgIluhWd6TelnxadQbbHC1/XH97jKffiX02hOFtwjR/jwAbKZbsTP34oc1jxORj1K P4vlKi2zRb9TByQubPnziqKRC4ZHzknpERsYifgiQAj3E65FYtEsWdpOcEkAWjiCSsIND9Z8CrLHl XvSdkwx/S2rDp3kirWxJ43q4PNw663CmruxAuRtPSvA1MXnnBCC0VcPEZOamEI2WH2eegfTlLYik9 xtkByDfvcxXCaHjHz/O6eA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px3h3-0003FP-RM; Thu, 11 May 2023 06:38:42 -0400 Date: Thu, 11 May 2023 13:39:50 +0300 Message-Id: <83fs835eyx.fsf@gnu.org> From: Eli Zaretskii To: Daniel Fleischer In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 12:00:39 +0300) Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: <83sfc35kzc.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Fleischer > Cc: 63438@debbugs.gnu.org > Date: Thu, 11 May 2023 12:00:39 +0300 > > > Eli Zaretskii [2023-05-11 Thu 11:29] wrote: > > > What did you expect to happen instead? > > I would expect *nothing* to happen; abbrev is key-value mapping; you > write a key and it replaces it with a value. If you write a word > that is not a key, you expect nothing to happen. In this case, the > word is one of the values, and suddenly something happens, > unexpectedly. I know realize that words are compared with keys > ignoring the case, but using the case in the expansion. Still, if a > user writes a word identical to one the abbrev "keys", I would > expect abbrev to leave it as is. I guess there's a place for a new defcustom, under which no case-conversion will happen at abbrev expansion time, ever. Is that what you want? That is, if you have an abbrev foo -> foobarical, then typing "Foo" or "FOO" will produce a literal "foobarical", each and every time? From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 07:17:47 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 11:17:47 +0000 Received: from localhost ([127.0.0.1]:49878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4It-0007qJ-9S for submit@debbugs.gnu.org; Thu, 11 May 2023 07:17:47 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:54351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4Ir-0007q6-DA for 63438@debbugs.gnu.org; Thu, 11 May 2023 07:17:45 -0400 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f417ea5252so41575105e9.0 for <63438@debbugs.gnu.org>; Thu, 11 May 2023 04:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683803859; x=1686395859; h=mime-version:message-id:in-reply-to:user-agent:references:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=MPxr4EmiiIFDkalaEkiaq8KU+SbWW3nTl/bgjSsg5uU=; b=O/vLgq+qkIlb3VXED0Ig4WF02kMDmLqQTIG4lXs2nUnP6tmBxr7B5dOJrfQTS/an8P QLNeItDl9/ccjSHn4hruVesBvoNi17NHS2ABlmyOdVhGn7GoP1fqlaHzgfsD2Lcs46T7 KKdxir97JbPr3/tzdrX6Sj7Wc7NA0OSzH8yobFGsf6Z3qwiOV8ijmkBRKxK1XRZQpWR9 u9yJ+fC6W+HUOVKSDs7rLJKD3S0oShY9ZdMx2rn9rD4lqpBM/vWm2jGajFA5AHwSPfbE zR6cI52z09xc1Dvs9nT8pPTaggIKrhuy9oijF/VUx/SxwBsAZ1G/vX/saUvHDWi3JfpQ 9Rfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683803859; x=1686395859; h=mime-version:message-id:in-reply-to:user-agent:references:date :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MPxr4EmiiIFDkalaEkiaq8KU+SbWW3nTl/bgjSsg5uU=; b=TgPbRZaiZMRwk2rLZcqp+eo/R/a8ytGglz5SG0xf+uHKecBYkoE0crQPtW19MZjI3v umMaENF+t7+OVrvKoxFNYr4ywADvE+duFaZWAKaLrtU9N/7a3jvu1ig1P7xtesVkAmxy 3DhUanoNNdytJcx3ZWHO+X3woUq4iMb4lEbmNwNNMMk1UU/6jU7S7yJFEODqQyqYnuL+ 4gfLo1TkCaJev4+WsJ6ESKy5ubLLY82gXLtYt1MITv56J7lCAOfl4zN56O5nb1rOd32f XbAvaMVA40NKmfiERwsD7d4oGo5dw9vrUDeaSWZpVI0wD4l8lUG6aR+bs4DFaIroFwZO Ta4g== X-Gm-Message-State: AC+VfDxQx9+YVuhcXFD+kWyGXYhppyyNlXdQx1G9xeE24S+ffqYhiJw/ SGRmGEULxpOZiKlv1qulVPTXOK17+AIxoA== X-Google-Smtp-Source: ACHHUZ7MCH5zlqznMBGubSWPrjen7osPiyZCqXXvDpXKYPuV56wA81cpnYshdYGJbuE6DGgfv5Gw6w== X-Received: by 2002:a1c:f60a:0:b0:3f1:76d0:8bb0 with SMTP id w10-20020a1cf60a000000b003f176d08bb0mr13940705wmc.36.1683803859522; Thu, 11 May 2023 04:17:39 -0700 (PDT) Received: from Home-Mac ([141.226.162.146]) by smtp.gmail.com with ESMTPSA id z24-20020a1cf418000000b003f3e50eb606sm25137507wma.13.2023.05.11.04.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 04:17:38 -0700 (PDT) From: Daniel Fleischer To: Eli Zaretskii Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 14:03:43 +0300 References: <83sfc35kzc.fsf@gnu.org> <83fs835eyx.fsf@gnu.org> User-agent: mu4e 1.11.4; emacs 30.0.50 In-reply-to: <83fs835eyx.fsf@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Disposition: inline Eli Zaretskii [2023-05-11 Thu 13:39] wrote: > I guess there's a place for a new defcustom, under which no > case-conversion will happen at abbrev expansion time, ever. Is that > what you want? That is, if you have an abbrev foo -> foobarical, then > typing "Foo" or "FOO" will produce a literal "foobarical", each and > every time? I think even simpler: make sure abbrev insertion only works when the input word is strictly (case sensitive) different than the expansion word; leave everything else as is. Example: with a rule like "foobarical -> fooBarical" then Foobarical -> FooBarical (as is today) FOOBARICAL -> FOOBARICAL (as is today) but fooBarical -> fooBarical, because it's already what we want. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 07:28:24 2023 Received: (at submit) by debbugs.gnu.org; 11 May 2023 11:28:24 +0000 Received: from localhost ([127.0.0.1]:49884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4TA-0008A4-DS for submit@debbugs.gnu.org; Thu, 11 May 2023 07:28:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:45440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4T8-00089w-Ad for submit@debbugs.gnu.org; Thu, 11 May 2023 07:28:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px4T8-0005mz-3V for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 07:28:22 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px4T6-00023h-RS for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 07:28:21 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1px4T4-00027E-FG for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 13:28:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Daniel Fleischer Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 14:28:12 +0300 Message-ID: References: <83sfc35kzc.fsf@gnu.org> <83fs835eyx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:USHI6C50zQ0pWOEu2cYSTHVb314= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Daniel Fleischer [2023-05-11 Thu 14:03] wrote: > Example: with a rule like "foobarical -> fooBarical" then > > Foobarical -> FooBarical (as is today) > FOOBARICAL -> FOOBARICAL (as is today) > > but fooBarical -> fooBarical, because it's already what we want. Maybe some context: I think some people, at least me, use abbrev mode to properly capitalize words with unique casing, needs not met by regular capitalization rules. It means abbrev keys and values sometimes contain the same word but with different casing. That's why I want nothing to happen when the user writes a word with the right casing, making an abbrev expansion unnecessary. -- Daniel Fleischer From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 07:45:21 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 11:45:21 +0000 Received: from localhost ([127.0.0.1]:49904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4jZ-0002io-EW for submit@debbugs.gnu.org; Thu, 11 May 2023 07:45:21 -0400 Received: from sonic312-25.consmr.mail.ir2.yahoo.com ([77.238.178.96]:34062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px4jW-0002iV-Fe for 63438@debbugs.gnu.org; Thu, 11 May 2023 07:45:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1683805510; bh=rcwl2EqsRpePtYSJDzrVasJa9KloE43ChrmX/HBmjSE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=thU2gnb8t6pV7FyOxmAKCbNvD3EpSwrjV3QMr0qjyWV40uJQhKIp2qsId7wmUiogWeJGwS0uEsit/PtwHFx5XMDIJDACELWzvrd5T18nXnj2INyUHm2v4E2NtBXzs6pgv4YchOC64s9Q4JPueCNJjUlzGECkvSkTgkC6lnspeJJ5ONFUWAQEPJ6efqiI/G3549sPobIsV+i7xg5wbEdj1+7yjpiNtikH0xr9aNLaUZhn4WkNDHBDmcnJmn5UPDVnEL6M5qTirfgXVSZMhEmVm+UlySA3vMs/2f59SqGQAiDC+dSxwwpdbuV0AQn6Ws6eeYxlIo9m/rKi6EDKJSbnNA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683805510; bh=mJZtJZUhjF0VmGCIiI4uTXxj+aDEczO2xfPpCNWIfgc=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HArkNxRzNvsP9vr0tdd03QIs4O3curA96P5OmS3oWPWZhWTMlEKQCAxjFIS1uP0rlbCxTidA9J6MHdumB547MsQp2jVJNbk8H5ol34H/ISrxLspBZwS+A1xrNhYQTVwv7d0rzXMpawGYKfp5S9oBIvY9DVtbimBGthQftUTwFMARpMiXHM1X7aVlYPK55ft0EGufjZXiZRm5mceMgKX7LdV9CtH+2GOwrAM7KbjhHBTFmLmbWzl6GHvxRbG1r0V6FnVsZrvQ3CM7h0vxSYaRmnzVPCz7opNgHqZN6PrWtaWitkNX4NrCI7KE1/Je3AqMPsnAV1lChEsOIipoSAfCjA== X-YMail-OSG: nvc8PRgVM1laPXOLcijaPv6acz0ns_SEa1XcrcBE3GqFSktBIkHZvlrdgLaIugk 6biwC.dQxA_xQtZRglIIKcZnwhx67PMcGZ8gwFlbn81LLgbi44LIHv77nOX3AC.OBWNs.YoROFA8 I3GSp.luKupFYd6fdzUR1SmCSvpKidZ1hCf1pUAEFXr0YNi1DaoqEK434AY5wOjbu1VxjSe5soYp GpX94ASaNHLIHK2HeCjgLn8z7sn5LqDpqh2Yoln4x8XWt1DOyj9Uf5Vw.IH.oUhtmH3Xa46uhvqV .IuqjYDxjDUgnkhSKC2oWdnLEkWxB3Zm_g3aWYRvi3w29hWzbEMF3yQ6pcsuwJbqR_eWAM1t.kI1 BBJteOWURHv.pyO4xe6gm3Ip25gkwbaQHqTov9__FNYgCguT_7N38kNx3z5WJWh2HU.asd3K5mSu rLFOnPZqgMm7XeonrX4vKTRoWdbwl10J.R84gm0qeAsLRBfHXWy0oA_BNs9HwdltRJhew0KRgfim L6HfYDeO8wj2STNWSl18VFTfwA86x3CfyHhLguoJiYtpC4HRZ64Wga.2w9U2kw1VYlgJ7Yx6VFTf 8X9s5qVjztv879HXrX2J3vMsxzw3hOfspPMFGG4tDF5hl2sAd1CLXumLEb5FTIGTYm.CyNhGVNjb GdMeXj7PlVZgV5PUDTpoU.xPmZt3DaxNrIgZgtUD7QqKaHClL1P1XuO3841W6L7neO5LR9tWAEQq Ekc7EarOsRGGob7VkWvxCnMw7ItEbkW9zobWJqa7jPkF4bo8Gf8b8XXFbjtVmv.FTG6PR.Rynf63 D9n80aBZ8JrdFF4oO5CDYNi6xM7jbUSh1xslo4uOfyWoVH4dIBb2GOjlqat7T3kV91Lpu2bkC.w3 GkmPc7vbWSF8QX0Scay35n5MZcaxEpUZgwhVidtVzVXCbkRaO.y03KzRm0Mq7MmE6MrpfoeZh42r 1gxYW3_0mNnS5ZTTzg5ZEpVMRapHwArH.bT0O7CG4WjGilejj7cGlg4o1kqQpfLPBXdawXeutJlL xi1o9cBBn6FrXWEa7SGNgw.c4YcSBDqPTO7onGRv2Tgbsw50dMEnfkaVxKX5QVBBUgAinXwuG8Jh lLobc61IoERMZxdQpTGuTIMOIqIAc2xD2lYx15J3rpXvUbBfSAhgGf9n9Yv7qpAdP1Km3f3n1Hod lSJJCpAclQz7KbH0UdhgFc2TG5PGmOusMBfgIYVpLsp2S5OkuoP9EWvZM3QzL.Mv1zCYvqihgOeh 9vHwc0ruEHVDCthcunn5Fcy4IWxgs8O0XzsAtiEnCSjNdV5pfU9UrqRakd62IxPewLXFyZ.k.IRf QCSeAcblVF.HTiIQ7EQ2v1WStRio1JYxpRWaEOy9tPDqoeRgl9hocv1yU1RW1axM.TD_6AI5tsJI w6rnHqYqG6S_MJMDPt38ENh2RvlARWP2oNzlJfMTkg6o6ALwEJqJYNHK0vbFUy6J3DuwtvoQFDxj ciBdpuZhiBZ1AKirqjaiDFU9tDZmx94GwT6K4GpD1fzl.liVHGtsYkaHAzXI6PW7hQ4maUoejpCI q36e_p49VIPMxOWsq4BSxOW5xImkNEat7OtsUUvj9vIjkKepVH1QQAG4ZsQT11fAeB7XgsX1mB3U gZbGZbzo7ePey_6ronDQclSa9ETft3esRuSD2we4YxDd94lpknNG_Zyab_DhmwQBpJSWZyeOQoLc FQloyj2gKD76rAzTtytu.majOAk1A0HIa8Ymrtn.Mj9BdvrW6t7Sd6_wybwmLDfhlhUVTaQHl0Rs 2WlsFNSjXyS3e3cHkZaqZDpTZ2Iq2EMSNIMrEANgst3dWdF5d1dz5E1QfjRXn63z4vKtr85HwmYl J4c.umAtQKgXfU6vhd_fvDmVRJRwxGEQqIAkbGk.jKMuM_zYl1QbD8cEXDmT1SfVIKGDr3PDComA CYRBKX8H3qdGlTG3r3jyFgTYl7_5wiN6MjqbxEgdTElTy0KlO1CbH0leCaH0.0Ul9sqiW99FKvOo Uh3A09MdBV2bwVJVbMRE.9qffYXcT7s_Kb4lcSDBox8.yAeQVVnqgYbv3Odm8CLfxlo4qjIga9Oj luYVZFusrRYWhAOmGBxeJEC4CoqMiZrUaLv6dv7hGXosbF2zELd0fqq2pe2p3RyYHbAOy4MaIaY7 ldY5LamQD8EErYaqKbG7udYaNjJH5cN24dfzvUrbXEdNRmgoOEj.9W4wwy_k_fV_f.dFO_q9S7hQ pVoxTwanxq5PbYctblwQybDsLP3MzP_zofN9I X-Sonic-MF: X-Sonic-ID: c7c15884-a8bd-4af3-a265-512318e0114d Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Thu, 11 May 2023 11:45:10 +0000 Received: by hermes--production-ir2-7867f454fc-s6g4r (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4833ed73d1ef9f5b49211c03bed4f505; Thu, 11 May 2023 11:45:07 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Daniel Fleischer Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: Date: Thu, 11 May 2023 13:45:06 +0200 In-Reply-To: (Daniel Fleischer's message of "Thu, 11 May 2023 10:10:40 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.21471 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1006 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Daniel Fleischer writes: > Recipe for recreating: > > - Add some abbrev definition with mixed capitalization, e.g. "abc" > should expand to "aBC". > - Enable abbrev-mode.=20 > - Write "aBC". > - Upon pressing space, abbrev-mode converts it into "ABC".=20 > > There is a code section in `abbrev-insert' that explicitly capitalizes > the first letter; I'm sure it's there for a reason but I think the > behavior I showed is unexpected. As for the example "aBC", there are > real use cases, just to mention one "iPhone". The docstring of define-abbrev describes that abbreviations support a property list of options. One of them is :case-fixed: =E2=80=98:case-fixed=E2=80=99: non-nil means that abbreviations are looked = up without case-folding, and the expansion is not capitalized/upcased. Perhaps we should make the interactive commands set the :case-fixed property, if the user wants. Or to avoid case-folding globally: (abbrev-table-put global-abbrev-table :case-fixed t) From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 09:06:47 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 13:06:47 +0000 Received: from localhost ([127.0.0.1]:50024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px60M-0007Ze-KB for submit@debbugs.gnu.org; Thu, 11 May 2023 09:06:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px60K-0007ZN-Of for 63438@debbugs.gnu.org; Thu, 11 May 2023 09:06:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px60F-0007TB-7n; Thu, 11 May 2023 09:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=78gIfbtKHgj7X5+Ck2Odsr+LDwnt2bzIS/Cm6oM+1UY=; b=GK+RdjvbTM4L 71bMg7GeUmXEyDU66PzOHKVl/P+M2AD68EXibfGJZpIYa6xpQcJBqpkHE5C1uSv7AzF1bZ/o0mdr9 wys5mbCqCxwCJX/ZD2TExOLZXg5/IOEyu/4FK+tSTnhxU2Q0VxaV90j1dDIY77B4rrLRBBavpyFHE ivBOZD8ZJ9zbwU6aJUfZSiEl5Ur2NlFNONI6eQV3mLxP/rYfB1aDAuCohY08Q5MTDczm8cleeDACH SfiL6N/040HNhgD8oQoLQU1Q7pSwynW2eDv9A4X+SYVxHyVId1ySQSBDGvY+V42GSXzviFh/LLmME F6Kban+t+ApfWUbgM6a+aA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px60E-00006t-Ge; Thu, 11 May 2023 09:06:39 -0400 Date: Thu, 11 May 2023 16:07:47 +0300 Message-Id: <83bkir584c.fsf@gnu.org> From: Eli Zaretskii To: Daniel Fleischer In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 14:03:43 +0300) Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: <83sfc35kzc.fsf@gnu.org> <83fs835eyx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Fleischer > Cc: 63438@debbugs.gnu.org > Date: Thu, 11 May 2023 14:03:43 +0300 > > I think even simpler: make sure abbrev insertion only works when the > input word is strictly (case sensitive) different than the expansion > word; leave everything else as is. > > Example: with a rule like "foobarical -> fooBarical" then > > Foobarical -> FooBarical (as is today) > FOOBARICAL -> FOOBARICAL (as is today) > > but fooBarical -> fooBarical, because it's already what we want. Sorry, that's an incompatible change in long-standing behavior. We cannot do that unconditionally. We _can_ make this opt-in behavior. From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 09:08:28 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 13:08:28 +0000 Received: from localhost ([127.0.0.1]:50029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px620-0007cq-48 for submit@debbugs.gnu.org; Thu, 11 May 2023 09:08:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px61y-0007cX-6k for 63438@debbugs.gnu.org; Thu, 11 May 2023 09:08:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px61t-0007fw-0P; Thu, 11 May 2023 09:08:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BNEGE8qNfyCxFPFMBx9BSKIq5Pb8Aa1iZTqKYWqnY/8=; b=XVciVhte8Z/E TAECNtVKQtr2i2AO+B8xulbuymmS0eS8hpWelY/ll/0evosKhrhYooIFuHNc3+rO/rbZFRDX5XWel U5Mhiv6E/xOv3kv5i1T3USXwJpfw1ORXvjKWk3Upo2pCvj4LdB2cYMK8uEUDFqv4pAQUpmkqYRhbH 6DChfUk1raW94W2P3vcPAFqvb9PrvhCesWfjrK4Ds64ys+lj40Rau5SRiwLP1HJbGYkumRySZQb6N /P6ZdDCGmIPt6sO02DIDVYy0hQgkeJuVDMySzHPAD7uedN5OqeyoeYjG+Tc6W3k4cCR/lOWTAc9RO 0YnhVcN+qsclLufTCuk62A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px61s-0000KH-Fc; Thu, 11 May 2023 09:08:20 -0400 Date: Thu, 11 May 2023 16:09:27 +0300 Message-Id: <83a5yb581k.fsf@gnu.org> From: Eli Zaretskii To: Daniel Fleischer In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 14:28:12 +0300) Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: <83sfc35kzc.fsf@gnu.org> <83fs835eyx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Fleischer > Date: Thu, 11 May 2023 14:28:12 +0300 > > Maybe some context: I think some people, at least me, use abbrev mode to > properly capitalize words with unique casing, needs not met by regular > capitalization rules. It means abbrev keys and values sometimes contain > the same word but with different casing. That's why I want nothing to > happen when the user writes a word with the right casing, making an > abbrev expansion unnecessary. I agree that your use pattern has a place, and have nothing against implementing it. I just don't think we can change to it unconditionally. So a new user option is in order, or perhaps a new value of abbrev-all-caps. From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 10:18:36 2023 Received: (at submit) by debbugs.gnu.org; 11 May 2023 14:18:36 +0000 Received: from localhost ([127.0.0.1]:53096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px77r-0002Bi-Tm for submit@debbugs.gnu.org; Thu, 11 May 2023 10:18:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:48956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px77k-0002BO-Ez for submit@debbugs.gnu.org; Thu, 11 May 2023 10:18:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px77g-0000Tr-G4 for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 10:18:24 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px77e-0006Jv-MM for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 10:18:24 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1px77c-0001Xf-9y for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 16:18:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Daniel Fleischer Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words Date: Thu, 11 May 2023 17:18:13 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:5TNjnRDqzNy+8Isb+AnbR/hBRxQ= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > The docstring of define-abbrev describes that abbreviations support a > property list of options. One of them is :case-fixed: > > ‘:case-fixed’: non-nil means that abbreviations are looked up without > case-folding, and the expansion is not capitalized/upcased. > > Perhaps we should make the interactive commands set the :case-fixed > property, if the user wants. > > Or to avoid case-folding globally: > > (abbrev-table-put global-abbrev-table :case-fixed t) Thanks, using `:case-fixed t' on the word and/or table solves my issue. Maybe this options should be better exposed during abbrev creation step, as you said. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 11:48:14 2023 Received: (at 63438) by debbugs.gnu.org; 11 May 2023 15:48:14 +0000 Received: from localhost ([127.0.0.1]:53187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px8Wc-0004np-F8 for submit@debbugs.gnu.org; Thu, 11 May 2023 11:48:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px8Wb-0004n4-3B for 63438@debbugs.gnu.org; Thu, 11 May 2023 11:48:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px8WV-0003Wg-SX; Thu, 11 May 2023 11:48:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JXy6pCpKYRHPN1k3JDoCXjGztlceGKlsvNwkYSMDyLk=; b=FFf1XU5QvZ/i 4rtg7yzdqq8B8XQbDQNUbIer01njYiY6Iu35FwNgAmA8BTxfmUShrk1WIkLOgeVqjzgJ/u+G7iiU8 YVGNYB5wukV3h08TYgzIfCpaFlL35EwXZ7FUUXCTQjXeNGgJwSbAQgprSjnl2WLwms12ywMZKlPeY Bf4kORpf/OAekcgOnPrIYdD7dwGLMVAoeDQ4CDzukb9Y/zos7tXDPpwULW2DR+k5c+ej61e5ZnDpy EuRnyyBgyQe6Z9H9wmI+pBj0BD6MCwLn9//Z90GTncKIlOg04I5RHj6RvxuH2zAlxXoEDkYpg3ae4 z06PiMuAsBcaBAtQ3cZtmA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px8WJ-0005Bf-ND; Thu, 11 May 2023 11:48:04 -0400 Date: Thu, 11 May 2023 18:49:05 +0300 Message-Id: <831qjm6f7y.fsf@gnu.org> From: Eli Zaretskii To: Daniel Fleischer In-Reply-To: (message from Daniel Fleischer on Thu, 11 May 2023 17:18:13 +0300) Subject: Re: bug#63438: 30.0.50; abbrev mode wrongly capitalizes with mixed capitalized words References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63438 Cc: 63438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Fleischer > Date: Thu, 11 May 2023 17:18:13 +0300 > > > Or to avoid case-folding globally: > > > > (abbrev-table-put global-abbrev-table :case-fixed t) > > Thanks, using `:case-fixed t' on the word and/or table solves my issue. > > Maybe this options should be better exposed during abbrev creation step, > as you said. Yes, that will be a useful addition.