unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Hanno Perrey <hanno@hoowl.se>
Cc: Stefan Kangas <stefankangas@gmail.com>,  emacs-devel@gnu.org
Subject: Re: [ELPA] New package: jami-bot and org-jami-bot
Date: Mon, 15 Jan 2024 07:06:22 +0000	[thread overview]
Message-ID: <87jzobxehd.fsf@posteo.net> (raw)
In-Reply-To: <87cyu3aftq.fsf@hoowl.se> (Hanno Perrey's message of "Sun, 14 Jan 2024 19:46:07 +0100")

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

Hanno Perrey <hanno@hoowl.se> writes:

> Hej Philip,
>
> I have now modified the code according to your suggestions and pushed
> the changes. 

[...]


The sharp-quoting was my mistake, I misread the hooks as functions.
Other than that, here is a diff with the remaining changes I would
propose:


[-- Attachment #2: Type: text/plain, Size: 2710 bytes --]

diff --git a/jami-bot.el b/jami-bot.el
index 8ad3ed0..5ea9aad 100644
--- a/jami-bot.el
+++ b/jami-bot.el
@@ -1,6 +1,6 @@
 ;;; jami-bot.el --- An extendable chat bot for the private messenger GNU Jami -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2023 Free Software Foundation, Inc.
+;; Copyright (C) 2023, 2024 Free Software Foundation, Inc.
 
 ;; Author: Hanno Perrey <http://gitlab.com/hperrey>
 ;; Maintainer: Hanno Perrey <hanno@hoowl.se>
@@ -73,14 +73,14 @@ consist of a single (lowercase) word.  The corresponding function needs to
 accept the account id, the conversation id and the message alist as
 arguments and return a string (that is sent as reply to the original message)."
   :group 'jami-bot
-  :type '(alist :key-type 'string :value-type 'function))
+  :type '(alist :key-type string :value-type function))
 
 (defcustom jami-bot-text-message-functions nil
   "A list of functions that will be called when processing a plain text message.
 Functions must take the ACCOUNT and CONVERSATION ids as well as
 the actual MSG as arguments.  Their return value will be ignored."
   :group 'jami-bot
-  :type '(group 'function))
+  :type '(group function))
 
 (defcustom jami-bot-download-path "~/jami/"
   "Path in which to store files downloaded from conversations.
@@ -95,9 +95,9 @@ Functions must take the ACCOUNT and CONVERSATION ids as well as
 the actual MSG and the local downloaded file name, DLNAME, as
 arguments.  Their return value will be ignored."
   :group 'jami-bot
-  :type '(group 'function))
+  :type '(group function))
 
-;; Internal variables
+;;;; Internal variables
 
 (defvar jami-bot--jami-local-account-ids nil
   "List of `jami' local accounts user ids and name pairs.
@@ -105,7 +105,7 @@ arguments.  Their return value will be ignored."
 Caches output of dbus-methods \"getAccountList\" and
 \"getAccountDetails\". For internal use in `jami-bot'.")
 
-;; Functions
+;;;; Functions
 
 (defun jami-bot--messageReceived-handler (account conversation msg)
   "Handle messages from Jami's `messageReceived' D-Bus signal.
@@ -254,7 +254,9 @@ corresponding ids to which the message MSG belongs to."
          (filename (cadr (assoc-string "displayName" msg)))
          (dlpath (file-name-as-directory
                   (expand-file-name jami-bot-download-path)))
-         (dlname (concat dlpath (format-time-string "%Y%m%d-%H%M") "_" filename)))
+         (dlname (expand-file-name
+		  (concat (format-time-string "%Y%m%d-%H%M") "_" filename)
+		  dlpath)))
     (unless (file-directory-p dlpath) (make-directory dlpath 't))
     (message "jami-bot: downloading file %s" dlname)
     (jami-bot--dbus-cfgmgr-call-method "downloadFile" account conversation id fileid dlname)

[-- Attachment #3: Type: text/plain, Size: 60 bytes --]



> Thanks again for the feedback!
>
> Best wishes,
> Hanno

  reply	other threads:[~2024-01-15  7:06 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 11:21 [ELPA] New package: jami-bot and org-jami-bot Hanno Perrey
2023-12-28 21:33 ` Stefan Kangas
2023-12-29 14:08   ` Hanno Perrey
2023-12-30  3:20 ` Richard Stallman
2023-12-30 10:29   ` Hanno Perrey
2024-01-01  3:34     ` Richard Stallman
2023-12-30 12:15   ` [DISCUSSION] Possible inclusion of org-capture.el into Emacs core (was: [ELPA] New package: jami-bot and org-jami-bot) Ihor Radchenko
2023-12-30 17:43     ` Stefan Kangas
2024-01-01  3:34     ` Richard Stallman
2024-01-01  3:59     ` Richard Stallman
2024-01-01 14:05       ` Ihor Radchenko
2023-12-30 12:43   ` [DISCUSSION] org-capture.el vs remember.el " Ihor Radchenko
2023-12-30 17:20     ` Stefan Kangas
2023-12-30 19:16       ` João Távora
2023-12-30 19:19         ` João Távora
2023-12-31 18:05         ` Adam Porter
2024-01-07 21:01 ` [ELPA] New package: jami-bot and org-jami-bot Stefan Kangas
2024-01-08 21:08   ` Richard Stallman
2024-01-08 21:29     ` Ihor Radchenko
2024-01-09  3:30     ` Eli Zaretskii
2024-01-09  4:42       ` Stefan Kangas
2024-01-10  4:24         ` Richard Stallman
2024-01-10  5:36           ` Stefan Kangas
2024-01-10  4:24       ` Richard Stallman
2024-01-11 15:30         ` ELPA packages and Org mode integration (was: [ELPA] New package: jami-bot and org-jami-bot) Ihor Radchenko
2024-01-09 19:39   ` [ELPA] New package: jami-bot and org-jami-bot Philip Kaludercic
2024-01-11 18:51     ` Richard Stallman
2024-01-11 20:12       ` Stefan Kangas
2024-01-12  7:24         ` Eli Zaretskii
2024-01-12 12:38           ` Ihor Radchenko
2024-01-12 13:59             ` Eli Zaretskii
2024-01-12 14:13               ` Ihor Radchenko
2024-01-12 14:37                 ` Eli Zaretskii
2024-01-12 14:45                   ` Ihor Radchenko
2024-01-12 15:04                     ` Eli Zaretskii
2024-01-12 15:17                       ` Ihor Radchenko
2024-01-14  3:03         ` Richard Stallman
2024-01-14  3:03         ` Richard Stallman
2024-01-14  9:58           ` Stefan Kangas
2024-01-14 10:25             ` Emanuel Berg
2024-01-14 11:43               ` Ihor Radchenko
2024-01-14 10:47             ` Emanuel Berg
2024-01-17  3:29             ` Richard Stallman
2024-01-31  3:34             ` Richard Stallman
2024-02-03  9:28               ` Hanno Perrey
2024-01-15  3:12           ` Richard Stallman
2024-01-12 15:04       ` Hanno Perrey
2024-01-16  3:31         ` Richard Stallman
2024-01-17  8:00           ` Hanno Perrey
2024-01-12 14:58     ` Hanno Perrey
2024-01-14 18:46     ` Hanno Perrey
2024-01-15  7:06       ` Philip Kaludercic [this message]
2024-01-17  7:59         ` Hanno Perrey
2024-01-17 23:39           ` Philip Kaludercic
2024-01-20 14:46             ` Hanno Perrey

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87jzobxehd.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=hanno@hoowl.se \
    --cc=stefankangas@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 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).