emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Emacs-orgmode Digest, Vol 179, Issue 18
       [not found] <mailman.59.1610730034.28769.emacs-orgmode@gnu.org>
@ 2021-01-16 13:01 ` Markéta Pospíšilová
  0 siblings, 0 replies; only message in thread
From: Markéta Pospíšilová @ 2021-01-16 13:01 UTC (permalink / raw)
  To: emacs-orgmode

LlmllmllkmkLlLKmKLKKM



Odesláno ze smartphonu BlackBerry – nejzabezpečenějšího mobilního zařízení


	  Původní zpráva  	


Od: emacs-orgmode-request@gnu.org
Odesláno: 15. ledna 2021 18:05
Komu: emacs-orgmode@gnu.org
Odpověď komu: emacs-orgmode@gnu.org
Předmět: Emacs-orgmode Digest, Vol 179, Issue 18


Send Emacs-orgmode mailing list submissions to
emacs-orgmode@gnu.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/emacs-orgmode
or, via email, send a message with subject or body 'help' to
emacs-orgmode-request@gnu.org

You can reach the person managing the list at
emacs-orgmode-owner@gnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Emacs-orgmode digest..."


Today's Topics:

   1. bug#42484: 26.1: org-mode should display value of links in
      mini-buffer (Samuel Wales)
   2. na=\"nil\" in ob-R.elo (Brett Presnell)
   3. bug#45091: 27.1; M-x org-table-paste-rectangle (Naoya Yamashita)
   4. bug#45091: 27.1; M-x org-table-paste-rectangle (João Távora)
   5. Re: How to use `open` to handle `message:*` links on macOS
      (Alexander Adolf)


----------------------------------------------------------------------

Message: 1
Date: Thu, 14 Jan 2021 14:02:24 -0700
From: Samuel Wales <samologist@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Boruch Baum <boruch_baum@gmx.com>, 42484@debbugs.gnu.org
Subject: bug#42484: 26.1: org-mode should display value of links in
mini-buffer
Message-ID:
<CAJcAo8s1GKKKU-G7xgO+BtPL-taeEFo7ye9drOMxthoYNNDwqQ@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

by activate i mean display, in echo area, whatever it is i want to
display.  i think help-echo is a text property, and i might or might
not want to display it, depending.  and i might want to display the
other stuff even if there is no help-echo.

i use [and adore] org-link-minor mode in elisp mode.  it highlights
links and timestamps and makes links followable.  i even use
[[target]] <<target>> within elisp buffers, and org id links that go
from elisp to org and vice-versa.

if org-link-minor-mode is active in an elisp buffer, i can run the
following to detect whether cursor is over an org ts.

(defun hoka-eldoc-at-point ()
  (when (eq 'org-date (get-text-property (point) 'face))
    (format "%s"
            (when (fboundp 'alpha-org-time-span)
              (with-no-warnings
                (alpha-org-time-span))))))

then i get the time span in the echo area.  a time span is e.g. -1 for
yesterday.  it could just as well be a timestamp in a different format
or lang.  so that's great.  but i want mouse hover to do the same
thing, and to do so with a delay.  and i want links of course.

more generally, i might occasionally want /some/ eldoc type stuff and
/some/ help-echo stuff.

so org-link-minor-mode was useful in my case because it [i think it is
it] adds face property which can be used.  and i thought that might be
useful to you.  idk though.

in my case i find it a bit overwhelming to get whatever solution i use
for cursor to also work for mouse [with appropriate delays].  and get
whatever else to work and to not have anything annoyingly display.


On 1/14/21, Juri Linkov <juri@linkov.net> wrote:
>> this is an interesting discussion.  is there any side discussion that
>> takes into account both mouse and cursor?
>
> Indeed, you can see a side discussion at
> https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00885.html
> where we discussed highlighting the completion candidate
> the same way whether the mouse pointer hovered over it,
> or the cursor moved to its buffer position.
>
> That discussion also mentions another way to display
> help-text using cursor-sensor-mode, i.e. after enabling it,
> cursor-sensor-functions can detect when the cursor enters
> the help-text property, then display it in the echo area.
>
>> 1] displaying value of link in echo area [the problem you are
>> discussing -- don't let me derail it] with a short nonzero delay
>> 2] doing so *for both cursor and mouse* -- too much futzing here
>> 3] also doing other stuff -- also futzing
>>
>> other stuff includes maybe [or maybe not] showing function signature
>> or docstrings in elisp buffers [possibly with longer delay], and
>> showing the time span in number of days from now to the org timestamp
>> at point or under mouse in any mode.
>
> This looks like the 5th possible way to implement this using eldoc,
> in addition to tooltips, post-command-hook, help-at-pt, cursor-sensor-mode.
>
>> i have code for the last thing.  the problem is figuring out making
>> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse
>> and keyboard without verbose help-echo like in dired.  also the
>> major/minor modes and
>
> help-at-pt has an option to ignore verbose help-echo in dired.
> post-command-hook can be enabled locally only in org-mode buffers.
> I don't know how to do the same in eldoc.
>
>> i guess i am saying [back to topic] this is a bit complex and i wonder
>> if a more orthogonal solution is called for?  as some might want mouse
>> activation also, and eldoc already shows elisp stuff.
>>
>> and another suggestion: org-link-minor-mode is what i might use to
>> identify when to activate org links and timestamps.
>
> You mean to activate is to display their help-echo?
>


--
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html





------------------------------

Message: 2
Date: Thu, 14 Jan 2021 18:42:38 -0500
From: Brett Presnell <presnell@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: na=\"nil\" in ob-R.elo
Message-ID: <87h7njdr0x.fsf@ufl.edu>
Content-Type: text/plain


Probably a silly question, but in ob-R.el, what is the reason for
setting na=\"nil\" when defining org-babel-R-write-object-command?  Is
this an elisp compatibility thing?

Regardless, I generally (always?) want na=\"\" for this, so I am finding
all those "nil"s very annoying, and the only way that I see to defeat
them is to redefine org-babel-R-write-object-command.

If there is no reason for the current behavior (doubtful I know) and if
I am not missing an obvious work-around, then I would like to suggest
changing this behavior.  Otherwise, would it be feasible to add an
option for R code blocks (:nastring?) where one could specify the NA
replacement string?

What do you think?  It's easy to suggest I know and certainly beyond my
elisp coding skills at present, but I am supposing that someone more
fluent in elisp could do this safely without too much trouble.



------------------------------

Message: 3
Date: Fri, 15 Jan 2021 20:44:40 +0900 (JST)
From: Naoya Yamashita <conao3@gmail.com>
To: tkk@misasa.okayama-u.ac.jp
Cc: 45091@debbugs.gnu.org
Subject: bug#45091: 27.1; M-x org-table-paste-rectangle
Message-ID: <20210115.204440.196131068956280221.conao3@gmail.com>
Content-Type: Text/Plain; charset=us-ascii


Hi, I'm new on this thread, but I can reproduce tak's issue and I
tried to do bisect.

Finally, I got 5b45c269cda09fe46e110adb6f6767040f4ade59 is a
commit has a some problem.

I'm happy if this information could help you.

```
5b45c269cda09fe46e110adb6f6767040f4ade59
New jit-lock-antiblink-grace feature

* lisp/jit-lock.el (jit-lock-antiblink-grace): New defcustom.
(jit-lock--antiblink-line-beginning-position)
(jit-lock--antiblink-string-or-comment): New variables
(jit-lock--antiblink-post-command): New helper.
(jit-lock-mode): Tweak post-command-hook and
jit-lock-context-timer.

* etc/NEWS: Mention jit-lock-antiblink-grace

2 files changed, 81 insertions(+), 1 deletion(-)
etc/NEWS         |  7 ++++++
lisp/jit-lock.el | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
```

---

Here is my bash script and do `C-c l` (org-table-copy-region) on
first table and `C-c ;` (org-table-paste-rectangle) on second table.
(~/dev/tmp/taks-file.tex have first tak's mention contents.)

```sh
make clean
./autogen.sh
./configure --prefix=$HOME/.local/head
make -j6
./src/emacs -Q ~/dev/tmp/taks-file.tex --eval "             \
  (progn                                                    \
    (setq truncate-lines t)                                 \
    (setq debug-on-error t)                                 \
    (require 'org)                                          \
    (require 'org-table)                                    \
    (orgtbl-mode)                                           \
    (global-set-key (kbd \"C-c l\")                         \
       (lambda ()                                           \
         (interactive)                                      \
         (org-table-copy-region (1+ (org-table-begin)) (- (org-table-end) 2)))) \
    (global-set-key (kbd \"C-c ;\")                         \
       (lambda ()                                           \
         (interactive)                                      \
         (org-table-paste-rectangle)                        \
         (set-buffer-modified-p nil))))"                    \
2>/dev/null
```

And here is my bisect log.
```
Bisect Log (14)
git bisect start 'emacs-27.1' 'emacs-26.3'
git bisect good 38564f8a664347c42f7614d9c91e0d49e4a073e8
git bisect good 825fd4d34165e5edc718a9df93838a410d25ea81
git bisect good 5c5c1b559313d06aab6516ff1b1acf1da3a01c7d
git bisect bad d7cd4ab7d948427104003f1d35cf52a4eac45d0a
git bisect bad 4b2c2faab83fe3b13430b837be7d450b5cd47caf
git bisect good 16ce6dbef279bda70b4d60b4d2d0aff008bfa5f7
git bisect bad 5063e38921de8cb872965abda32bcc6fd8894532
git bisect bad 4c933077157ba409d645f4649c8a3a8e534d53d5
git bisect good 096be9c4541329af259273fe604dc4f8669fbd8a
git bisect bad bd95d66ae97f3dcfe73b972de935e27e434e49be
git bisect bad 5b45c269cda09fe46e110adb6f6767040f4ade59
git bisect good 0e774d4f355b4f12a625da5ca9602d1ba876bcc1
5b45c269cda09fe46e110adb6f6767040f4ade59 is the first bad commit
```





------------------------------

Message: 4
Date: Fri, 15 Jan 2021 12:19:08 +0000
From: João Távora <joaotavora@gmail.com>
To: Naoya Yamashita <conao3@gmail.com>
Cc: tkk@misasa.okayama-u.ac.jp, 45091@debbugs.gnu.org
Subject: bug#45091: 27.1; M-x org-table-paste-rectangle
Message-ID:
<CALDnm53Uv7tveRf508R7LWvoTbih27hNkj84Oad47o94NP1shw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Okay, your bisect scripts points to one of my commits.

But I wish it was more automated.  Because I tried quite
hard and sometimes I _could_ reproduce the problem and
sometimes I couldn't.  So you could be seeing noise here.
Maybe you can make your script  do those copy-paste
operations automatically and reliably?  Then we'd be sure.

Anyway, I think is might be enough to point to a bug
that was introduced by my commit, or rather exposed
by it.  I'll have another look.

João

On Fri, Jan 15, 2021 at 12:11 PM Naoya Yamashita <conao3@gmail.com> wrote:
>
>
> Hi, I'm new on this thread, but I can reproduce tak's issue and I
> tried to do bisect.
>
> Finally, I got 5b45c269cda09fe46e110adb6f6767040f4ade59 is a
> commit has a some problem.
>
> I'm happy if this information could help you.
>
> ```
> 5b45c269cda09fe46e110adb6f6767040f4ade59
> New jit-lock-antiblink-grace feature
>
> * lisp/jit-lock.el (jit-lock-antiblink-grace): New defcustom.
> (jit-lock--antiblink-line-beginning-position)
> (jit-lock--antiblink-string-or-comment): New variables
> (jit-lock--antiblink-post-command): New helper.
> (jit-lock-mode): Tweak post-command-hook and
> jit-lock-context-timer.
>
> * etc/NEWS: Mention jit-lock-antiblink-grace
>
> 2 files changed, 81 insertions(+), 1 deletion(-)
> etc/NEWS         |  7 ++++++
> lisp/jit-lock.el | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> ```
>
> ---
>
> Here is my bash script and do `C-c l` (org-table-copy-region) on
> first table and `C-c ;` (org-table-paste-rectangle) on second table.
> (~/dev/tmp/taks-file.tex have first tak's mention contents.)
>
> ```sh
> make clean
> ./autogen.sh
> ./configure --prefix=$HOME/.local/head
> make -j6
> ./src/emacs -Q ~/dev/tmp/taks-file.tex --eval "             \
>   (progn                                                    \
>     (setq truncate-lines t)                                 \
>     (setq debug-on-error t)                                 \
>     (require 'org)                                          \
>     (require 'org-table)                                    \
>     (orgtbl-mode)                                           \
>     (global-set-key (kbd \"C-c l\")                         \
>        (lambda ()                                           \
>          (interactive)                                      \
>          (org-table-copy-region (1+ (org-table-begin)) (- (org-table-end) 2)))) \
>     (global-set-key (kbd \"C-c ;\")                         \
>        (lambda ()                                           \
>          (interactive)                                      \
>          (org-table-paste-rectangle)                        \
>          (set-buffer-modified-p nil))))"                    \
> 2>/dev/null
> ```
>
> And here is my bisect log.
> ```
> Bisect Log (14)
> git bisect start 'emacs-27.1' 'emacs-26.3'
> git bisect good 38564f8a664347c42f7614d9c91e0d49e4a073e8
> git bisect good 825fd4d34165e5edc718a9df93838a410d25ea81
> git bisect good 5c5c1b559313d06aab6516ff1b1acf1da3a01c7d
> git bisect bad d7cd4ab7d948427104003f1d35cf52a4eac45d0a
> git bisect bad 4b2c2faab83fe3b13430b837be7d450b5cd47caf
> git bisect good 16ce6dbef279bda70b4d60b4d2d0aff008bfa5f7
> git bisect bad 5063e38921de8cb872965abda32bcc6fd8894532
> git bisect bad 4c933077157ba409d645f4649c8a3a8e534d53d5
> git bisect good 096be9c4541329af259273fe604dc4f8669fbd8a
> git bisect bad bd95d66ae97f3dcfe73b972de935e27e434e49be
> git bisect bad 5b45c269cda09fe46e110adb6f6767040f4ade59
> git bisect good 0e774d4f355b4f12a625da5ca9602d1ba876bcc1
> 5b45c269cda09fe46e110adb6f6767040f4ade59 is the first bad commit
> ```
>
>
>


--
João Távora





------------------------------

Message: 5
Date: Fri, 15 Jan 2021 15:12:34 +0100
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Tim Visher <tim.visher@gmail.com>, Emacs Org Mode mailing list
<emacs-orgmode@gnu.org>
Subject: Re: How to use `open` to handle `message:*` links on macOS
Message-ID: <2acd022ab06f7f7e2fbe74a6b42d816a@condition-alpha.com>
Content-Type: text/plain

Hello Tim,

Tim Visher <tim.visher@gmail.com> writes:

> [...]
> I'd like to be able to whack `C-c C-o` on `message:*` links on macOS and
> have it call `open` on the contents. Is there a way to make that happen?
>
> My intent is to be able to save a deep link to a Mail.app message in an org
> document.
> [...]

In my setup, I'm using this:
---------------------------- Begin Quote -----------------------------
(org-add-link-type "mac-mail" 'org-mac-mail-link-open)

(defun org-mac-mail-link-open (mid)
  "Visit the email message with message id MID."
  (start-process "open-mail" nil "open" (format "message:%%3C%s%%3E" mid)))
----------------------------- End Quote ------------------------------

It gives me a new link type "mac-mail" for org-insert-link. Copy the
message ID (without the angle brackets) from Mail.app, and insert it as
the link location. This is a manual process, of course, but then I'm not
using it often, and I don't need it for anything else but Mail.app.

org-mac-link as suggested by Diego offers much more convenience by
automating the entire process, and by giving you access to many other
apps, too. So you might prefer that if you are going to use it often.


Hoping to have helped,

  --alex



End of Emacs-orgmode Digest, Vol 179, Issue 18
**********************************************

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-16 13:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.59.1610730034.28769.emacs-orgmode@gnu.org>
2021-01-16 13:01 ` Emacs-orgmode Digest, Vol 179, Issue 18 Markéta Pospíšilová

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).