unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: pabbrev
       [not found] <CANsDbAYKM_3PSEkt+by5tBA1iza4spUOGLQgXCM9vyxh3TaGjg@mail.gmail.com>
@ 2024-02-14 22:23 ` Arthur Miller
  2024-02-19 11:50   ` pabbrev Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Arthur Miller @ 2024-02-14 22:23 UTC (permalink / raw)
  To: Terrence Yearwood; +Cc: phillip.lord, emacs-devel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pabbrev
  2024-02-14 22:23 ` pabbrev Arthur Miller
@ 2024-02-19 11:50   ` Ihor Radchenko
  2024-02-19 15:34     ` pabbrev Arthur Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-02-19 11:50 UTC (permalink / raw)
  To: Arthur Miller; +Cc: Terrence Yearwood, phillip.lord, emacs-devel

Arthur Miller <arthur.miller@live.com> writes:

> 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?

The threshold is about 15LOC.
See https://www.gnu.org/prep/maintain/maintain.html#Legally-Significant

You may find the whole
https://www.gnu.org/prep/standards/standards.html
and https://www.gnu.org/prep/maintain/maintain.html useful.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pabbrev
  2024-02-19 11:50   ` pabbrev Ihor Radchenko
@ 2024-02-19 15:34     ` Arthur Miller
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Miller @ 2024-02-19 15:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Terrence Yearwood, phillip.lord, emacs-devel

Ihor Radchenko <yantar92@posteo.net> writes:

> Arthur Miller <arthur.miller@live.com> writes:
>
>> 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?
>
> The threshold is about 15LOC.
> See https://www.gnu.org/prep/maintain/maintain.html#Legally-Significant
>
> You may find the whole
> https://www.gnu.org/prep/standards/standards.html
> and https://www.gnu.org/prep/maintain/maintain.html useful.

Yes, thank you very much; that was very useful; especially this:

"Copyright does not cover ideas. If someone contributes ideas but no text, these
ideas may be morally significant as contributions, and worth giving credit for,
but they are not significant for copyright purposes. Likewise, bug reports do
not count for copyright purposes."

This was less than 10 lines; and I had to rewrite it anyway, and it was more of
a potential bug than a feature, I guess it was OK to get included. I have
already given Terrence credit in Git log; and I'll do so in the pabbrev.el as
well, and thank you Terrence for contributing it.

Thank you for help!
/arthur




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-19 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CANsDbAYKM_3PSEkt+by5tBA1iza4spUOGLQgXCM9vyxh3TaGjg@mail.gmail.com>
2024-02-14 22:23 ` pabbrev Arthur Miller
2024-02-19 11:50   ` pabbrev Ihor Radchenko
2024-02-19 15:34     ` pabbrev Arthur Miller

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).