all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Terrence Yearwood <send2tsy@gmail.com>
Cc: phillip.lord@newcastle.ac.uk, emacs-devel@gnu.org
Subject: Re: pabbrev
Date: Wed, 14 Feb 2024 23:23:09 +0100	[thread overview]
Message-ID: <DU2PR02MB1010944F7AD0EF83B716E92C7964E2@DU2PR02MB10109.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <CANsDbAYKM_3PSEkt+by5tBA1iza4spUOGLQgXCM9vyxh3TaGjg@mail.gmail.com> (Terrence Yearwood's message of "Wed, 14 Feb 2024 15:48:27 -0500")

Terrence Yearwood <send2tsy@gmail.com> writes:

Hi Terrence, thank you very much for the bug repport and fix.

> Hello, sorry about contacting you directly.
> I'm a hobbyist, don't have github account.

Github is not a problem. You can send me a patch; it works fine or me.

However, you need to sign FSF copyright if you would like to add any significant
contribution. However, this one seems like a very small so it is probably not a
problem. However, I have attached emacs-devel just to double check.  I am a bit
new to maintaining a package myself.

> I've been using this essential package for ages!

I have just discovered it myself, but I think it is great. Thanks goes to
Phillip!

> I noticed an anomaly from the time I started using pabbrev.
> The following message would pop up when I updated my packages:
>
>   Error running timer ‘pabbrev-idle-timer-function’: (error "Selecting
> deleted buffer")
>
> In October 2023, I decided to fix the problem.
> The following is the context for the error:
>
>   (1) pabbrev enabled globally
>   (2) execute command: package-list-packages
>       or from the menu: Options -> Manage Emacs Packages

I have now tested, but I can't reproduce the bug you are describing. I did M-x
package-list-packages, followed by an U x to update packages, whereas about 15
packages got upgraded.

Pabbrev was not complaining and I do use global pabbrev mode. I uninstalled my
in-house I work on, and have installed one from the Melpa. It can be a different
versions of Emacs perhaps?

However, it sounds reasonable to me to check if a buffer is live; so I have no
problems installing your suggestion if it is OK from the copyright perspective.

> The following is the modified function:
>
> (defun pabbrev-idle-timer-function (&optional buffer)
>   ;; so this only works on the current buffer. Might want to scavenge
>   ;; over other buffers
>   (let ((first-live-bufr (seq-find #'buffer-live-p (list buffer
> pabbrev-timer-buffer (current-buffer)) nil)))
>     (when (or first-live-bufr)
>       (with-current-buffer first-live-bufr
>         (if (and pabbrev-mode (not pabbrev-disable-timers))
>             (pabbrev-idle-timer-function-0)
>           (pabbrev-debug-message "idle running in non pabbrev-mode"))))))
>
>
> Thx

Just a small stylistic remark:

(when (or first-live-bufr))

Or is not needed; I guess just a left over from some testing.

We can also combine `let' and `when' in one form, so I have rewritten the code
to:

(defun pabbrev-idle-timer-function (&optional buffer)
  ;; so this only works on the current buffer. Might want to scavenge
  ;; over other buffers
  (when-let ((first-live-bufr
              (seq-find
               #'buffer-live-p
               (list buffer pabbrev-timer-buffer (current-buffer)))))
    (with-current-buffer first-live-bufr
      (if (and pabbrev-mode (not pabbrev-disable-timers))
          (pabbrev-idle-timer-function-0)
        (pabbrev-debug-message "idle running in non pabbrev-mode")))))

If someone of emacs maintainers can confirm that 4 lines of code are not
requiring FSF copyright aissignement, I'll be happy to install the suggestion by
Terrence. For the eventual future info: how much is considered as
"insignificant" and how do I test if someone has signed FSF papers? It was about
sending email to some addresss?

Thank you very much for the help.

PS:

I have attached Phillip, I think he is happy to hear people are using his
package for years.

Best regards
/arthur



       reply	other threads:[~2024-02-14 22:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANsDbAYKM_3PSEkt+by5tBA1iza4spUOGLQgXCM9vyxh3TaGjg@mail.gmail.com>
2024-02-14 22:23 ` Arthur Miller [this message]
2024-02-19 11:50   ` pabbrev Ihor Radchenko
2024-02-19 15:34     ` pabbrev Arthur Miller
2007-09-17  7:41 pabbrev Kevin Brubeck Unhammer
2007-09-17 11:44 ` pabbrev Carsten Dominik
2007-09-17 15:34   ` pabbrev Kevin Brubeck Unhammer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DU2PR02MB1010944F7AD0EF83B716E92C7964E2@DU2PR02MB10109.eurprd02.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=phillip.lord@newcastle.ac.uk \
    --cc=send2tsy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.