Context selection

ยอดดู 20 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Eduardo Mercovich

ยังไม่อ่าน,
17 ก.พ. 2560 14:59:0017/2/60
ถึง mu-discuss
Dear all.

I have contexts working ok with 5 accounts, except for a small
annoyance: the names of 2 contexts start with the same letter so I
can never select the second one. When the option appears (upon
pressing ";" or because of some contex policy requires to ask),
what I see is something like this (names changed to preserve the
innocents):

--8<---------------cut here---------------start------------->8---
Switch to context: (w)orking, (p)ersonal, (b)iking, (p)hotography
--8<---------------cut here---------------end--------------->8---

In this case, you will never be able to switch to (p)hotography,
since (p)ersonal will be selected before.

Happily the exiled one is a seldom used context, but anyway I'd
like to solve this.

Does anyone have a clue about how to do it, so that it doesnt
imply changing the context name?

There are XP bonus for those whose solution can pass the options
list through helm. ;)

As always, thanks a lot for sharing your time and dedication.

Best...


--
Eduardo Mercovich

Donde se cruzan tus talentos
con las necesidades del mundo,
ahí está tu vocación.
(Anónimo)

Ævar Arnfjörð Bjarmason

ยังไม่อ่าน,
18 ก.พ. 2560 04:33:5718/2/60
ถึง mu-di...@googlegroups.com
On Fri, Feb 17, 2017 at 8:58 PM, Eduardo Mercovich
<eduardo....@gmail.com> wrote:
> Dear all.
>
> I have contexts working ok with 5 accounts, except for a small annoyance:
> the names of 2 contexts start with the same letter so I can never select the
> second one. When the option appears (upon pressing ";" or because of some
> contex policy requires to ask), what I see is something like this (names
> changed to preserve the innocents):
>
> --8<---------------cut here---------------start------------->8---
> Switch to context: (w)orking, (p)ersonal, (b)iking, (p)hotography
> --8<---------------cut here---------------end--------------->8---
>
> In this case, you will never be able to switch to (p)hotography, since
> (p)ersonal will be selected before.
>
> Happily the exiled one is a seldom used context, but anyway I'd like to
> solve this.
>
> Does anyone have a clue about how to do it, so that it doesnt imply changing
> the context name?
> There are XP bonus for those whose solution can pass the options list
> through helm. ;)
>
> As always, thanks a lot for sharing your time and dedication.
> Best...

AFAIK with both bookmark names and contexts you're limited to 1
character, and it's always the first character of the name, so you
either need to change the name or manually hack the elisp code that's
doing this completion to override the short character.

But hopefully I'm wrong, this is one of the most annoying parts of
mu4e for me that I haven't fixed for myself yet, in particular I have
something like 30 bookmarks and the namespace is becoming increasingly
confusing & cluttered.

Dirk-Jan C. Binnema

ยังไม่อ่าน,
18 ก.พ. 2560 04:50:2618/2/60
ถึง mu-di...@googlegroups.com

On Saturday Feb 18 2017, Ævar Arnfjörð Bjarmason wrote:

> AFAIK with both bookmark names and contexts you're limited to 1
> character, and it's always the first character of the name, so you
> either need to change the name or manually hack the elisp code that's
> doing this completion to override the short character.
>
> But hopefully I'm wrong, this is one of the most annoying parts of
> mu4e for me that I haven't fixed for myself yet, in particular I have
> something like 30 bookmarks and the namespace is becoming increasingly
> confusing & cluttered.

That's indeed how it works. The idea is that you give your most used
bookmarks the obvious names, and you prefix the rest with whatever
character is useful for that; see `mu4e-read-option'.

One could think over a version of that function that resolves common
prefixes, but I'm not sure it's worth the hassle / extra complexity.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Ævar Arnfjörð Bjarmason

ยังไม่อ่าน,
18 ก.พ. 2560 16:53:4618/2/60
ถึง mu-di...@googlegroups.com
On Sat, Feb 18, 2017 at 10:50 AM, Dirk-Jan C. Binnema
<dj...@djcbsoftware.nl> wrote:
>
> On Saturday Feb 18 2017, Ævar Arnfjörð Bjarmason wrote:
>
>> AFAIK with both bookmark names and contexts you're limited to 1
>> character, and it's always the first character of the name, so you
>> either need to change the name or manually hack the elisp code that's
>> doing this completion to override the short character.
>>
>> But hopefully I'm wrong, this is one of the most annoying parts of
>> mu4e for me that I haven't fixed for myself yet, in particular I have
>> something like 30 bookmarks and the namespace is becoming increasingly
>> confusing & cluttered.
>
> That's indeed how it works. The idea is that you give your most used
> bookmarks the obvious names, and you prefix the rest with whatever
> character is useful for that; see `mu4e-read-option'.
>
> One could think over a version of that function that resolves common
> prefixes, but I'm not sure it's worth the hassle / extra complexity.

The ideal version of this for me would be if the API were changed so
that e.g. bookmarks were "some name" instead of ?x, then when I press
"b" I'd match "some name" (which might also just be "b") in the same
way that iswitch would match buffer names.

Is there any extension / hack like that for mu4e?

Eduardo Mercovich

ยังไม่อ่าน,
19 ก.พ. 2560 07:11:1219/2/60
ถึง mu-di...@googlegroups.com
Dear Ævar.

>> I have contexts working ok with 5 accounts, except for a small
>> annoyance: the names of 2 contexts start with the same letter
>> so I can never select the second one. [...]

> AFAIK with both bookmark names and contexts you're limited to 1
> character, and it's always the first character of the name, so
> you either need to change the name or manually hack the elisp
> code that's doing this completion to override the short
> character.

In bookmarks we can specify name, query and key
(https://www.djcbsoftware.nl/code/mu/mu4e/Bookmarks.html). Is that
structure reusable?

> But hopefully I'm wrong, this is one of the most annoying parts
> of mu4e for me that I haven't fixed for myself yet, in
> particular I have something like 30 bookmarks and the namespace
> is becoming increasingly confusing & cluttered.

While I don't have that many bookmarks (yet?), I do grok your case
and some more space could be certainly useful for many. For
example, you could define "l" as the group of "lists" and then "e"
for emacs, "o" for orgmode, "m" for mu4e, etc.

Thinking on this, there is already a mechanism on emacs/org-mode
that uses this grouping to help not only to have more options, but
to make it alto cognitively easier like in the lists example. When
you choose to export your document (C-x C-e), you must first
select a group and then the specific option inside that group
(that whas not even highlighted up to that moment). Here I attach
the step 1 (export) and 2 (having selected "l"atex, it's specific
options are now available).

Is that mechanism general, o available to other modes?

Best regards...
orgmode-Export-Step1.png
orgmode-Export-Step2.png

Christian Hopps

ยังไม่อ่าน,
19 ก.พ. 2560 07:42:4819/2/60
ถึง mu-di...@googlegroups.com

Eduardo Mercovich <eduardo....@gmail.com> writes:
> Thinking on this, there is already a mechanism on emacs/org-mode
> that uses this grouping to help not only to have more options, but
> to make it alto cognitively easier like in the lists example. When
> you choose to export your document (C-x C-e), you must first
> select a group and then the specific option inside that group
> (that whas not even highlighted up to that moment). Here I attach
> the step 1 (export) and 2 (having selected "l"atex, it's specific
> options are now available).
>
> Is that mechanism general, o available to other modes?

I'm believe this is just standard emacs keymaps, so yes it's available
everywhere in fact. :)

I too think it would be useful be able to select bookmarks using more
than 1 key as the identifier, e.g,.

bia (for Bookmark, Inbox, All)
bih (for Bookmark, Inbox, Home)
biw (for Bookmark, Inbox, Work)
bua (for Bookmark, Unread, All)
buh (for Bookmark, Unread, Home)
bum (for Bookmark, Unread, Me)
bul (for Bookmark, Unread, Lists)
buw (for Bookmark, Unread, Work)
...

Thanks,
Chris.
signature.asc

Eduardo Mercovich

ยังไม่อ่าน,
19 ก.พ. 2560 07:49:1519/2/60
ถึง mu-di...@googlegroups.com
Hi Dirk.

>> AFAIK with both bookmark names and contexts you're limited to 1
>> character, and it's always the first character of the name
>> [...]

> That's indeed how it works. The idea is that you give your most
> used bookmarks the obvious names, and you prefix the rest with
> whatever character is useful for that; see `mu4e-read-option'.

Is it possible to reuse the bookmark structure to make the
character independent of the name like in
https://www.djcbsoftware.nl/code/mu/mu4e/Bookmarks.html?

> One could think over a version of that function that resolves
> common prefixes, but I'm not sure it's worth the hassle / extra
> complexity.

While I notice the added hassle, the current state could led a
User into a non-working state... Yes, I know, people who use mu4e
have a certain comfort with these things and may probably get
unstuck, but anyway it's good practice and karma to try to prevent
these corners. Also, it will help to make mu4e rule the world
(eventually). ;)

Your "function that resolves common prefixes" would prevent anyone
to get stuck, or al least gives them the info to take corrective
action, even if all the letters are the same ("You named 2
contexts with the same name: [the-name]. Please configure
differente names for each context or you won't be able to select
the 2nd with the "Switch focus" command.").

Of course, not being a programmer, I have no idea at all about how
complex would that be to implement...

As always, thank you for mu4e.
It's becoming better by the day. :)

Best regards...
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ