From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IEAIBvNHU2H1SwEAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 18:50:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0CKxAfNHU2GjdwAAB5/wlQ (envelope-from ) for ; Tue, 28 Sep 2021 16:50:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6FB97375DF for ; Tue, 28 Sep 2021 18:50:58 +0200 (CEST) Received: from localhost ([::1]:41016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVGJl-0003mE-FW for larch@yhetil.org; Tue, 28 Sep 2021 12:50:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVGGI-0000mf-W0 for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 12:47:23 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:43540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVGGG-00079p-Sg for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 12:47:22 -0400 Received: by mail-qt1-x82e.google.com with SMTP id a13so20481341qtw.10 for ; Tue, 28 Sep 2021 09:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:subject:date:message-id:mime-version; bh=4wI5mkZ6MSgKg3wvt18oMtpsGMinCa/Os0XgTi74us8=; b=iLRY5FT+tfRzjivaoJAY7OC1kV6exJnLg5CBpqMdH4LMT+PrlaGBknzZQR2KlIF2J3 IMVj/GRwVTFiIkZVvsrmfnml+5tauF9F600BL2Xhjjz/VpaC43J20RIAp6GTPdZfrQNJ T4FQ5TM1aKu6kEsI1QFDPilDwQdVCTvpr0GhYU20pcnU3s6u8wj5WNA/2kUAZN5ko9PY 9q0cMj6bgyagWbiop/fre+BwcJIwYSICZ+Tj2WtAZ6sEEHJbVv58n0sjtyFlUd2WyaUa HNalFl/URuxP42iCgeWToo/tFEjNYJxCp6ZQsWwSLJxR0FspBuso2+33kwDFf1P9Rjek to3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=4wI5mkZ6MSgKg3wvt18oMtpsGMinCa/Os0XgTi74us8=; b=A7Udk5K6LT4ozc0HsMc7PlslQrRsBzEyYMQgVAk4KT3igk8yMlQV6gZ9AdkKrujmLl Z50xXL5jiVk6wHrLkeraLiGgqljKcvEw7GnOi6Q5bj8KvkbBS88tgBoPDRCU/QIlPFeJ dNG3nwpkFRZDAN06x3zKFqq7RiUajA1sR22qfZpXkCHzesbbm/7co2pxomxrUIXC7ew2 z/G6r68bjAuQHjdtAZcZHUg/D273AEAm6nVE/n33KjjskANXMsO9f3orXgXztfHVQI3S BhwRZei9iSmMDbOGHkvRemNzh/xdWILPvy5i+J9bFyYZ04JHvoU4Qyb8uf2Yf4Ej8a7v wc6g== X-Gm-Message-State: AOAM533KF+BSKhVEyyOenfVxNVCYnX1xI9pzIKRyPdTxEHfPfc0c1cV7 w/rabl9ikPSRVnbN9j9ak1/lUIxdxz0= X-Google-Smtp-Source: ABdhPJzc80Gjd6YPe9W7bxN6gcZNHGIFh0NnPShI748WifbmykIp9Y6YlPp5dzwsE3P/Tcrf8GRMEw== X-Received: by 2002:ac8:4f0c:: with SMTP id b12mr6606075qte.134.1632847638385; Tue, 28 Sep 2021 09:47:18 -0700 (PDT) Received: from arch ([2601:82:c200:166d:afae:ebe6:a0e2:409e]) by smtp.gmail.com with ESMTPSA id z186sm15508560qke.59.2021.09.28.09.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 09:47:17 -0700 (PDT) User-agent: mu4e 1.7.0; emacs 28.0.50 From: No Wayman To: emacs-orgmode@gnu.org Subject: [BUG] [PATCH] org-id: Fix checkdoc warnings [9.5 (9.5-g9364b2 @ /home/n/.emacs.d/straight/build/org/)] Date: Tue, 28 Sep 2021 12:45:59 -0400 Message-ID: <87r1d88x64.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632847858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4wI5mkZ6MSgKg3wvt18oMtpsGMinCa/Os0XgTi74us8=; b=WBuSLE6L3sfCIr0lzmQ3dTX0q3Bgca933g+wXCniPOUEA8mBeSOyhlSnDw1LWX1I/IkgK9 gTtrhXVE9vEEY8mmQzdTbMfWZgTfhjWV4ka1zbHk18k9TlMfAztzLDSxSXvxJZYcM3WqgU HWdZbcK3zThPem5JhYYeBhELPb+b1REOYuZ18sr+pUrccKp2u7JGb9zuEm2w2Qv0eANlNc K8WVYfJi7b1Ld38arEEfC4pNnzLbdI4kCwJOwzIpzW16crofGDVejNI9aziQ4ra04z7Imb K/WIBl3iZckeTyt9AbuhtykQjU8m+AWPUFVG7iuo3T++AxuIFYia8sTI4Ko9aw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632847858; a=rsa-sha256; cv=none; b=qLeOtpalDUhrq0URqR0RXJtqeehxGE+VP8n7JWiOX4+1xSFRM/3CKcuEumeSQ71Uh/5a8I qVycvEp26IhkwAEBTHTvaDDHnrWACRTTrWX2KD9BIFVSwiDsSOJIuB+UlVHpHRAhTNi11l 3TnIdW2Wftn5KEBBn9Q5gN121wQqLGX0LgQgyhNal51mkwHH2mjlePrcD85IS0Whyelq43 TgVc5qPfe4nym7jgsv+KliXt3fRYeYGp1KqTC5cEn9Hh5dVe3OSxMF64IEps/k6Zwwff6K 50c8GBga8qYM+8n5by+lFhJPzr3iCAvVSywXdQ5yJZyyCqoBIvfy/TmjqRjupQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iLRY5FT+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=iLRY5FT+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 6FB97375DF X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: hAQUV2SIZqe+ --=-=-= Content-Type: text/plain; format=flowed See attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-id-Fix-checkdoc-warnings.patch >From 7fbdca5dc81dfe0dd542ed0e2352d3334b16fd7f Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Mon, 27 Sep 2021 20:35:12 -0400 Subject: [PATCH] org-id: Fix checkdoc warnings * org-id: Fix checkdoc warnings. --- lisp/org-id.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lisp/org-id.el b/lisp/org-id.el index 3725ff9e5..56783d108 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -419,15 +419,15 @@ So a typical ID could look like \"Org:4nd91V40HI\"." (substring rnd 18 20) (substring rnd 20 32)))) -(defun org-id-int-to-b36-one-digit (i) - "Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z." +(defun org-id-int-to-b36-one-digit (integer) + "Convert INTEGER between 0 and 61 into a single character 0..9, A..Z, a..z." (cond - ((< i 10) (+ ?0 i)) - ((< i 36) (+ ?a i -10)) + ((< integer 10) (+ ?0 integer)) + ((< integer 36) (+ ?a integer -10)) (t (error "Larger that 35")))) (defun org-id-b36-to-int-one-digit (i) - "Turn a character 0..9, A..Z, a..z into a number 0..61. + "Convert character 0..9, A..Z, a..z into a number 0..61. The input I may be a character, or a single-letter string." (and (stringp i) (setq i (string-to-char i))) (cond @@ -435,9 +435,11 @@ The input I may be a character, or a single-letter string." ((and (>= i ?a) (<= i ?z)) (+ (- i ?a) 10)) (t (error "Invalid b36 letter")))) -(defun org-id-int-to-b36 (i &optional length) - "Convert an integer to a base-36 number represented as a string." - (let ((s "")) +(defun org-id-int-to-b36 (integer &optional length) + "Convert an INTEGER to a base-36 number represented as a string. +The returned string is padded with leading zeros to LENGTH if necessary." + (let ((s "") + (i integer)) (while (> i 0) (setq s (concat (char-to-string (org-id-int-to-b36-one-digit (mod i 36))) s) @@ -447,11 +449,11 @@ The input I may be a character, or a single-letter string." (setq s (concat (make-string (- length (length s)) ?0) s))) s)) -(defun org-id-b36-to-int (s) - "Convert a base-36 string into the corresponding integer." +(defun org-id-b36-to-int (string) + "Convert a base-36 STRING into the corresponding integer." (let ((r 0)) (mapc (lambda (i) (setq r (+ (* r 36) (org-id-b36-to-int-one-digit i)))) - s) + string) r)) (defun org-id-time-to-b36 (&optional time) @@ -489,7 +491,8 @@ and TIME is a Lisp time value (HI LO USEC)." Store the relation between files and corresponding IDs. This will scan all agenda files, all associated archives, and all files currently mentioned in `org-id-locations'. -When FILES is given, scan also these files." +When FILES is given, scan also these files. +If SILENT is non-nil, messages are suppressed." (interactive) (unless org-id-track-globally (error "Please turn on `org-id-track-globally' if you want to track IDs")) @@ -610,7 +613,7 @@ When FILES is given, scan also these files." (add-hook 'kill-emacs-hook 'org-id-locations-save)) (defun org-id-hash-to-alist (hash) - "Turn an org-id hash into an alist. + "Turn an org-id HASH into an alist. This is to be able to write it to a file." (let (res x) (maphash @@ -622,7 +625,7 @@ This is to be able to write it to a file." res)) (defun org-id-alist-to-hash (list) - "Turn an org-id location list into a hash table." + "Turn an org-id location LIST into a hash table." (let ((res (make-hash-table :test 'equal :size (apply '+ (mapcar 'length list)))) -- 2.33.0 --=-=-=--